PT #166343444: Type hierarchy for anonymous inner types
This commit is contained in:
@@ -182,6 +182,27 @@ public class JavaLangugeClientTest {
|
||||
assertEquals(expected, actual);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void anonymousInnerType_SuperTypes() throws Exception {
|
||||
List<TypeDescriptorData> data = client
|
||||
.javaSuperTypes(new JavaTypeHierarchyParams(project.getLocationURI().toString(), "org.test.Application$1", false))
|
||||
.get(1000000000, TimeUnit.SECONDS);
|
||||
assertNotNull(data);
|
||||
Set<String> actual = data.stream().map(t -> t.getFqName()).collect(Collectors.toSet());
|
||||
Set<String> expected = new HashSet<>(Arrays.asList(
|
||||
"org.springframework.scheduling.concurrent.ConcurrentTaskScheduler",
|
||||
"java.util.concurrent.Executor",
|
||||
"org.springframework.scheduling.SchedulingTaskExecutor",
|
||||
"org.springframework.core.task.AsyncTaskExecutor",
|
||||
"org.springframework.scheduling.concurrent.ConcurrentTaskExecutor",
|
||||
"org.springframework.scheduling.TaskScheduler",
|
||||
"org.springframework.core.task.TaskExecutor",
|
||||
"org.springframework.core.task.AsyncListenableTaskExecutor",
|
||||
"java.lang.Object"
|
||||
));
|
||||
assertEquals(expected, actual);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void arrayList_SuperTypes_with_Itself() throws Exception {
|
||||
List<TypeDescriptorData> data = client
|
||||
|
||||
@@ -4,6 +4,7 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.scheduling.concurrent.ConcurrentTaskScheduler;
|
||||
|
||||
@SpringBootApplication
|
||||
public class Application {
|
||||
@@ -13,5 +14,11 @@ public class Application {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(Application.class);
|
||||
}
|
||||
|
||||
ConcurrentTaskScheduler sched() {
|
||||
return new ConcurrentTaskScheduler() {
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user