#148 REG 2.5.1: NPE: ResourceProvider.getMultipleResourcesAsBytes

v2.5
closed-fixed
Client (46)
5
2011-07-07
2011-07-06
No

Regression is due to invalid if condition in ClassServerDelegateImpl:143

143: else if (resource.getData("multiple.resources.names") == null) // <- condition should be inverted
144: {
145: String[] names = (String[]) resource.getData("multiple.resources.names"); // names are ALWAYS null

Suggested fix:
143: else if (resource.getData("multiple.resources.names") != null) // <- NOT EQUAL null

Steps to reproduce:
Class cls = <some class>;
URL url = cls.getResource("info.txt"); // 'info.txt' exists and and works on local execution

StackTrace:
java.lang.NullPointerException
at org.jppf.classloader.ResourceProvider.getMultipleResourcesAsBytes(ResourceProvider.java:242)
at org.jppf.client.ClassServerDelegateImpl.run(ClassServerDelegateImpl.java:146)
at java.lang.Thread.run(Thread.java:662)

Discussion

  • Laurent Cohen

    Laurent Cohen - 2011-07-07

    Thanks Martin for the investigation and registering this bug.
    It's a very stupid mistake on my side.
    I fixed this issue in org.jppf.client.ClassServerDelegateImpl and org.jppf.jca.work.JcaClassServerDelegate.

    Committed to SVN branch b2.5: revision 1726

     
  • Laurent Cohen

    Laurent Cohen - 2011-07-07
    • assigned_to: nobody --> lolocohen
    • status: open --> closed-fixed
     
  • Laurent Cohen

    Laurent Cohen - 2011-07-07

    Fix committed to SVN trunk: revision 1727

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks