Prunoideae / ProbeJS

Supercharging your modpack experience.
GNU General Public License v3.0
47 stars 15 forks source link

properly handle very short package name #88

Closed ZZZank closed 3 months ago

ZZZank commented 3 months ago

Some classes are using very short package name that does not even contain two or more parts, when these classes are being dumped, an error will happen:

[probejs/]: Index 1 out of bounds for length 1
[probejs/]: java.base/java.util.Arrays$ArrayList.get(Arrays.java:4266)
[probejs/]: moe.wolfgirl.probejs.lang.typescript.ScriptDump.dumpClasses(ScriptDump.java:282)
[probejs/]: moe.wolfgirl.probejs.lang.typescript.ScriptDump.dump(ScriptDump.java:366)
[probejs/]: moe.wolfgirl.probejs.ProbeDump.lambda$trigger$0(ProbeDump.java:127)
[probejs/]: java.base/java.lang.Thread.run(Thread.java:1583)

This PR fixes this using a simple length check.