Karaf
  1. Karaf
  2. KARAF-1907

Compile error: type ServiceReference does not take parameters on OSGi Shell ListBundleServices using JDK 7

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.3.0
    • Fix Version/s: 2.3.0
    • Component/s: karaf-core
    • Labels:
      None

      Description

      Build 2.3.0-SNAPSHOT with IBM JDK, will observe compile errors:

      [INFO] Compilation failure
      
      /x1/karaf/karaf-2.3.x/shell/osgi/src/main/java/org/apache/karaf/shell/osgi/ListBundleServices.java:[51,62] error: type ServiceReference does not take parameters
      /x1/karaf/karaf-2.3.x/shell/osgi/src/main/java/org/apache/karaf/shell/osgi/ListBundleServices.java:[99,49] error: type ServiceReference does not take parameters
      /x1/karaf/karaf-2.3.x/shell/osgi/src/main/java/org/apache/karaf/shell/osgi/ListBundleServices.java:[46,28] error: type ServiceReference does not take parameters
      /x1/karaf/karaf-2.3.x/shell/osgi/src/main/java/org/apache/karaf/shell/osgi/ListBundleServices.java:[59,29] error: type ServiceReference does not take parameters
      

        Issue Links

          Activity

          Hide
          Freeman Fang added a comment -

          Also encounter this with Oracle JDK7

          Show
          Freeman Fang added a comment - Also encounter this with Oracle JDK7
          Hide
          Jamie goodyear added a comment -

          I have a local workaround for this compile issue.
          It's not the prettiest however.. need to test it on a few other JVMs.

          Show
          Jamie goodyear added a comment - I have a local workaround for this compile issue. It's not the prettiest however.. need to test it on a few other JVMs.
          Hide
          Jamie goodyear added a comment -

          On the IBM JDK the issue appears to be that it doesn't like the use of "<?>".

          Show
          Jamie goodyear added a comment - On the IBM JDK the issue appears to be that it doesn't like the use of "<?>".
          Hide
          Jamie goodyear added a comment -

          Note: IBM JDK 6 and 7 both exhibit the same compile error.

          Show
          Jamie goodyear added a comment - Note: IBM JDK 6 and 7 both exhibit the same compile error.
          Hide
          Jamie goodyear added a comment -

          Note: Oracle JDK 6 on Windows compiles the code, HOWEVER, Oracle JDK 7 on Windows has the same compile error.

          Show
          Jamie goodyear added a comment - Note: Oracle JDK 6 on Windows compiles the code, HOWEVER, Oracle JDK 7 on Windows has the same compile error.
          Hide
          Achim Nierbeck added a comment -

          According to this entry at Stackoverflow this might be an issue of the JDK7

          http://stackoverflow.com/questions/8637937/why-does-a-generic-cast-of-a-list-extends-set-to-listset-succeed-on-sun

          From what I found it somehow is related to Collections and arrays ...
          which kind of fits to the issue we do have here.

          Show
          Achim Nierbeck added a comment - According to this entry at Stackoverflow this might be an issue of the JDK7 http://stackoverflow.com/questions/8637937/why-does-a-generic-cast-of-a-list-extends-set-to-listset-succeed-on-sun From what I found it somehow is related to Collections and arrays ... which kind of fits to the issue we do have here.
          Hide
          Jamie goodyear added a comment -

          Note: Oracle JDK 1.7 on Mac OSX 10.7.5 fails to compile in the same way.

          Show
          Jamie goodyear added a comment - Note: Oracle JDK 1.7 on Mac OSX 10.7.5 fails to compile in the same way.
          Hide
          Jamie goodyear added a comment -

          KARAF-1907 Compile error: type ServiceReference does not take parameters on OSGi Shell ListBundleServices using JDK 7

          Java 7 does not compile ServiceReference with wild card generic Java 7 does not compile ServiceReference with wild card generic. Removing <?> to allow wider JDK support.

          Sending shell/osgi/src/main/java/org/apache/karaf/shell/osgi/ListBundleServices.java
          Transmitting file data .
          Committed revision 1397138.

          Show
          Jamie goodyear added a comment - KARAF-1907 Compile error: type ServiceReference does not take parameters on OSGi Shell ListBundleServices using JDK 7 Java 7 does not compile ServiceReference with wild card generic Java 7 does not compile ServiceReference with wild card generic. Removing <?> to allow wider JDK support. Sending shell/osgi/src/main/java/org/apache/karaf/shell/osgi/ListBundleServices.java Transmitting file data . Committed revision 1397138.

            People

            • Assignee:
              Jamie goodyear
              Reporter:
              Jamie goodyear
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development