Skip to content

Testfailures for Java 8 annotations #91

Open
@schauder

Description

@schauder

Given the following class:

public class ClassWithTypeAnnotations // implements clause:
implements @TypeAnno1 ClassWithTypeParam<@TypeAnno2 T> {

//    Class instance creation expression:
private Object x = new @TypeAnno3 Object();

private @TypeAnno6 Object str = "Hallo";

//    Type cast:
public String myString = (@TypeAnno4 String) str;

//    Thrown exception declaration:
public void throwsAnnotatedException() throws @TypeAnno5 SQLException {
}

@Override
public @TypeAnno2 T doSomething() {
    try{
        @TypeAnno8 String local = new String();

    } catch (@TypeAnno7 RuntimeException re){

    }

    return null;
}

}

there should be dependencies from ClassWithTypeAnnotations to TypeAnno8 and TypeAnno7
but there aren't. So annotations on local variables and on catch blocks don't get found properly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions