From: James Moger Date: Fri, 27 Jan 2012 20:53:00 +0000 (-0500) Subject: Fixed index out of bounds exception in parsing a default string value X-Git-Tag: v0.7.10^0 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=25e92e1b20d58b523c8a1e2090241552bc4489cd;p=iciql.git Fixed index out of bounds exception in parsing a default string value --- diff --git a/api/v13.xml b/api/v13.xml index 4dcd2aa..927f59b 100644 --- a/api/v13.xml +++ b/api/v13.xml @@ -43,7 +43,7 @@ type="java.lang.String" transient="false" volatile="false" - value=""0.7.9"" + value=""0.7.10"" static="true" final="true" deprecated="not deprecated" @@ -54,7 +54,7 @@ type="java.lang.String" transient="false" volatile="false" - value=""2012-01-24"" + value=""2012-01-27"" static="true" final="true" deprecated="not deprecated" diff --git a/docs/05_releases.mkd b/docs/05_releases.mkd index fc90b54..934e710 100644 --- a/docs/05_releases.mkd +++ b/docs/05_releases.mkd @@ -6,6 +6,10 @@ **%VERSION%** ([zip](http://code.google.com/p/iciql/downloads/detail?name=%ZIP%)|[jar](http://code.google.com/p/iciql/downloads/detail?name=%JAR%))   *released %BUILDDATE%* +- Fixed default String value bug where a default empty string threw an IndexOutOfBounds exception + +**0.7.9**   *released 2012-01-24* + - Added toParameter() option for SET commands and allow generating parameterized UPDATE statements
String q = db.from(t).set(t.timestamp).toParameter().where(t.id).is(5).toSQL();
db.executeUpdate(q, new Date()); diff --git a/src/com/iciql/Constants.java b/src/com/iciql/Constants.java index 3653cde..2ce664a 100644 --- a/src/com/iciql/Constants.java +++ b/src/com/iciql/Constants.java @@ -25,11 +25,11 @@ public class Constants { // The build script extracts this exact line so be careful editing it // and only use A-Z a-z 0-9 .-_ in the string. - public static final String VERSION = "0.7.9"; + public static final String VERSION = "0.7.10"; // The build script extracts this exact line so be careful editing it // and only use A-Z a-z 0-9 .-_ in the string. - public static final String VERSION_DATE = "2012-01-24"; + public static final String VERSION_DATE = "2012-01-27"; // The build script extracts this exact line so be careful editing it // and only use A-Z a-z 0-9 .-_ in the string. diff --git a/src/com/iciql/ModelUtils.java b/src/com/iciql/ModelUtils.java index 72e9690..56e6440 100644 --- a/src/com/iciql/ModelUtils.java +++ b/src/com/iciql/ModelUtils.java @@ -269,7 +269,7 @@ class ModelUtils { if (def.defaultValue.charAt(0) == '\'' && def.defaultValue.charAt(def.defaultValue.length() - 1) == '\'') { // strip leading and trailing single quotes - return def.defaultValue.substring(1, def.defaultValue.length() - 2); + return def.defaultValue.substring(1, def.defaultValue.length() - 1).trim(); } return def.defaultValue; }