Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeloffner committed Sep 8, 2023
1 parent a7547ff commit f3fd409
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 83 deletions.
13 changes: 0 additions & 13 deletions core/src/main/java/lucee/commons/lang/StringUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -1393,19 +1393,6 @@ private static String placeholder(String str) {
return new String(carr);
}

/*
* public static void main(String[] args) throws PageException { Map<String, String> map = new
* HashMap<>(); map.put("target", "!target!"); map.put("replace", "er"); map.put("susi", "Susanne");
* print.e(
* replaceMap("I want replace replace to add 1 underscore with struct-replace... 'target' replace",
* map, false));
*
* map = new HashMap<>(); map.put("Susi", "Sorglos"); map.put("Sorglos", "Susi");
* print.e(replaceMap("Susi Sorglos foehnte ihr Haar", map, false));
*
* }
*/

public static String unwrap(String str) {
if (StringUtil.isEmpty(str)) return "";
str = str.trim();
Expand Down
20 changes: 0 additions & 20 deletions core/src/main/java/lucee/runtime/op/date/DateCaster.java
Original file line number Diff line number Diff line change
Expand Up @@ -197,26 +197,6 @@ public static DateTime toDateTime(Locale locale, String str, TimeZone tz, boolea
return dt;
}

/*
* public static void main(String[] args) throws PageException {
*
* Locale[] locales = Locale.getAvailableLocales(); Iterator<Locale> it =
* LocaleFactory.getLocales().values().iterator();
*
* //print.e(toDateTime(new Locale("de","CH"), "06.02.2008 01:02:01 MEZ",
* TimeZone.getDefault(),null, false)); String str="dimanche, 6. avril 2008 01:02:03";
* str="06.02.2008, 01:02:01 MEZ"; str="01.02. h CEST"; str="6-apr-2008";
* str="Sunday, April 6, 2008 1:02:03 AM CEST"; str="Sunday, April 6, 2008 1:02:03 AM CEST";
* str="01:02:03 o'clock CEST"; str="1:02 Uhr MEZ"; Locale l=new Locale("fr","CH"); l=new
* Locale("it","CH"); l=new Locale("en","US"); l=new Locale("en","UK"); l=new Locale("de","CH");
* //l=new Locale("es","ES"); //l=LocaleConstant.PORTUGUESE_BRASIL;
* //l=LocaleConstant.DUTCH_NETHERLANDS; //l=LocaleConstant.ARABIC_ALGERIA; //l=Locale.CHINA;
* print.e(str); print.e(toDateTime(l, str, TimeZone.getDefault(),null, false));
*
*
* }
*/

/**
* parse a string to a Datetime Object, returns null if can't convert
*
Expand Down
10 changes: 0 additions & 10 deletions core/src/main/java/lucee/runtime/security/CredentialImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -306,14 +306,4 @@ public static Credential decode(Object encoded, Resource rolesDir, String privat
public String toString() {
return "username:" + username + ";password:" + password + ";roles:" + roles;
}

/*
* public static void main(String[] args) throws PageException { int i = 20; Resource rolesDir =
* ResourcesImpl.getFileResourceProvider().getResource("/Users/mic/Temp/"); String key =
* "vhvzglmjknkvug"; String salt = "dbjvzvhvnbubvuh"; CredentialImpl c = new CredentialImpl("susi",
* "sorglos", new String[] { "qqq" }, rolesDir, key, salt, i); String enc = c.encode(); Credential
* res = CredentialImpl.decode(enc, rolesDir, key, "df", i); print.e(enc); print.e(res.toString());
* }
*/

}
40 changes: 0 additions & 40 deletions core/src/main/java/lucee/runtime/tag/util/QueryParamConverter.java
Original file line number Diff line number Diff line change
Expand Up @@ -374,44 +374,4 @@ private T fillSQLItem(T item, Struct sct) throws PageException, DatabaseExceptio
return item;
}
}

/*
*
* public static void main(String[] args) throws PageException { List<SQLItem> one=new
* ArrayList<SQLItem>(); one.add(new SQLItemImpl("aaa",1)); one.add(new SQLItemImpl("bbb",1));
*
* List<NamedSQLItem> two=new ArrayList<NamedSQLItem>(); two.add(new
* NamedSQLItem("susi","sorglos",1)); two.add(new NamedSQLItem("peter","Petrus",1));
*
* SQL sql = convert(
* "select ? as x, 'aa:a' as x from test where a=:susi and b=:peter and c=? and d=:susi", one, two);
*
* print.e(sql);
*
* // array with simple values Array arr=new ArrayImpl(); arr.appendEL("aaa"); arr.appendEL("bbb");
* sql = convert( "select * from test where a=? and b=?", arr); print.e(sql);
*
* // array with complex values arr=new ArrayImpl(); Struct val1=new StructImpl(); val1.set("value",
* "Susi Sorglos"); Struct val2=new StructImpl(); val2.set("value", "123"); val2.set("type",
* "integer"); arr.append(val1); arr.append(val2); sql = convert(
* "select * from test where a=? and b=?", arr); print.e(sql);
*
* // array with mixed values arr.appendEL("ccc"); arr.appendEL("ddd"); sql = convert(
* "select * from test where a=? and b=? and c=? and d=?", arr); print.e(sql);
*
* // array mixed with named values Struct val3=new StructImpl(); val3.set("value", "456");
* val3.set("type", "integer"); val3.set("name", "susi"); arr.append(val3); sql = convert(
* "select :susi as name from test where a=? and b=? and c=? and d=?", arr); print.e(sql);
*
*
* // struct with simple values Struct sct=new StructImpl(); sct.set("abc", "Sorglos"); sql =
* convert( "select * from test where a=:abc", sct); print.e(sql);
*
* // struct with mixed values sct.set("peter", val1); sct.set("susi", val3); sql = convert(
* "select :peter as p, :susi as s from test where a=:abc", sct); print.e(sql);
*
*
* }
*/

}

0 comments on commit f3fd409

Please sign in to comment.