Dale LaBossiere created EDGENT-372:
--------------------------------------

             Summary: AppService.registerJar silently does nothing with URL to 
non-existent file
                 Key: EDGENT-372
                 URL: https://issues.apache.org/jira/browse/EDGENT-372
             Project: Edgent
          Issue Type: Bug
          Components: Providers
            Reporter: Dale LaBossiere
            Priority: Minor


I encountered this in an IotProvider app when sending it an appService 
"registerJar" control request with a bad file path.  Lots of head scratching 
ensued.

AppService.registerJar()'s call to ServiceLoader.load(URL[]) is silently 
returning in this case - e.g., a URL like "file://no-such-jar.jar".  Deep down 
in its implementation one sees in URLClassPath.getLoader()
             ...
             } catch (IOException e) {
                   // Silently ignore for now...
                   continue;
             }
Oh well.
The moral of the story seems to be that minimally AppService.registerJar() 
needs to verify the named file/dir exists and log an error if it doesn't.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to