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

Inherited is not respected when java.lang.annotation.Inherited not in the filter or URLs. #141

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create two classes like this:

package test;
import org.junit.Runner.RunWith;

@RunWith(JUnit4.class)
public class ParentClass {
}

public class ChildClass {

}

2. Create a Reflections such that java.lang.annotation.Inherited is either 
filtered out or is not present in the URLs:

Reflections reflections = new Reflections(
  new ConfigurationBuilder()
   .setUrls(ClasspathHelper.forPackage("test"))
   .filterInputsBy(whatever)
  );
//Note that EITHER the setUrls or filterInputsBy line will cause this problem.

3. Make a query that involves inheritance:

results = reflections.getTypesAnnotatedWith(RunWith.class, true);

What is the expected output? What do you see instead?

I would expect results to include ChildClass. Instead, I see only ParentClass.

What version of the product are you using? On what operating system?

0.9.5

Please provide any additional information below.

It appears to be because the Store uses its own filtered database to check on 
Inherited being present.

Original issue reported on code.google.com by yarbro...@google.com on 22 Jan 2013 at 11:04

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
0.9.5 ?!

Original comment by ronm...@gmail.com on 23 Jan 2013 at 7:13

GoogleCodeExporter commented 8 years ago

Original comment by ronm...@gmail.com on 20 Feb 2013 at 9:16