Wouldn't it be better to just upper case for the comparison, and not in the variable setup which might have an effect on other things? -David [hidden email] wrote: > Author: jleroux > Date: Sun Sep 9 02:16:50 2007 > New Revision: 573967 > > URL: http://svn.apache.org/viewvc?rev=573967&view=rev > Log: > A patch from Adrian Crum "ModelFieldType.StringLength() returns incorrect value" (https://issues.apache.org/jira/browse/OFBIZ-1229) > > Modified: > ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldType.java > > Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldType.java > URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldType.java?rev=573967&r1=573966&r2=573967&view=diff > ============================================================================== > --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldType.java (original) > +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldType.java Sun Sep 9 02:16:50 2007 > @@ -52,7 +52,7 @@ > public ModelFieldType(Element fieldTypeElement) { > this.type = UtilXml.checkEmpty(fieldTypeElement.getAttribute("type")); > this.javaType = UtilXml.checkEmpty(fieldTypeElement.getAttribute("java-type")); > - this.sqlType = UtilXml.checkEmpty(fieldTypeElement.getAttribute("sql-type")); > + this.sqlType = UtilXml.checkEmpty(fieldTypeElement.getAttribute("sql-type")).toUpperCase(); > this.sqlTypeAlias = UtilXml.checkEmpty(fieldTypeElement.getAttribute("sql-type-alias")); > > NodeList validateList = fieldTypeElement.getElementsByTagName("validate"); > > |
Administrator
|
David,
Yes you are right, I will do it right now. Jacques De : "David E Jones" <[hidden email]> > > Wouldn't it be better to just upper case for the comparison, and not in the variable setup which might have an effect on other things? > > -David > > > [hidden email] wrote: > > Author: jleroux > > Date: Sun Sep 9 02:16:50 2007 > > New Revision: 573967 > > > > URL: http://svn.apache.org/viewvc?rev=573967&view=rev > > Log: > > A patch from Adrian Crum "ModelFieldType.StringLength() returns incorrect value" > > > > Modified: > > ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldType.java > > > > Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldType.java > > URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldType.java?rev=573967&r1=573966&r2=573967&view=diff > > ============================================================================== > > --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldType.java (original) > > +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldType.java Sun Sep 9 02:16:50 2007 > > @@ -52,7 +52,7 @@ > > public ModelFieldType(Element fieldTypeElement) { > > this.type = UtilXml.checkEmpty(fieldTypeElement.getAttribute("type")); > > this.javaType = UtilXml.checkEmpty(fieldTypeElement.getAttribute("java-type")); > > - this.sqlType = UtilXml.checkEmpty(fieldTypeElement.getAttribute("sql-type")); > > + this.sqlType = UtilXml.checkEmpty(fieldTypeElement.getAttribute("sql-type")).toUpperCase(); > > this.sqlTypeAlias = UtilXml.checkEmpty(fieldTypeElement.getAttribute("sql-type-alias")); > > > > NodeList validateList = fieldTypeElement.getElementsByTagName("validate"); > > > > |
Wow, okay, and you did it yourself! I haven't tested or anything, but yeah this approach looks better. -David Jacques Le Roux wrote: > David, > > Yes you are right, I will do it right now. > > Jacques > > De : "David E Jones" <[hidden email]> >> Wouldn't it be better to just upper case for the comparison, and not in the variable setup which might have an effect on other > things? >> -David >> >> >> [hidden email] wrote: >>> Author: jleroux >>> Date: Sun Sep 9 02:16:50 2007 >>> New Revision: 573967 >>> >>> URL: http://svn.apache.org/viewvc?rev=573967&view=rev >>> Log: >>> A patch from Adrian Crum "ModelFieldType.StringLength() returns incorrect value" > (https://issues.apache.org/jira/browse/OFBIZ-1229) >>> Modified: >>> ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldType.java >>> >>> Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldType.java >>> URL: > http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldType.java?rev=573967&r1=573966&r2=573967&view=diff >>> ============================================================================== >>> --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldType.java (original) >>> +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldType.java Sun Sep 9 02:16:50 2007 >>> @@ -52,7 +52,7 @@ >>> public ModelFieldType(Element fieldTypeElement) { >>> this.type = UtilXml.checkEmpty(fieldTypeElement.getAttribute("type")); >>> this.javaType = UtilXml.checkEmpty(fieldTypeElement.getAttribute("java-type")); >>> - this.sqlType = UtilXml.checkEmpty(fieldTypeElement.getAttribute("sql-type")); >>> + this.sqlType = UtilXml.checkEmpty(fieldTypeElement.getAttribute("sql-type")).toUpperCase(); >>> this.sqlTypeAlias = UtilXml.checkEmpty(fieldTypeElement.getAttribute("sql-type-alias")); >>> >>> NodeList validateList = fieldTypeElement.getElementsByTagName("validate"); >>> >>> > |
Free forum by Nabble | Edit this page |