Closed meszibalu closed 8 years ago
@meszibalu Thank you for reporting this. It is indeed interesting that it would fail on simplest class there is.
One question, which JDK are you using?
@cowtowncoder My java version is: openjdk version "1.8.0_72-internal" OpenJDK Runtime Environment (build 1.8.0_72-internal-b15) OpenJDK 64-Bit Server VM (build 25.72-b15, mixed mode)
I am using Debian Linux (jessie).
@meszibalu fixed for 1.3.2. Seems to work ok as far as I can see, but would appreciate verification if possible. Not yet sure when I'll release 1.3.2; could do it soon since bug reports are not very common around here.
@cowtowncoder I built your commit and it seems to be okay for me. I tested it for Object.class, int.class and for some other classes. Thanks :)
@cowtowncoder Hi, may I ask the situation of this fix getting released? Just ran to it and can work around it by handling Object differently, but I would like to avoid setting that setIncludeLangObject flag to true. Anyways, nice work with this lib!
TeemuStenhammar unfortunately I am quite swamped with work on multiple libraries, so haven't had a chance to release (there's one bug that was reported recently). But I'll go ahead and release 1.3.2 now, with just this fix, to ensure it's out.
Pushed 1.3.2 out, should sync to Maven Central within an hour or so.
Well, that was quick. Thank you!
I am using classmate 1.3.1 and I get an exception when executing the following code:
TypeResolver resolver = new TypeResolver();
MemberResolver memberResolver = new MemberResolver(resolver);
ResolvedType type = resolver.resolve(Object.class);
memberResolver.resolve(type, null, null);
The exception is:
java.lang.ArrayIndexOutOfBoundsException: 0
at com.fasterxml.classmate.MemberResolver.resolve(MemberResolver.java:137)
...
It is interesting, because MemberResolver works on interfaces, abstract classes and annotations too, and it seems only the Object class is too much for it.