-
Notifications
You must be signed in to change notification settings - Fork 125
annotation null pointer exception when List is used as @JsonField in Eclipse #20
Comments
is this a transient issue due to incremental compilation? |
@ttung Doesn't seem to be.... I tried to clean the project and rebuild which doesn't solve the issue. |
Oh! Is your List type parameterized? It needs to be: List<SomeType> foo; SomeType either needs to be a type annotated with @jsontype or it needs to be an autoboxed primitive (like Integer, Float, etc) |
Did that solve your problem, btw? |
Strings should work. Do you get any errors when you build? |
Did you use guava's It would be helpful if you can paste your model class here so that we can repro the issue. I'd be happy to take a look. |
Thank you for reporting this issue and appreciate your patience. We've notified the core team for an update on this issue. We're looking for a response within the next 30 days or the issue may be closed. |
The exception from the Eclipse .log file is as follows:
!ENTRY org.eclipse.jdt.apt.pluggable.core 1 1 2015-01-27 00:48:04.922
!MESSAGE annotation exception: java.lang.NullPointerException cause: java.lang.NullPointerException
at java.util.regex.Matcher.getTextLength(Matcher.java:1234)
at java.util.regex.Matcher.reset(Matcher.java:308)
at java.util.regex.Matcher.(Matcher.java:228)
at java.util.regex.Pattern.matcher(Pattern.java:1088)
at java.util.Formatter.parse(Formatter.java:2515)
at java.util.Formatter.format(Formatter.java:2469)
at java.util.Formatter.format(Formatter.java:2423)
at java.lang.String.format(String.java:2790)
at com.instagram.javawriter.JavaWriter.emitStatement(JavaWriter.java:663)
at com.instagram.common.json.annotation.processor.JsonParserClassData.writeSerializeCalls(JsonParserClassData.java:514)
at com.instagram.common.json.annotation.processor.JsonParserClassData.access$200(JsonParserClassData.java:39)
at com.instagram.common.json.annotation.processor.JsonParserClassData$2.emitJava(JsonParserClassData.java:199)
at com.instagram.javawriter.JavaWriter.emitWithGenerator(JavaWriter.java:72)
at com.instagram.common.json.annotation.processor.JsonParserClassData.getJavaCode(JsonParserClassData.java:183)
at com.instagram.common.json.annotation.processor.JsonAnnotationProcessor.process(JsonAnnotationProcessor.java:101)
at org.eclipse.jdt.internal.compiler.apt.dispatch.RoundDispatcher.handleProcessor(RoundDispatcher.java:139)
at org.eclipse.jdt.internal.compiler.apt.dispatch.RoundDispatcher.round(RoundDispatcher.java:121)
at org.eclipse.jdt.internal.compiler.apt.dispatch.BaseAnnotationProcessorManager.processAnnotations(BaseAnnotationProcessorManager.java:159)
at org.eclipse.jdt.internal.apt.pluggable.core.dispatch.IdeAnnotationProcessorManager.processAnnotations(IdeAnnotationProcessorManager.java:134)
at org.eclipse.jdt.internal.compiler.Compiler.processAnnotations(Compiler.java:820)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:434)
at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:366)
at org.eclipse.jdt.internal.core.builder.IncrementalImageBuilder.compile(IncrementalImageBuilder.java:329)
at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:303)
at org.eclipse.jdt.internal.core.builder.IncrementalImageBuilder.build(IncrementalImageBuilder.java:134)
at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildDeltas(JavaBuilder.java:265)
at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:193)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:733)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:299)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:302)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:358)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:381)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
The text was updated successfully, but these errors were encountered: