You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Jacek Laskowski (JIRA)" <ji...@apache.org> on 2008/03/28 18:22:25 UTC
[jira] Created: (FELIX-525) NPE when Ctrl-C at the "Enter profile
name:" prompt
NPE when Ctrl-C at the "Enter profile name:" prompt
---------------------------------------------------
Key: FELIX-525
URL: https://issues.apache.org/jira/browse/FELIX-525
Project: Felix
Issue Type: Bug
Components: Framework
Reporter: Jacek Laskowski
jlaskowski@dev /cygdrive/c/apps/felix
$ java -jar bin/felix.jar
Welcome to Felix.
=================
Enter profile name: (press Ctrl-C here)
Exception in thread "main" java.lang.NullPointerException
at org.apache.felix.main.Main.main(Main.java:205)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (FELIX-525) NPE when Ctrl-C at the "Enter profile
name:" prompt
Posted by "Stuart McCulloch (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12583987#action_12583987 ]
Stuart McCulloch commented on FELIX-525:
----------------------------------------
Looking at the code, Main.java:205 is the following check:
if (profileName.length() != 0)
where profileName was read from a BufferedReader - so it looks
as though the Ctrl-C has interrupted the readLine method but not
caused an IOException...
if we wanted to be really paranoid then we could change the catch
to be Exception instead of IOException, and also add a null check
for the profileName test on line 205
but it would be better if we could recreate this and work out exactly
what's going on (Jacek - if you can easily reproduce this then you
might want to try compiling Felix from the latest sources and add
some println's to find out if it's throwing a different exception from
the readLine method...)
> NPE when Ctrl-C at the "Enter profile name:" prompt
> ---------------------------------------------------
>
> Key: FELIX-525
> URL: https://issues.apache.org/jira/browse/FELIX-525
> Project: Felix
> Issue Type: Bug
> Components: Framework
> Reporter: Jacek Laskowski
>
> jlaskowski@dev /cygdrive/c/apps/felix
> $ java -jar bin/felix.jar
> Welcome to Felix.
> =================
> Enter profile name: (press Ctrl-C here)
> Exception in thread "main" java.lang.NullPointerException
> at org.apache.felix.main.Main.main(Main.java:205)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (FELIX-525) NPE when Ctrl-C at the "Enter profile
name:" prompt
Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-525?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Richard S. Hall reassigned FELIX-525:
-------------------------------------
Assignee: Richard S. Hall
> NPE when Ctrl-C at the "Enter profile name:" prompt
> ---------------------------------------------------
>
> Key: FELIX-525
> URL: https://issues.apache.org/jira/browse/FELIX-525
> Project: Felix
> Issue Type: Bug
> Components: Framework
> Reporter: Jacek Laskowski
> Assignee: Richard S. Hall
>
> jlaskowski@dev /cygdrive/c/apps/felix
> $ java -jar bin/felix.jar
> Welcome to Felix.
> =================
> Enter profile name: (press Ctrl-C here)
> Exception in thread "main" java.lang.NullPointerException
> at org.apache.felix.main.Main.main(Main.java:205)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (FELIX-525) NPE when Ctrl-C at the "Enter profile
name:" prompt
Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12583787#action_12583787 ]
Richard S. Hall commented on FELIX-525:
---------------------------------------
Hmmm. I tried under JDK 1.4 and 1.6:
Welcome to Felix.
=================
Enter profile name:
heavy:felix-trunk/main$ java -jar bin/felix.jar
Welcome to Felix.
=================
Enter profile name: heavy:felix-trunk/main$
Worked ok in both cases. Which platform are you using? I am testing on Fedora.
> NPE when Ctrl-C at the "Enter profile name:" prompt
> ---------------------------------------------------
>
> Key: FELIX-525
> URL: https://issues.apache.org/jira/browse/FELIX-525
> Project: Felix
> Issue Type: Bug
> Components: Framework
> Reporter: Jacek Laskowski
>
> jlaskowski@dev /cygdrive/c/apps/felix
> $ java -jar bin/felix.jar
> Welcome to Felix.
> =================
> Enter profile name: (press Ctrl-C here)
> Exception in thread "main" java.lang.NullPointerException
> at org.apache.felix.main.Main.main(Main.java:205)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (FELIX-525) NPE when Ctrl-C at the "Enter profile
name:" prompt
Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-525?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Richard S. Hall resolved FELIX-525.
-----------------------------------
Resolution: Fixed
Clement was able to reproduce this issue on his Vista machine. We could see no real way to detect the error, so I just check for profileName to be null and then process it as an empty string; although it might also be reasonable to treat this situation as an error that causes an abort. Seems weird though that this can happen...I think it sounds like a Java bug. Regardless, Jacek please close this issue if everything is good.
> NPE when Ctrl-C at the "Enter profile name:" prompt
> ---------------------------------------------------
>
> Key: FELIX-525
> URL: https://issues.apache.org/jira/browse/FELIX-525
> Project: Felix
> Issue Type: Bug
> Components: Framework
> Reporter: Jacek Laskowski
> Assignee: Richard S. Hall
>
> jlaskowski@dev /cygdrive/c/apps/felix
> $ java -jar bin/felix.jar
> Welcome to Felix.
> =================
> Enter profile name: (press Ctrl-C here)
> Exception in thread "main" java.lang.NullPointerException
> at org.apache.felix.main.Main.main(Main.java:205)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.