diff --git a/core/src/main/java/lucee/runtime/op/Decision.java b/core/src/main/java/lucee/runtime/op/Decision.java index 2cd4956175..0cf498634c 100755 --- a/core/src/main/java/lucee/runtime/op/Decision.java +++ b/core/src/main/java/lucee/runtime/op/Decision.java @@ -40,7 +40,6 @@ import org.w3c.dom.Node; import org.w3c.dom.NodeList; -import lucee.print; import lucee.commons.date.DateTimeUtil; import lucee.commons.i18n.FormatUtil; import lucee.commons.lang.CFTypes; @@ -156,12 +155,6 @@ else if (value instanceof CharSequence || value instanceof Character) { else return false; } - public static void main(String[] args) throws PageException { - print.e(isNumber("0.")); - print.e(isNumber(".0")); - print.e(isNumber(".")); - } - /** * tests if String value is Numeric * diff --git a/core/src/main/java/lucee/runtime/op/date/DateCaster.java b/core/src/main/java/lucee/runtime/op/date/DateCaster.java index b119ceba54..87611cb14e 100755 --- a/core/src/main/java/lucee/runtime/op/date/DateCaster.java +++ b/core/src/main/java/lucee/runtime/op/date/DateCaster.java @@ -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 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 * diff --git a/core/src/main/java/lucee/runtime/security/CredentialImpl.java b/core/src/main/java/lucee/runtime/security/CredentialImpl.java index 291d1380d0..fd94dfa906 100644 --- a/core/src/main/java/lucee/runtime/security/CredentialImpl.java +++ b/core/src/main/java/lucee/runtime/security/CredentialImpl.java @@ -310,14 +310,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()); - * } - */ - } \ No newline at end of file diff --git a/core/src/main/java/lucee/runtime/tag/util/QueryParamConverter.java b/core/src/main/java/lucee/runtime/tag/util/QueryParamConverter.java index 7ae179e7c7..c50609ee38 100644 --- a/core/src/main/java/lucee/runtime/tag/util/QueryParamConverter.java +++ b/core/src/main/java/lucee/runtime/tag/util/QueryParamConverter.java @@ -187,7 +187,7 @@ else if (!inQuotes) { continue; } - if (++_qm > initialParamSize) throw new ApplicationException("there are more question marks in the SQL than params defined" , "SQL: " + sql + ""); + if (++_qm > initialParamSize) throw new ApplicationException("there are more question marks in the SQL than params defined", "SQL: " + sql + ""); } else if (c == ':') { @@ -373,44 +373,4 @@ private T fillSQLItem(T item, Struct sct) throws PageException, DatabaseExceptio return item; } } - - /* - * - * public static void main(String[] args) throws PageException { List one=new - * ArrayList(); one.add(new SQLItemImpl("aaa",1)); one.add(new SQLItemImpl("bbb",1)); - * - * List two=new ArrayList(); 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); - * - * - * } - */ - }