Hi all, ofbiz trunk doesn't work anymore, ant run-install build successfull but there are a lot this (in run-install and startofbiz) :
at org.ofbiz.base.util.UtilValidate.isEmpty(UtilValidate.java:186) at org.ofbiz.base.util.ObjectType.isEmpty(ObjectType.java:762) at org.ofbiz.base.util.UtilValidate.isEmpty(UtilValidate.java:186) at org.ofbiz.base.util.ObjectType.isEmpty(ObjectType.java:762) at org.ofbiz.base.util.UtilValidate.isEmpty(UtilValidate.java:186) So, It seems that there is a problem with that commit Le jeudi 26 novembre 2009 à 13:09 +0000, [email protected] a écrit : > Author: jleroux > Date: Thu Nov 26 13:09:40 2009 > New Revision: 884545 > > URL: http://svn.apache.org/viewvc?rev=884545&view=rev > Log: > Better version of isEmpty() with comments from Scott and Adam on dev ML. > I used one line, please feel free to comment if needed > > Modified: > ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ObjectType.java > > Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ObjectType.java > URL: > http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ObjectType.java?rev=884545&r1=884544&r2=884545&view=diff > ============================================================================== > --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ObjectType.java > (original) > +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ObjectType.java Thu > Nov 26 13:09:40 2009 > @@ -753,26 +753,22 @@ > return Boolean.TRUE; > } > > + @SuppressWarnings("unchecked") > public static boolean isEmpty(Object value) { > if (value == null) return true; > - > - if (value instanceof String) { > - if (((String) value).length() == 0) { > - return true; > - } > - } else if (value instanceof Collection) { > - if (((Collection<?>) value).size() == 0) { > - return true; > - } > - } else if (value instanceof Map) { > - if (((Map<?,?>) value).size() == 0) { > - return true; > - } > - } else if (value instanceof CharSequence) { > - if (((CharSequence) value).length() == 0) { > - return true; > - } > - } > + > + if (value instanceof String) return UtilValidate.isEmpty((String) > value); > + if (value instanceof Collection) return > UtilValidate.isEmpty((Collection<? extends Object>) value); > + if (value instanceof Map) return UtilValidate.isEmpty((Map<? extends > Object, ? extends Object>) value); > + if (value instanceof CharSequence) return > UtilValidate.isEmpty((CharSequence) value); > + > + // These types would flood the log > + if (value instanceof Boolean) return false; > + if (value instanceof Integer) return false; > + if (value instanceof java.math.BigDecimal) return false; > + if (value instanceof java.sql.Timestamp) return false; > + > + Debug.logWarning("In ObjectType.isEmpty(Object value) returning > false for " + value.getClass() + " Object.", module); > return false; > } > > >
