jlahoda closed pull request #452: Not using the Log.error(..., String, ...) 
variant, as that does not e…
URL: https://github.com/apache/incubator-netbeans/pull/452
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/java.source.base/src/org/netbeans/modules/java/source/PostFlowAnalysis.java 
b/java.source.base/src/org/netbeans/modules/java/source/PostFlowAnalysis.java
index edf0f3137..342ab3990 100644
--- 
a/java.source.base/src/org/netbeans/modules/java/source/PostFlowAnalysis.java
+++ 
b/java.source.base/src/org/netbeans/modules/java/source/PostFlowAnalysis.java
@@ -49,6 +49,7 @@
 
 import com.sun.tools.javac.code.Symtab;
 import com.sun.tools.javac.code.TypeTag;
+import com.sun.tools.javac.util.JCDiagnostic.Error;
 
 /**
  *
@@ -149,7 +150,7 @@ public void visitMethodDef(JCMethodDecl tree) {
                         && !type.isErroneous()
                         && types.isSameType(types.erasure(sym.type), type);
                 if (clash) {
-                    log.error(tree.pos(), "name.clash.same.erasure", tree.sym, 
sym); //NOI18N
+                    log.error(tree.pos(), new Error("compiler", 
"name.clash.same.erasure", tree.sym, sym)); //NOI18N
                     return;
                 }
             } catch (AssertionError e) {}
@@ -199,7 +200,7 @@ private void checkThis(DiagnosticPosition pos, TypeSymbol 
c) {
         if (checkThis && currentClass != c) {
             List<Pair<TypeSymbol, Symbol>> ots = outerThisStack;
             if (ots.isEmpty()) {
-                log.error(pos, "no.encl.instance.of.type.in.scope", c); 
//NOI18N
+                log.error(pos, new Error("compiler", 
"no.encl.instance.of.type.in.scope", c)); //NOI18N
                 return;
             }
             Pair<TypeSymbol, Symbol> ot = ots.head;
@@ -208,13 +209,13 @@ private void checkThis(DiagnosticPosition pos, TypeSymbol 
c) {
                 do {
                     ots = ots.tail;
                     if (ots.isEmpty()) {
-                        log.error(pos, "no.encl.instance.of.type.in.scope", 
c); //NOI18N
+                        log.error(pos, new Error("compiler", 
"no.encl.instance.of.type.in.scope", c)); //NOI18N
                         return;
                     }
                     ot = ots.head;
                 } while (ot.snd != otc);
                 if (otc.owner.kind != Kinds.Kind.PCK && 
!otc.hasOuterInstance()) {
-                    log.error(pos, "cant.ref.before.ctor.called", c); //NOI18N
+                    log.error(pos, new Error("compiler", 
"cant.ref.before.ctor.called", c)); //NOI18N
                     return;
                 }
                 otc = ot.fst;
@@ -230,6 +231,6 @@ private void outerThisDef(Symbol owner) {
     
     private void checkStringConstant(DiagnosticPosition pos, Object 
constValue) {
         if (constValue instanceof String && ((String)constValue).length() >= 
Pool.MAX_STRING_LENGTH)
-            log.error(pos, "limit.string"); //NOI18N
+            log.error(pos, new Error("compiler", "limit.string")); //NOI18N
     }
 }
diff --git 
a/java.source.nbjavac/src/org/netbeans/modules/java/source/nbjavac/parsing/PartialReparserService.java
 
b/java.source.nbjavac/src/org/netbeans/modules/java/source/nbjavac/parsing/PartialReparserService.java
index 30ed25d63..e9e48aa76 100644
--- 
a/java.source.nbjavac/src/org/netbeans/modules/java/source/nbjavac/parsing/PartialReparserService.java
+++ 
b/java.source.nbjavac/src/org/netbeans/modules/java/source/nbjavac/parsing/PartialReparserService.java
@@ -47,6 +47,7 @@
 import com.sun.tools.javac.tree.TreeInfo;
 import com.sun.tools.javac.tree.TreeMaker;
 import com.sun.tools.javac.util.Context;
+import com.sun.tools.javac.util.JCDiagnostic.Error;
 import com.sun.tools.javac.util.List;
 import com.sun.tools.javac.util.Log;
 import com.sun.tools.javac.util.Names;
@@ -171,8 +172,9 @@ public BlockTree reattrMethodBody(MethodTree 
methodToReparse, BlockTree block) {
                 // in enum constructors, except in the compiler
                 // generated one.
                 log.error(tree.body.stats.head.pos(),
-                          "call.to.super.not.allowed.in.enum.ctor",
-                          env.enclClass.sym);
+                          new Error("compiler",
+                                    "call.to.super.not.allowed.in.enum.ctor",
+                                    env.enclClass.sym));
                     }
                 }
         attr.attribStat((JCBlock)block, env);


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to