I'm trying to port the SCM domain(and others) to the new OpenEngSBFileModel,
but in the git connector tests I get a NullPointerException when calling
GetFile().
The crash occurs here:
Thread [main] (Suspended)
ModelProxyHandler.checkForGetterResultConversion(String) line: 165
ModelProxyHandler.handleGetMethod(Method) line: 148
ModelProxyHandler.handleInvoke(Object, Method, Object[]) line: 78
ModelProxyHandler(AbstractOpenEngSBInvocationHandler).invoke(Object,
Method, Object[]) line: 55
(I cut the stacktrace down a bit, I can send the full stacktrace if needed).
The crashing line is: Object obj = doObjectConversion(entry.getValue(), true);
The value member of the OpenEngSBModelEntry is null. According to my
debugging, setValue() is never called. The type is java.io.File, which seems
correct.
Note that this is happening in the unit tests. I'll port the other domains and
connectors needed to make use of this in the OpenCIT to see if it's a test-
specific problem, but this will take a while.
You can find the code at https://github.com/stefand/openengsb-connector-git in
the "filemodel" branch. You'll also need the filemodel branch of
https://github.com/stefand/openengsb-domain-scm .
Cheers,
Stefan
I haven't filed a bug yet, I did some more testing. The issue also happens in
the real running system, not just the unit tests.
For debugging I wrote the FileModel object to stdout and got this:
{ FIle == null, file == null, fIle == /tmp/repository3166875042965212197 }
Could the cause of all this be a typo? aka OPENENGSB-2608?
Cheers,
Stefan