You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Guido Spadotto (JIRA)" <ji...@apache.org> on 2009/06/18 00:37:07 UTC
[jira] Created: (FELIX-1251) Looping NullPointerException if the
polled directory is removed after File Install registration
Looping NullPointerException if the polled directory is removed after File Install registration
-----------------------------------------------------------------------------------------------
Key: FELIX-1251
URL: https://issues.apache.org/jira/browse/FELIX-1251
Project: Felix
Issue Type: Bug
Components: File Install
Affects Versions: fileinstall-1.0.0
Reporter: Guido Spadotto
Priority: Minor
If the directory being polled by File Install is removed while File Install is running,
the method DirectoryWatcher.traverse will raise a NullPointerException
when evaluating the condition for its "for" loop (the "list" variable will be null).
This is a possible workaround:
void traverse(Map/* <String, Jar> */ jars, Set configs, File jardir)
{
String list[] = jardir.list();
if (list==null){
ConcurrentModificationException cme = new ConcurrentModificationException("Unable to list "
+this.watchedDirectory+ " contents. Has it been removed after " +
"File Install started?");
throw cme;
}
for (int i = 0; (list!=null) && i < list.length; i++)
{
...
This will not stop the outer loop from logging the Exception though,
which might not be convenient for the end user.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (FELIX-1251) Looping NullPointerException if the
polled directory is removed after File Install registration
Posted by "Guido Spadotto (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-1251?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Guido Spadotto updated FELIX-1251:
----------------------------------
Attachment: patch-1251.txt
Candidate patch. Recreates the watched directory during the traverse method.
> Looping NullPointerException if the polled directory is removed after File Install registration
> -----------------------------------------------------------------------------------------------
>
> Key: FELIX-1251
> URL: https://issues.apache.org/jira/browse/FELIX-1251
> Project: Felix
> Issue Type: Bug
> Components: File Install
> Affects Versions: fileinstall-1.0.0
> Environment: Windows Vista
> Reporter: Guido Spadotto
> Priority: Minor
> Attachments: patch-1251.txt
>
>
> If the directory being polled by File Install is removed while File Install is running,
> the method DirectoryWatcher.traverse will raise a NullPointerException
> when evaluating the condition for its "for" loop (the "list" variable will be null).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (FELIX-1251) Looping NullPointerException if the
polled directory is removed after File Install registration
Posted by "Guido Spadotto (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-1251?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12721725#action_12721725 ]
Guido Spadotto commented on FELIX-1251:
---------------------------------------
Am I supposed to notify someone from the Felix community, or just wait for someone to pick it up?
I can't find a way of assigning this bug to anyone.
> Looping NullPointerException if the polled directory is removed after File Install registration
> -----------------------------------------------------------------------------------------------
>
> Key: FELIX-1251
> URL: https://issues.apache.org/jira/browse/FELIX-1251
> Project: Felix
> Issue Type: Bug
> Components: File Install
> Affects Versions: fileinstall-1.0.0
> Environment: Windows Vista
> Reporter: Guido Spadotto
> Priority: Minor
> Attachments: patch-1251.txt
>
>
> If the directory being polled by File Install is removed while File Install is running,
> the method DirectoryWatcher.traverse will raise a NullPointerException
> when evaluating the condition for its "for" loop (the "list" variable will be null).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (FELIX-1251) Looping NullPointerException if the
polled directory is removed after File Install registration
Posted by "Filippo Diotalevi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-1251?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12721728#action_12721728 ]
Filippo Diotalevi commented on FELIX-1251:
------------------------------------------
Don't worry, somebody will pick it up soon!
> Looping NullPointerException if the polled directory is removed after File Install registration
> -----------------------------------------------------------------------------------------------
>
> Key: FELIX-1251
> URL: https://issues.apache.org/jira/browse/FELIX-1251
> Project: Felix
> Issue Type: Bug
> Components: File Install
> Affects Versions: fileinstall-1.0.0
> Environment: Windows Vista
> Reporter: Guido Spadotto
> Priority: Minor
> Attachments: patch-1251.txt
>
>
> If the directory being polled by File Install is removed while File Install is running,
> the method DirectoryWatcher.traverse will raise a NullPointerException
> when evaluating the condition for its "for" loop (the "list" variable will be null).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (FELIX-1251) Looping NullPointerException if the
polled directory is removed after File Install registration
Posted by "Guido Spadotto (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-1251?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Guido Spadotto closed FELIX-1251.
---------------------------------
> Looping NullPointerException if the polled directory is removed after File Install registration
> -----------------------------------------------------------------------------------------------
>
> Key: FELIX-1251
> URL: https://issues.apache.org/jira/browse/FELIX-1251
> Project: Felix
> Issue Type: Bug
> Components: File Install
> Affects Versions: fileinstall-1.0.0
> Environment: Windows Vista
> Reporter: Guido Spadotto
> Assignee: Richard S. Hall
> Priority: Minor
> Fix For: fileinstall-1.2.0
>
> Attachments: patch-1251.txt
>
>
> If the directory being polled by File Install is removed while File Install is running,
> the method DirectoryWatcher.traverse will raise a NullPointerException
> when evaluating the condition for its "for" loop (the "list" variable will be null).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (FELIX-1251) Looping NullPointerException if the
polled directory is removed after File Install registration
Posted by "Guido Spadotto (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-1251?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Guido Spadotto updated FELIX-1251:
----------------------------------
Description:
If the directory being polled by File Install is removed while File Install is running,
the method DirectoryWatcher.traverse will raise a NullPointerException
when evaluating the condition for its "for" loop (the "list" variable will be null).
was:
If the directory being polled by File Install is removed while File Install is running,
the method DirectoryWatcher.traverse will raise a NullPointerException
when evaluating the condition for its "for" loop (the "list" variable will be null).
This is a possible workaround:
void traverse(Map/* <String, Jar> */ jars, Set configs, File jardir)
{
String list[] = jardir.list();
if (list==null){
ConcurrentModificationException cme = new ConcurrentModificationException("Unable to list "
+this.watchedDirectory+ " contents. Has it been removed after " +
"File Install started?");
throw cme;
}
for (int i = 0; (list!=null) && i < list.length; i++)
{
...
This will not stop the outer loop from logging the Exception though,
which might not be convenient for the end user.
> Looping NullPointerException if the polled directory is removed after File Install registration
> -----------------------------------------------------------------------------------------------
>
> Key: FELIX-1251
> URL: https://issues.apache.org/jira/browse/FELIX-1251
> Project: Felix
> Issue Type: Bug
> Components: File Install
> Affects Versions: fileinstall-1.0.0
> Environment: Windows Vista
> Reporter: Guido Spadotto
> Priority: Minor
>
> If the directory being polled by File Install is removed while File Install is running,
> the method DirectoryWatcher.traverse will raise a NullPointerException
> when evaluating the condition for its "for" loop (the "list" variable will be null).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (FELIX-1251) Looping NullPointerException if the
polled directory is removed after File Install registration
Posted by "Filippo Diotalevi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-1251?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12721679#action_12721679 ]
Filippo Diotalevi commented on FELIX-1251:
------------------------------------------
I applied the patch on my local copy and tested it. Works as expected and fix the issue.
> Looping NullPointerException if the polled directory is removed after File Install registration
> -----------------------------------------------------------------------------------------------
>
> Key: FELIX-1251
> URL: https://issues.apache.org/jira/browse/FELIX-1251
> Project: Felix
> Issue Type: Bug
> Components: File Install
> Affects Versions: fileinstall-1.0.0
> Environment: Windows Vista
> Reporter: Guido Spadotto
> Priority: Minor
> Attachments: patch-1251.txt
>
>
> If the directory being polled by File Install is removed while File Install is running,
> the method DirectoryWatcher.traverse will raise a NullPointerException
> when evaluating the condition for its "for" loop (the "list" variable will be null).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (FELIX-1251) Looping NullPointerException if the
polled directory is removed after File Install registration
Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-1251?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Richard S. Hall resolved FELIX-1251.
------------------------------------
Resolution: Fixed
Fix Version/s: fileinstall-1.2.0
Assignee: Richard S. Hall
I applied this patch modulo some formatting changes. Please close if you are satisfied. Thanks!
> Looping NullPointerException if the polled directory is removed after File Install registration
> -----------------------------------------------------------------------------------------------
>
> Key: FELIX-1251
> URL: https://issues.apache.org/jira/browse/FELIX-1251
> Project: Felix
> Issue Type: Bug
> Components: File Install
> Affects Versions: fileinstall-1.0.0
> Environment: Windows Vista
> Reporter: Guido Spadotto
> Assignee: Richard S. Hall
> Priority: Minor
> Fix For: fileinstall-1.2.0
>
> Attachments: patch-1251.txt
>
>
> If the directory being polled by File Install is removed while File Install is running,
> the method DirectoryWatcher.traverse will raise a NullPointerException
> when evaluating the condition for its "for" loop (the "list" variable will be null).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (FELIX-1251) Looping NullPointerException if the
polled directory is removed after File Install registration
Posted by "Guido Spadotto (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-1251?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Guido Spadotto updated FELIX-1251:
----------------------------------
Environment: Windows Vista
> Looping NullPointerException if the polled directory is removed after File Install registration
> -----------------------------------------------------------------------------------------------
>
> Key: FELIX-1251
> URL: https://issues.apache.org/jira/browse/FELIX-1251
> Project: Felix
> Issue Type: Bug
> Components: File Install
> Affects Versions: fileinstall-1.0.0
> Environment: Windows Vista
> Reporter: Guido Spadotto
> Priority: Minor
>
> If the directory being polled by File Install is removed while File Install is running,
> the method DirectoryWatcher.traverse will raise a NullPointerException
> when evaluating the condition for its "for" loop (the "list" variable will be null).
> This is a possible workaround:
> void traverse(Map/* <String, Jar> */ jars, Set configs, File jardir)
> {
> String list[] = jardir.list();
> if (list==null){
> ConcurrentModificationException cme = new ConcurrentModificationException("Unable to list "
> +this.watchedDirectory+ " contents. Has it been removed after " +
> "File Install started?");
> throw cme;
> }
> for (int i = 0; (list!=null) && i < list.length; i++)
> {
> ...
> This will not stop the outer loop from logging the Exception though,
> which might not be convenient for the end user.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.