glassfish
  1. glassfish
  2. GLASSFISH-15071

JndiNameEnvironment should use generics

    Details

    • Type: Improvement Improvement
    • Status: In Progress
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: naming
    • Labels:
      None

      Description

      The interface JndiNameEnvironment returns a Set from many of the methods.
      The returned value should use generics to indicate the type of the object
      in the Set, and of course all classes that use this interface should be
      fixed to declare the correct return type.

      Also, code in WebBundleDescriptor and WebFragmentDescriptor should be
      cleaned up to depend on the proper return type and avoid the need for
      casts.

        Activity

        Hide
        Cheng Fang added a comment -

        When changing Set to Set<...> for JndiNameEnvironment methods, 2 places need some extra consideration:

        1, need to consolidate the inconsistent use of EjbReference (the interface) and EjbReferenceDescriptor (the class). We may need to use EjbReferenceDescriptor in all dol classes to be consistent.

        2, WebBundleDesc already override "Set getEnvironmentProperties()" with "Set<web.EnvironmentEntry> getEnvironmentProperties()". This prevents us from changing the interface method to "Set<EnvironmentProperty> getEnvironmentProperties()"

        Show
        Cheng Fang added a comment - When changing Set to Set<...> for JndiNameEnvironment methods, 2 places need some extra consideration: 1, need to consolidate the inconsistent use of EjbReference (the interface) and EjbReferenceDescriptor (the class). We may need to use EjbReferenceDescriptor in all dol classes to be consistent. 2, WebBundleDesc already override "Set getEnvironmentProperties()" with "Set<web.EnvironmentEntry> getEnvironmentProperties()". This prevents us from changing the interface method to "Set<EnvironmentProperty> getEnvironmentProperties()"
        Hide
        Tom Mueller added a comment -

        Reassigning to component lead as the assignee is no longer with the project.

        Show
        Tom Mueller added a comment - Reassigning to component lead as the assignee is no longer with the project.

          People

          • Assignee:
            guojun.shan
            Reporter:
            Bill Shannon
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: