Skip to content

Commit

Permalink
Map compiler.err.limit.string & compiler.err.limit.string.overflow pb
Browse files Browse the repository at this point in the history
  • Loading branch information
mickaelistria committed Dec 5, 2024
1 parent 4aeb8fb commit 0ba054e
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,21 @@
import com.sun.tools.javac.api.JavacTrees;
import com.sun.tools.javac.code.Flags;
import com.sun.tools.javac.code.Kinds;
import com.sun.tools.javac.code.Kinds.KindName;
import com.sun.tools.javac.code.Symbol;
import com.sun.tools.javac.code.Type;
import com.sun.tools.javac.code.TypeTag;
import com.sun.tools.javac.code.Kinds.KindName;
import com.sun.tools.javac.code.Symbol.ClassSymbol;
import com.sun.tools.javac.code.Symbol.MethodSymbol;
import com.sun.tools.javac.code.Symbol.VarSymbol;
import com.sun.tools.javac.code.Type;
import com.sun.tools.javac.code.Type.ClassType;
import com.sun.tools.javac.code.TypeTag;
import com.sun.tools.javac.parser.Scanner;
import com.sun.tools.javac.parser.ScannerFactory;
import com.sun.tools.javac.parser.Tokens.Token;
import com.sun.tools.javac.parser.Tokens.TokenKind;
import com.sun.tools.javac.tree.EndPosTable;
import com.sun.tools.javac.tree.JCTree;
import com.sun.tools.javac.tree.TreeInfo;
import com.sun.tools.javac.tree.JCTree.JCAnnotation;
import com.sun.tools.javac.tree.JCTree.JCAssign;
import com.sun.tools.javac.tree.JCTree.JCBlock;
Expand All @@ -72,13 +73,12 @@
import com.sun.tools.javac.tree.JCTree.JCPrimitiveTypeTree;
import com.sun.tools.javac.tree.JCTree.JCReturn;
import com.sun.tools.javac.tree.JCTree.JCVariableDecl;
import com.sun.tools.javac.tree.TreeInfo;
import com.sun.tools.javac.util.Context;
import com.sun.tools.javac.util.DiagnosticSource;
import com.sun.tools.javac.util.JCDiagnostic;
import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition;
import com.sun.tools.javac.util.Log;
import com.sun.tools.javac.util.Position;
import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition;

public class JavacProblemConverter {
private static final String COMPILER_ERR_MISSING_RET_STMT = "compiler.err.missing.ret.stmt";
Expand Down Expand Up @@ -869,6 +869,8 @@ yield switch (rootCauseCode) {
case "compiler.warn.restricted.type.not.allowed" -> IProblem.RestrictedTypeName;
case "compiler.err.override.weaker.access" -> IProblem.MethodReducesVisibility;
case "compiler.err.enum.constant.expected" -> IProblem.Syntax;
case "compiler.err.limit.string" -> IProblem.TooManyBytesForStringConstant;
case "compiler.err.limit.string.overflow" -> IProblem.StringConstantIsExceedingUtf8Limit;
// next are javadoc; defaulting to JavadocUnexpectedText when no better problem could be found
case "compiler.err.dc.bad.entity" -> IProblem.JavadocUnexpectedText;
case "compiler.err.dc.bad.inline.tag" -> IProblem.JavadocUnexpectedText;
Expand Down

0 comments on commit 0ba054e

Please sign in to comment.