< prev index next >

src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java

Print this page
@@ -1697,11 +1697,11 @@
                                  newdefs.append(t);
                              break;
                          case METHODDEF:
                              if (isInterface ||
                                  (((JCMethodDecl) t).mods.flags & (Flags.PROTECTED|Flags.PUBLIC)) != 0 ||
-                                 ((JCMethodDecl) t).sym.name == names.init ||
+                                 names.isInitOrVNew(((JCMethodDecl) t).sym.name) ||
                                  (((JCMethodDecl) t).mods.flags & (Flags.PRIVATE)) == 0 && ((JCMethodDecl) t).sym.packge().getQualifiedName() == names.java_lang)
                                  newdefs.append(t);
                              break;
                          case VARDEF:
                              if (isInterface || (((JCVariableDecl) t).mods.flags & (Flags.PROTECTED|Flags.PUBLIC)) != 0 ||
< prev index next >