You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by jl...@apache.org on 2018/03/14 04:14:53 UTC
[incubator-netbeans] branch master updated: Not using the
Log.error(..., String, ...) variant,
as that does not exist in JDK mainline anymore.
This is an automated email from the ASF dual-hosted git repository.
jlahoda pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-netbeans.git
The following commit(s) were added to refs/heads/master by this push:
new 36db21a Not using the Log.error(..., String, ...) variant, as that does not exist in JDK mainline anymore.
36db21a is described below
commit 36db21a3964c2b808c081b30d06dedb4f3426c27
Author: Jan Lahoda <jl...@netbeans.org>
AuthorDate: Fri Mar 2 08:00:47 2018 +0100
Not using the Log.error(..., String, ...) variant, as that does not exist in JDK mainline anymore.
---
.../org/netbeans/modules/java/source/PostFlowAnalysis.java | 11 ++++++-----
.../java/source/nbjavac/parsing/PartialReparserService.java | 6 ++++--
2 files changed, 10 insertions(+), 7 deletions(-)
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 edf0f31..342ab39 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 javax.tools.JavaFileObject;
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 class PostFlowAnalysis extends TreeScanner {
&& !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 @@ public class PostFlowAnalysis extends TreeScanner {
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 @@ public class PostFlowAnalysis extends TreeScanner {
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 @@ public class PostFlowAnalysis extends TreeScanner {
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 30ed25d..e9e48aa 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.JCTree.JCVariableDecl;
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 class PartialReparserService {
// 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);
--
To stop receiving notification emails like this one, please contact
jlahoda@apache.org.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists