oblac / jodd

Jodd! Lightweight. Java. Zero dependencies. Use what you like.
https://jodd.org
BSD 2-Clause "Simplified" License
4.06k stars 724 forks source link

Proxetta doesn't support classes in the default package #192

Closed wouterv closed 9 years ago

wouterv commented 9 years ago

Take the test case from #191 and put the classes in the default package instead of foo.

The following exception will happen:

Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    at java.lang.String.substring(String.java:1911)
    at jodd.proxetta.asm.TargetClassInfoReader.visit(TargetClassInfoReader.java:119)
    at jodd.asm5.ClassReader.accept(ClassReader.java:622)
    at jodd.asm5.ClassReader.accept(ClassReader.java:506)
    at jodd.proxetta.ProxettaBuilder.process(ProxettaBuilder.java:181)
    at jodd.proxetta.ProxettaBuilder.define(ProxettaBuilder.java:224)
    at jodd.proxetta.ProxettaBuilder.newInstance(ProxettaBuilder.java:275)
    at TestClass.main(TestClass.java:12)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
igr commented 9 years ago

Awesome, thank you again! Fortunately, this time this was an easy fix ;)