NativeScript / NativeScript/android-dts-generator
DtsApi.getInterfaces - Exception in thread "main" java.lang.NullPointerException
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 96
- Forks
- 25
- PR merge metrics
- No merged PRs in 30d
Description
This happens with only a few jar files, but I get this error when throwing them through the dts-generator:
Exception in thread "main" java.lang.NullPointerException
at com.telerik.dts.DtsApi.getInterfaces(DtsApi.java:352)
at com.telerik.dts.DtsApi.generateDtsContent(DtsApi.java:75)
at com.telerik.dts.Generator.generateDts(Generator.java:37)
at com.telerik.dts.Generator.start(Generator.java:29)
at com.telerik.Main.main(Main.java:21)
I've found that adding a check if clazz1 != null allows the generator to work.
JavaClass clazz1 = ClassRepo.findClass(intface);
The fix source:
https://github.com/roblav96/android-dts-generator/commit/1dae5329050ca198977102400cd2a14588f840af#diff-84b371273f2d411517c3ef4981518716
Jar Examples
Download jars here:
https://drive.google.com/file/d/0BzsNfWSNiUKLRlNOWkctb1JvZ1E/view?usp=sharing
OneSignal
java -jar dts-generator-debug.jar \
-input android24.jar \
-input android-support-v4.jar \
-input android-support-v7-appcompat.jar \
-input amazon-device-messaging-1.0.1.jar \
-input OneSignalSDK.jar \
-generate-multiple
materialdrawer
java -jar dts-generator.jar \
-input android24.jar \
-input android-support-v4.jar \
-input android-support-v7-appcompat.jar \
-input android-support-v7-recyclerview.jar \
-input materialize-1.0.0.jar \
-input materialdrawer-5.7.0.jar \
-generate-multiple
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in DtsApi.java at getInterfaces, especially line 352, then follow generateDtsContent and the Generator entry points shown in the stack trace. Reproduce with the OneSignal or materialdrawer jar command and confirm generation completes without the reported NullPointerException. The issue includes an external commit showing a possible fix to compare against.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100