mukteshkrmishra / reflections

Automatically exported from code.google.com/p/reflections
Do What The F*ck You Want To Public License
0 stars 0 forks source link

Support Java8 #178

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Use the Java 8 stream api like this:
   someList.stream().map(e -> e.export()).collect(toList());
2. Configure the code that uses reflection like this:
    ConfigurationBuilder cfgBldr = new ConfigurationBuilder();
        FilterBuilder filterBuilder = new FilterBuilder();
        for (String basePkg : basePackages) {
            cfgBldr.addUrls(ClasspathHelper.forPackage(basePkg));
            filterBuilder.include(FilterBuilder.prefix(basePkg));
        }

        cfgBldr.filterInputsBy(filterBuilder).setScanners(
                new SubTypesScanner(), new TypeAnnotationsScanner());
        this.reflections = new Reflections(cfgBldr);
 (from https://github.com/HubSpot/dropwizard-guice/blob/master/src/main/java/com/hubspot/dropwizard/guice/AutoConfig.java)
What is the expected output? What do you see instead?
The class that uses the stream() call should be properly scanned. Instead I get:
! java.io.IOException: invalid constant type: 18
! at javassist.bytecode.ConstPool.readOne(ConstPool.java:1090) 
~[javassist-3.12.1.GA.jar:na]

What version of the product are you using? On what operating system?
reflections-0.9.8, javassist 3.12.1.GA

Please provide any additional information below.
With this fix: https://issues.jboss.org/browse/JASSIST-174 javassist got 
support for this constant. So with 3.18.2-GA this error doesn't occur.

Original issue reported on code.google.com by jonatan....@softhouse.se on 12 Jun 2014 at 12:55

GoogleCodeExporter commented 8 years ago
This is a duplicate of Issue 169 and Issue 170.

Original comment by stephan...@gmail.com on 12 Jun 2014 at 9:15