IllegalArgumentException in highlights

Sven Reimers sven.reimers at gmail.com
Thu Jun 12 18:39:00 UTC 2025


Hi,

working on highlighting in JTaccuino I found

Caused by: java.lang.IllegalArgumentException
at
jdk.compiler/com.sun.tools.javac.util.JCDiagnostic.<init>(JCDiagnostic.java:647)
at
jdk.compiler/com.sun.tools.javac.util.JCDiagnostic.<init>(JCDiagnostic.java:627)
at
jdk.compiler/com.sun.tools.javac.util.JCDiagnostic$Factory.create(JCDiagnostic.java:301)
at
jdk.compiler/com.sun.tools.javac.util.JCDiagnostic$Factory.error(JCDiagnostic.java:114)
at
jdk.compiler/com.sun.tools.javac.util.AbstractLog.error(AbstractLog.java:145)
at
jdk.compiler/com.sun.tools.javac.parser.JavaTokenizer.lexError(JavaTokenizer.java:202)
at
jdk.compiler/com.sun.tools.javac.parser.JavaTokenizer.scanString(JavaTokenizer.java:468)
at
jdk.compiler/com.sun.tools.javac.parser.JavaTokenizer.readToken(JavaTokenizer.java:1015)
at
jdk.compiler/com.sun.tools.javac.parser.Scanner.nextToken(Scanner.java:124)
at
jdk.jshell/jdk.jshell.SourceCodeAnalysisImpl.lambda$highlights$0(SourceCodeAnalysisImpl.java:647)
at jdk.jshell/jdk.jshell.TaskFactory.lambda$runTask$1(TaskFactory.java:218)
at
jdk.compiler/com.sun.tools.javac.api.JavacTaskPool.getTask(JavacTaskPool.java:193)
at jdk.jshell/jdk.jshell.TaskFactory.runTask(TaskFactory.java:211)
at jdk.jshell/jdk.jshell.TaskFactory.analyze(TaskFactory.java:180)
at jdk.jshell/jdk.jshell.TaskFactory.analyze(TaskFactory.java:166)
at jdk.jshell/jdk.jshell.TaskFactory.analyze(TaskFactory.java:155)
at
jdk.jshell/jdk.jshell.SourceCodeAnalysisImpl.highlights(SourceCodeAnalysisImpl.java:618)

happening, when a snippet is sent with a not closed quoted string, e.g.

System.out.println("

I assume this should not happen?

Thanks

Sven

-- 
Sven Reimers

* Java Champion
* Apache NetBeans PMC: http://netbeans.apache.org
* JUG Leader JUG Bodensee: https://www.meetup.com/JUG-Bodensee
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/kulla-dev/attachments/20250612/1e64717c/attachment-0001.htm>


More information about the kulla-dev mailing list