mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-10 01:09:46 +07:00
18 lines
600 B
Java
18 lines
600 B
Java
// "Replace Optional.isPresent() condition with functional style expression" "INFORMATION"
|
|
|
|
import java.lang.annotation.Annotation;
|
|
import java.lang.reflect.AnnotatedElement;
|
|
import java.util.Optional;
|
|
|
|
public class Main<T> {
|
|
public static <A extends Annotation> Optional<A> findAnnotation(Optional<? extends AnnotatedElement> element) {
|
|
if (element.isPre<caret>sent()) {
|
|
return Optional.empty();
|
|
}
|
|
return findAnnotation((AnnotatedElement)null);
|
|
}
|
|
|
|
private static <A extends Annotation> Optional<A> findAnnotation(AnnotatedElement element) {
|
|
return Optional.empty();
|
|
}
|
|
} |