You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Matthieu Bollot <ma...@nereide.biz> on 2009/11/26 15:42:01 UTC
Re: svn commit: r884545 -
/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ObjectType.java
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, jleroux@apache.org 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;
> }
>
>
>
Re: svn commit: r884545 -
/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ObjectType.java
Posted by Matthieu Bollot <ma...@nereide.biz>.
Le jeudi 26 novembre 2009 à 16:46 +0100, Jacques Le Roux a écrit :
> Note : it needs an ant clean
Thanks
Re: svn commit: r884545 - /ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ObjectType.java
Posted by Jacques Le Roux <ja...@les7arts.com>.
Note : it needs an ant clean
Jacques
From: "Jacques Le Roux" <ja...@les7arts.com>
> Fixed at r884598 continuous integration rocks!
>
> Jacques
>
> From: "Jacques Le Roux" <ja...@les7arts.com>
>> It's ok locally after ant clean-all, new Postgres DB and ant run-install
>> (any isEmpty string in the log, BUILD SUCCESSFUL
>> Total time: 2 minutes 47 seconds)
>>
>> But I can see some problems here http://ci.apache.org/waterfall?show_events=false&branch=&builder=ofbiz-trunk&reload=none
>> Maybe related to Derby(?), I check
>>
>> Jacques
>>
>> From: "Jacques Le Roux" <ja...@les7arts.com>
>>> Thanks Mattieu,
>>>
>>> I will have a look... right now...
>>>
>>> Jacques
>>>
>>> From: "Matthieu Bollot" <ma...@nereide.biz>
>>>
>>>
>>>> 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, jleroux@apache.org 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;
>>>>> }
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Re: svn commit: r884545 - /ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ObjectType.java
Posted by Jacques Le Roux <ja...@les7arts.com>.
Fixed at r884598 continuous integration rocks!
Jacques
From: "Jacques Le Roux" <ja...@les7arts.com>
> It's ok locally after ant clean-all, new Postgres DB and ant run-install
> (any isEmpty string in the log, BUILD SUCCESSFUL
> Total time: 2 minutes 47 seconds)
>
> But I can see some problems here http://ci.apache.org/waterfall?show_events=false&branch=&builder=ofbiz-trunk&reload=none
> Maybe related to Derby(?), I check
>
> Jacques
>
> From: "Jacques Le Roux" <ja...@les7arts.com>
>> Thanks Mattieu,
>>
>> I will have a look... right now...
>>
>> Jacques
>>
>> From: "Matthieu Bollot" <ma...@nereide.biz>
>>
>>
>>> 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, jleroux@apache.org 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;
>>>> }
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Re: svn commit: r884545 - /ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ObjectType.java
Posted by Jacques Le Roux <ja...@les7arts.com>.
It's ok locally after ant clean-all, new Postgres DB and ant run-install
(any isEmpty string in the log, BUILD SUCCESSFUL
Total time: 2 minutes 47 seconds)
But I can see some problems here http://ci.apache.org/waterfall?show_events=false&branch=&builder=ofbiz-trunk&reload=none
Maybe related to Derby(?), I check
Jacques
From: "Jacques Le Roux" <ja...@les7arts.com>
> Thanks Mattieu,
>
> I will have a look... right now...
>
> Jacques
>
> From: "Matthieu Bollot" <ma...@nereide.biz>
>
>
>> 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, jleroux@apache.org 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;
>>> }
>>>
>>>
>>>
>>
>>
>
>
Re: svn commit: r884545 - /ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ObjectType.java
Posted by Jacques Le Roux <ja...@les7arts.com>.
Thanks Mattieu,
I will have a look... right now...
Jacques
From: "Matthieu Bollot" <ma...@nereide.biz>
> 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, jleroux@apache.org 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;
>> }
>>
>>
>>
>
>