I don't think it's related to the number of static initializers.
However, I did not dig into details about what could have happened.
hasan
Reto Bachmann-Gmuer wrote:
Could you explain briefly what's happening? I don't understand: 2
static initializers cause a problem, and 3 do not? Was the non-static
initializer executed before the static one? that seems weird.
Cheers,
reto
On Sun, Feb 14, 2010 at 11:27 PM, Hasan <[email protected]> wrote:
I created issue ZZ-125 and solved it by making typeConverterMap static.
hasan
Reto Bachmann-Gmuer wrote:
Thanks Hasan, this makes things clearer!
It seems its a problem with the two static initializers, apparently
only the first of them is executed when running all tests together,
then we have a Null key in the HashMap. Very Strange behaviour, the
compile doesn't complain about two static initializers, but at runtime
sometimes one is left out.
Cheers,
reto
On Sun, Feb 14, 2010 at 7:56 PM, Hasan <[email protected]> wrote:
ok, it seems the problem lies in this line
typeConverterMap.put(byteArrayType, new ByteArrayConverter());
if you comment out this line and the respective test
it will build without error.
but what's wrong with that line?
hasan
Hasan wrote:
Hmmm... weird.... the individual tests are ok...
i debug the test, but can't find errors yet
hasan
Reto Bachmann-Gmuer wrote:
I'm not getting it:
java.lang.NullPointerException at
org.apache.clerezza.rdf.core.impl.SimpleLiteralFactory.createTypedLiteral(SimpleLiteralFactory.java:229)
I'm seeing that exception only when running the tests on the whole
projects, not when running the individual test files.
the exception is
//added this to make sue value is not null
if (value == null) {
throw new IllegalArgumentException("value may not be null");
}
for (Map.Entry<Class<?>, TypeConverter<?>> converterEntry :
typeConverterMap.entrySet()) {
if
(converterEntry.getKey().isAssignableFrom(value.getClass())) {
// <-ON THIS LINE
maybe I'm just to tired, would be glad if somebody had a look at it.
reto
On Sat, Feb 13, 2010 at 6:08 PM, Apache Hudson Server
<[email protected]> wrote:
See
<http://hudson.zones.apache.org/hudson/job/clerezza-trunk-1.6/org.apache.clerezza$org.apache.clerezza.rdf.core/106/changes>
--
Hasan Hasan
trialox AG
Binzmühlestrasse 14, CH-8050 Zürich
Tel: +41 44 635 7577
Fax: +41 44 635 7574
URL: http://trialox.org
--
Hasan Hasan
trialox AG
Binzmühlestrasse 14, CH-8050 Zürich
Tel: +41 44 635 7577
Fax: +41 44 635 7574
URL: http://trialox.org