Re: svn commit: r573967 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldType.java

Posted by David E Jones-2 on
URL: http://ofbiz.116.s1.nabble.com/svn-commit-r573967-ofbiz-trunk-framework-entity-src-org-ofbiz-entity-model-ModelFieldType-java-tp213075p213076.html


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");
>
>