diff --git a/src/main/java/pico/inference/PICOInferenceAnnotatedTypeFactory.java b/src/main/java/pico/inference/PICOInferenceAnnotatedTypeFactory.java index ed172c5..c2eb390 100644 --- a/src/main/java/pico/inference/PICOInferenceAnnotatedTypeFactory.java +++ b/src/main/java/pico/inference/PICOInferenceAnnotatedTypeFactory.java @@ -115,7 +115,7 @@ public AnnotatedDeclaredType getSelfType(Tree tree) { AnnotatedDeclaredType type = getAnnotatedType(enclosingClass); MethodTree enclosingMethod = TreePathUtil.enclosingMethod(path); - if (!enclosingClass.getSimpleName().isEmpty() && enclosingMethod != null) { + if (enclosingClass.getSimpleName().length() != 0 && enclosingMethod != null) { AnnotatedTypeMirror.AnnotatedDeclaredType methodReceiver; if (TreeUtils.isConstructor(enclosingMethod)) { methodReceiver =