You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During the pr #3200 i found this "interesting" behavior.
` @test
public void showBug() {
Launcher spoon = new Launcher();
spoon.addInputResource("src/test/resources/deprecated/input");
CtModel model = spoon.buildModel();
Collection<CtExecutable<?>> list = new HashSet<>();
model.getElements(new TypeFilter<>(CtInvocation.class))
.forEach(v -> list.add(v.getExecutable().getExecutableDeclaration()));
list.removeIf(v -> Objects.isNull(v));
//Filter methods that are not in the code
list.removeIf(v -> !v.getPosition().isValidPosition());
//in jdk 8 size 3
//in jdk 11 size 4
/* jdk8 List
[// should be deleted because only ref in Foo.test3()
@java.lang.Deprecated
public void test3() {
test3();
}, // ref in Foo.test1()
@java.lang.Deprecated
public boolean test2() {
return true;
}, // ref in Bar.test
@java.lang.Deprecated
public void test5() {
}]
*/
/*jdk11 List
[// should be deleted because only ref in Foo.test3()
@java.lang.Deprecated
public void test3() {
test3();
}, // ref in Bar.foo()
@java.lang.Deprecated
public void test4() {
}, // ref in Foo.test1()
@java.lang.Deprecated
public boolean test2() {
return true;
}, // ref in Bar.test
@java.lang.Deprecated
*/
assertEquals(4, list.size());
}`
Maybe somebody wants to debug this issue. If not it's here if somebody finds this behavior during their work and knows that this is an open problem.
The text was updated successfully, but these errors were encountered:
During the pr #3200 i found this "interesting" behavior.
` @test
public void showBug() {
Launcher spoon = new Launcher();
spoon.addInputResource("src/test/resources/deprecated/input");
CtModel model = spoon.buildModel();
Collection<CtExecutable<?>> list = new HashSet<>();
Maybe somebody wants to debug this issue. If not it's here if somebody finds this behavior during their work and knows that this is an open problem.
The text was updated successfully, but these errors were encountered: