You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Laszlo Kishalmi (JIRA)" <ji...@apache.org> on 2019/02/27 15:23:00 UTC

[jira] [Updated] (NETBEANS-194) JShell integration causes NULL Pointer exception on JDK9

     [ https://issues.apache.org/jira/browse/NETBEANS-194?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Laszlo Kishalmi updated NETBEANS-194:
-------------------------------------
    Fix Version/s: 9.0

> JShell integration causes NULL Pointer exception on JDK9
> --------------------------------------------------------
>
>                 Key: NETBEANS-194
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-194
>             Project: NetBeans
>          Issue Type: Bug
>          Components: java - JShell
>    Affects Versions: 9.0
>            Reporter: Matthias Bläsing
>            Assignee: Matthias Bläsing
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 9.0
>
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> I ran netbeans with JDK 9.0.1 and tested the JShell integration. While running it, I received two NullPointerExceptions:
> *Steps to reproduce:*
> - run netbeans with JDK 9.0.1: {{ant -Dnbjdk.home=<JDK9> tryme}}
> - Create a "Java Application" project.
> - Choose "Execute Java Shell"
> - Observe the output in the console
> *Result 1: Exception instead of JShell:*
> {noformat}
>      [exec] java.lang.NullPointerException
>      [exec] 	at org.netbeans.modules.jshell.support.ShellSession.customizeBuilderOnJDK9(ShellSession.java:787)
>      [exec] 	at org.netbeans.modules.jshell.support.ShellSession.customizeBuilder(ShellSession.java:743)
>      [exec] 	at org.netbeans.modules.jshell.support.ShellSession.access$700(ShellSession.java:148)
>      [exec] 	at org.netbeans.modules.jshell.support.ShellSession$Launcher.makeBuilder(ShellSession.java:623)
>      [exec] 	at org.netbeans.modules.jshell.tool.JShellLauncher.createJShellInstance(JShellLauncher.java:250)
>      [exec] 	at org.netbeans.modules.jshell.support.ShellSession$Launcher.createJShellInstance(ShellSession.java:628)
>      [exec] 	at org.netbeans.modules.jshell.tool.JShellTool.resetState(JShellTool.java:745)
>      [exec] 	at org.netbeans.modules.jshell.tool.JShellLauncher.resetState(JShellLauncher.java:207)
>      [exec] 	at org.netbeans.modules.jshell.tool.JShellLauncher.ensureLive(JShellLauncher.java:195)
>      [exec] 	at org.netbeans.modules.jshell.tool.JShellLauncher.getJShell(JShellLauncher.java:201)
>      [exec] 	at org.netbeans.modules.jshell.support.ShellSession.initJShell(ShellSession.java:830)
>      [exec] 	at org.netbeans.modules.jshell.support.ShellSession.getJShell(ShellSession.java:314)
>      [exec] [catch] at org.netbeans.modules.jshell.support.ShellSession.lambda$null$2(ShellSession.java:519)
>      [exec] 	at org.netbeans.modules.jshell.model.ConsoleModel$ModelAccImpl.execute(ConsoleModel.java:1104)
>      [exec] 	at org.netbeans.modules.jshell.support.ShellSession.lambda$start$3(ShellSession.java:515)
>      [exec] 	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
>      [exec] 	at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
>      [exec] 	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
>      [exec] 	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
> {noformat}
> *After fix (return empty list instead of NULL):*
> {noformat}
>      [exec] java.lang.NullPointerException
>      [exec] 	at org.netbeans.modules.jshell.env.JShellEnvironment.customizeJShell(JShellEnvironment.java:270)
>      [exec] 	at org.netbeans.modules.jshell.support.ShellSession.customizeBuilder(ShellSession.java:745)
>      [exec] 	at org.netbeans.modules.jshell.support.ShellSession.access$700(ShellSession.java:148)
>      [exec] 	at org.netbeans.modules.jshell.support.ShellSession$Launcher.makeBuilder(ShellSession.java:623)
>      [exec] 	at org.netbeans.modules.jshell.tool.JShellLauncher.createJShellInstance(JShellLauncher.java:250)
>      [exec] 	at org.netbeans.modules.jshell.support.ShellSession$Launcher.createJShellInstance(ShellSession.java:628)
>      [exec] 	at org.netbeans.modules.jshell.tool.JShellTool.resetState(JShellTool.java:745)
>      [exec] 	at org.netbeans.modules.jshell.tool.JShellLauncher.resetState(JShellLauncher.java:207)
>      [exec] 	at org.netbeans.modules.jshell.tool.JShellLauncher.ensureLive(JShellLauncher.java:195)
>      [exec] 	at org.netbeans.modules.jshell.tool.JShellLauncher.getJShell(JShellLauncher.java:201)
>      [exec] 	at org.netbeans.modules.jshell.support.ShellSession.initJShell(ShellSession.java:830)
>      [exec] 	at org.netbeans.modules.jshell.support.ShellSession.getJShell(ShellSession.java:314)
>      [exec] [catch] at org.netbeans.modules.jshell.support.ShellSession.lambda$null$2(ShellSession.java:519)
>      [exec] 	at org.netbeans.modules.jshell.model.ConsoleModel$ModelAccImpl.execute(ConsoleModel.java:1104)
>      [exec] 	at org.netbeans.modules.jshell.support.ShellSession.lambda$start$3(ShellSession.java:515)
>      [exec] 	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
>      [exec] 	at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
>      [exec] 	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
>      [exec] 	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
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