pkt1583 / 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

reflections v0.9.9 and java8 throw an warning for lambda/interface with default mehotds. #184

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. define a class with the follow method:
    class SchemaValidationHelper {

       private static Source[] asSourceArray(List<URL> xsdUrls) throws IOException {

    Source[] array = xsdUrls.stream().map((URL xsdUrl) -> {
          try {
                return new StreamSource(xsdUrl.openStream());
          } catch (Exception e) {
                throw new RuntimeException(e);
            }
          }).toArray(Source[] :: new);
        }

    }

2. run mvn clean install or run a test for this class(or that use this class) 
and I'll get an warning 
   [WARNING] could not scan file /Users/admin/work/projects/sources/.../target/classes/com/coresuite/dc/rulesengine/util/SchemaValidationHelper.class with scanner SubTypesScanner
org.reflections.ReflectionsException: could not create class file from 
SchemaValidationHelper.class
    at org.reflections.scanners.AbstractScanner.scan(AbstractScanner.java:30)
    at org.reflections.Reflections.scan(Reflections.java:217)
    at org.reflections.Reflections.scan(Reflections.java:166)
    at org.reflections.Reflections.<init>(Reflections.java:94)
    at org.reflections.maven.plugin.ReflectionsMojo.execute(ReflectionsMojo.java:148)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)

3. the code compile/run the only thing that upset me is this warning 

What is the expected output? What do you see instead? I expect to not see this 
warning

What version of the product are you using? On what operating system? use 
    - reflections version 0.9.9 
    - java version "1.8.0_25"
      Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
      Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
    - Mac OS.

Please provide any additional information below.

Original issue reported on code.google.com by srncris...@gmail.com on 26 Nov 2014 at 2:56

Attachments:

GoogleCodeExporter commented 8 years ago
add last version of refection maven plugin (0.9.9-RC2) fix this problem.

Original comment by srncris...@gmail.com on 28 Nov 2014 at 8:16