This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 269878 - NPE when starting JShell on JDK9
Summary: NPE when starting JShell on JDK9
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: JShell (show other bugs)
Version: 8.2
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-20 14:59 UTC by Jiri Prox
Modified: 2017-05-05 12:26 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Prox 2017-02-20 14:59:28 UTC
When JShell console is opened, there is written NPE stack trace (before the system informations). The JShell seems to works fine.


Unexpected exception reading start-up: java.lang.NullPointerException
java.lang.NullPointerException
	at java.util.regex.Matcher.getTextLength(Matcher.java:1283)
	at java.util.regex.Matcher.reset(Matcher.java:309)
	at java.util.regex.Matcher.<init>(Matcher.java:229)
	at java.util.regex.Pattern.matcher(Pattern.java:1093)
	at java.util.regex.Pattern.split(Pattern.java:1206)
	at java.util.regex.Pattern.split(Pattern.java:1273)
	at jdk.jshell.Util.expunge(Util.java:79)
	at jdk.jshell.Unit.computeQualifiedParameterTypes(Unit.java:446)
	at jdk.jshell.Unit.checkForOverwrite(Unit.java:400)
	at jdk.jshell.Unit.setStatus(Unit.java:258)
	at jdk.jshell.Eval.lambda$compileAndLoad$44(Eval.java:652)
	at java.util.Iterator.forEachRemaining(Iterator.java:116)
	at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
	at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580)
	at jdk.jshell.Eval.compileAndLoad(Eval.java:652)
	at jdk.jshell.Eval.declare(Eval.java:538)
	at jdk.jshell.Eval.eval(Eval.java:118)
	at jdk.jshell.JShell.eval(JShell.java:441)
	at org.netbeans.modules.jshell.tool.JShellTool.processCompleteSource(JShellTool.java:2446)
	at org.netbeans.modules.jshell.tool.JShellTool.processSource(JShellTool.java:2434)
	at org.netbeans.modules.jshell.tool.JShellTool.processSourceCatchingReset(JShellTool.java:935)
	at org.netbeans.modules.jshell.tool.JShellTool.process(JShellTool.java:920)
	at org.netbeans.modules.jshell.tool.JShellTool.run(JShellTool.java:902)
	at org.netbeans.modules.jshell.tool.JShellTool.startUpRun(JShellTool.java:847)
	at org.netbeans.modules.jshell.tool.JShellTool.resetState(JShellTool.java:787)
	at org.netbeans.modules.jshell.tool.JShellLauncher.resetState(JShellLauncher.java:226)
	at org.netbeans.modules.jshell.tool.JShellLauncher.ensureLive(JShellLauncher.java:214)
	at org.netbeans.modules.jshell.tool.JShellLauncher.getJShell(JShellLauncher.java:220)
	at org.netbeans.modules.jshell.support.ShellSession.initJShell(ShellSession.java:773)
	at org.netbeans.modules.jshell.support.ShellSession.getJShell(ShellSession.java:332)
	at org.netbeans.modules.jshell.support.ShellSession.lambda$null$123(ShellSession.java:537)
	at org.netbeans.modules.jshell.model.ConsoleModel$ModelAccImpl.execute(ConsoleModel.java:1127)
	at org.netbeans.modules.jshell.support.ShellSession.lambda$start$124(ShellSession.java:533)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1443)
	at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68)
	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:303)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2058)
Comment 1 Svata Dedic 2017-02-20 15:11:21 UTC
JShell within NB IDE running on JDK9 is unsupported in 8.2 release. Such scenario will be supported in NB9 and is being worked on right now.
Comment 2 Svata Dedic 2017-05-05 12:12:39 UTC
does no happen with NetBeans 9
Comment 3 Svata Dedic 2017-05-05 12:26:03 UTC
Seems to work OK (NB 9 trunk, Win 7 32bit)