--- src/org/netbeans/api/java/source/GeneratorUtilities.java +++ src/org/netbeans/api/java/source/GeneratorUtilities.java @@ -408,12 +408,7 @@ assert name.length() > 0; TypeMirror type = copy.getTypes().asMemberOf((DeclaredType)clazz.asType(), field); StringBuilder sb = getCapitalizedName(name); - boolean isBooleanType = false; - if (type instanceof DeclaredType) { - isBooleanType = copy.getElements().getTypeElement("java.lang.Boolean").equals(((DeclaredType) type).asElement()); // NOI18N - } else { - isBooleanType = type.getKind() == TypeKind.BOOLEAN; - } + boolean isBooleanType = type.getKind() == TypeKind.BOOLEAN; sb.insert(0, isBooleanType ? "is" : "get"); //NOI18N BlockTree body = make.Block(Collections.singletonList(make.Return(make.Identifier(name))), false); return make.Method(make.Modifiers(mods), sb, make.Type(type), Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), body, null);