Given code that hasn't been touched for two years, and that never saw such a problem before, is there any explanation for this stack trace:
at java.lang.Thread.run(Thread.java:818)\nCaused by: java.lang.NullPointerException
at xxx.Whatever.foo(Whatever.java:1195)
at xxx.Whatever.bar(Whatever.java:1182)
And line 1182 within that class, in the bar()
method:
foo(someArguments)
And line 1195 within that class, in the foo()
method:
if (typeContainer != null && typeContainer.getEnumConstant() == TypeEnum.SOME_TYPE)
I do not understand how this NPE stacktrace is possible. That line above can not throw an NPE.
So, are there any reasonable explanations what is going on here?
Note: "of course" the NPE can't be reproduced. When I run the corresponding test against the system that gave that stacktrace (during a functional test 4 weeks ago), there is no NPE, and the test gives the expected result.