Uploaded image for project: 'ShrinkWrap'
  1. ShrinkWrap
  2. SHRINKWRAP-106

ClassContainer "addClass" methods do not account for inner classes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.0.0-alpha-3
    • 1.0.0-alpha-2
    • None
    • None

      Assuming:

      public class TopLevelClass
      {
      private static class InnerClass{}
      }

      ...and:

      getClassContainer().addClasses(TopLevelClass.class);
      log.info(getArchive().toString(true));

      ...output is:

      test@jboss:/$ ls -l f59005e3-0dcc-417e-84fd-2f35ab8ae18f.jar
      f59005e3-0dcc-417e-84fd-2f35ab8ae18f.jar:
      /org/jboss/shrinkwrap/impl/base/spec/TopLevelClass.class

      This is especially problematic where the caller cannot access the inner class due to visibility constraints. It'll be missing from the runtime. Discuss the rules we should apply (regarding hierarchy) on the forum.

            arubinge@redhat.com Andrew Rubinger (Inactive)
            arubinge@redhat.com Andrew Rubinger (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: