2 Replies Latest reply on Jan 19, 2012 5:38 PM by pstackle

    AS7 FluxCapacitor - java.lang.package methods not working

    bob_alam

      I have narrowed down the issue in a very simple servlet. Here is the code snippet -

       

          Package aPackage = HelloWorld.class.getPackage();       

           writer.println("Class loader: " + HelloWorld.class.getClassLoader().toString());

           writer.println("Package name: " + aPackage.getName());

           writer.println("Package title: " + aPackage.getSpecificationTitle());

           writer.println("Package title: " + aPackage.getSpecificationTitle());

       

       

      output:

      Class loader: ModuleClassLoader for Module "deployment.HelloWorldServlet.war:main" from Service Module Loader

      Package name: com.mypackage.test

      Package title: null <---(wrong)

      Package version: null <---(wrong)

       

      There is a manifest file in the jar (and one in the war). I have tested out that the dependency information is being read correctly from the jar manifiest in AS7.

       

      On AS5/AS6 both the title and version information is returned correctly.

       

      Am I doing something incorrectly or is this a bug?

       

      Thanks for your help.