Commits

Colin Gordon committed 1a504ab

small source change to remove generics error

  • Participants
  • Parent commits 53a6c7a

Comments (0)

Files changed (2)

jvmmonitor-read-only/data.txt

 BUILD SUCCESSFUL
 Total time: 0 seconds
 ~/research/experiments/timed/jvmmonitor/jvmmonitor-read-only
-./org.jvmmonitor.core/src/org/jvmmonitor/internal/core/MBeanServer.java:1003: error: incompatible types.
-            mxBean = newPlatformMXBeanProxy(connection, mxBeanName, mxBeanClass);
-                                                                    ^
-  found   : @AlwaysSafe Class<? extends @AlwaysSafe Object>
-  required: @AlwaysSafe Class<@AlwaysSafe Object>
 ./org.jvmmonitor.ui/src/org/jvmmonitor/internal/ui/properties/memory/HeapHistogramPage.java:170: error: An method override may only be @UI if it overrides an @UI method (overriding non-UI instantiation of @AlwaysSafe IPropertyChangeListener).
     public void propertyChange(PropertyChangeEvent event) { // Colin Gordon: FP: UI-update-only global prop-change listener
                 ^
 ./org.jvmmonitor.ui/src/org/jvmmonitor/internal/ui/properties/mbean/NotificationFilteredTree.java:152: error: An method override may only be @UI if it overrides an @UI method (overriding non-UI instantiation of @AlwaysSafe IPropertyChangeListener).
     public void propertyChange(PropertyChangeEvent event) { // Colin Gordon: FP: UI-update-only global prop-change listener
                 ^
-10 errors
+9 errors

jvmmonitor-read-only/org.jvmmonitor.core/src/org/jvmmonitor/internal/core/MBeanServer.java

      * @throws IOException
      */
     @SuppressWarnings("unchecked")
-    private Object getMXBean(@SuppressWarnings("rawtypes") Class mxBeanClass,
+    private  <T> Object getMXBean(@SuppressWarnings("rawtypes") Class<T> mxBeanClass,
             String mxBeanName) throws IOException {
         Object mxBean = mxBeans.get(mxBeanClass);
         if (mxBean == null && connection != null) {