ochafik/nativelibs4java — Issue #258: NullPointerException from findBestPlainStorageName()
Author: ardenliu
Created: 2012-02-09 21:50:44+00:00
State: open

When I run:
java -jar jnaerator-0.9.9-shaded.jar -I/somepath ./test.h

I got the following exception:
-------
java.lang.NullPointerException
at com.ochafik.lang.jnaerator.JNAeratorUtils.findBestPlainStorageName(JNAeratorUtils.java:98)
at com.ochafik.lang.jnaerator.JNAeratorUtils.guessOwnerName(JNAeratorUtils.java:66)
at com.ochafik.lang.jnaerator.MissingNamesChooser.chooseNameIfMissing(MissingNamesChooser.java:329)
at com.ochafik.lang.jnaerator.MissingNamesChooser.visitFunctionSignature(MissingNamesChooser.java:133)
at com.ochafik.lang.jnaerator.parser.TypeRef$FunctionSignature.accept(TypeRef.java:190)
at com.ochafik.lang.jnaerator.parser.Scanner.visit(Scanner.java:457)
at com.ochafik.lang.jnaerator.parser.Scanner.visitDeclaration(Scanner.java:115)
at com.ochafik.lang.jnaerator.parser.Scanner.visitVariablesDeclaration(Scanner.java:287)
at com.ochafik.lang.jnaerator.parser.VariablesDeclaration.accept(VariablesDeclaration.java:41)
at com.ochafik.lang.jnaerator.parser.Scanner.visit(Scanner.java:468)
at com.ochafik.lang.jnaerator.parser.Scanner.visitSourceFile(Scanner.java:231)
at com.ochafik.lang.jnaerator.parser.SourceFile.accept(SourceFile.java:100)
at com.ochafik.lang.jnaerator.SourceFiles.accept(SourceFiles.java:40)
at com.ochafik.lang.jnaerator.JNAerator.jnaerationCore(JNAerator.java:1655)
at com.ochafik.lang.jnaerator.JNAerator.jnaerate(JNAerator.java:847)
at com.ochafik.lang.jnaerator.JNAerator$1.finished(JNAerator.java:737)
at com.ochafik.lang.jnaerator.JNAeratorCommandLineArgs$ArgsParser.parse(JNAeratorCommandLineArgs.java:118)
at com.ochafik.lang.jnaerator.JNAerator.main(JNAerator.java:297)
at com.ochafik.lang.jnaerator.JNAerator.main(JNAerator.java:178)
-------