Commits

Colin Gordon committed f82b9b3

a bit more, pretty sure i found a bug

Comments (0)

Files changed (5)

jvmmonitor-read-only/.log.txt.swp

Binary file modified.

jvmmonitor-read-only/log.txt

 
 compile:
 [jsr308.javac] /homes/gws/csgordon/research/guitypes/checker/build.xml:40: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
+     [copy] Copying 1 file to /homes/gws/csgordon/research/guitypes/checker/build/guitypes/checkers
 
 dist:
+      [jar] Building jar: /homes/gws/csgordon/research/guitypes/checker/dist/lib/guitypes-20120604.jar
 
 BUILD SUCCESSFUL
 Total time: 0 seconds
 ./org.jvmmonitor.ui/src/org/jvmmonitor/internal/ui/properties/cpu/CallerCalleeTabPage.java:95: error: An method override may only be @UI if it overrides an @UI method (overriding @AlwaysSafe ICpuModelChangeListener.modelChanged(org.jvmmonitor.core.cpu.CpuModelEvent)).
             @UIEffect public void modelChanged(CpuModelEvent event) {
                                   ^
-./org.jvmmonitor.ui/src/org/jvmmonitor/internal/ui/properties/mbean/AttributesTab.java:351: error: Calling a method with UIEffect effect from a context limited to SafeEffect effects.
-                                adjustedValue = getNumber(node.getValue()
-                                                         ^
-./org.jvmmonitor.ui/src/org/jvmmonitor/internal/ui/properties/mbean/NotificationFilteredTree.java:163: error: Calling a method with UIEffect effect from a context limited to SafeEffect effects.
-        setColumns(columnsString);
-                  ^
 ./org.jvmmonitor.ui/src/org/jvmmonitor/internal/ui/properties/mbean/NotificationFilteredTree.java:164: error: Calling a method with UIEffect effect from a context limited to SafeEffect effects.
-        configureTree();
+        configureTree(); // Colin Gordon: BUG? This makes direct calls to org.eclipse.swt.widgets.Tree.*, which are all UI methods.  Even if this interface is poly, this object registers itself with the default preferences store, which requires safe listeners.  Unless somehow they ensure the properties are only changed on the UI thread... try to reproduce this!
                      ^
 ./org.jvmmonitor.ui/src/org/jvmmonitor/internal/ui/properties/mbean/OperationsTab.java:158: error: Calling a method with UIEffect effect from a context limited to SafeEffect effects.
                     contentProvider.refresh(operations);
                                            ^
-./org.jvmmonitor.ui/src/org/jvmmonitor/internal/ui/views/JvmTreeViewer.java:294: error: Calling a method with UIEffect effect from a context limited to SafeEffect effects.
-                element = selection.getFirstElement();
-                                                   ^
-19 errors
+16 errors

jvmmonitor-read-only/org.jvmmonitor.ui/src/org/jvmmonitor/internal/ui/properties/mbean/AttributesTab.java

          *            The value
          * @return The number
          */
-        protected Number getNumber(Class<?> clazz, String value) {
+        @SafeEffect protected Number getNumber(Class<?> clazz, String value) {
             if (clazz == Byte.class) {
                 return Byte.valueOf(value);
             } else if (clazz == Short.class) {

jvmmonitor-read-only/org.jvmmonitor.ui/src/org/jvmmonitor/internal/ui/properties/mbean/NotificationFilteredTree.java

         }
 
         setColumns(columnsString);
-        configureTree();
+        configureTree(); // Colin Gordon: BUG? This makes direct calls to org.eclipse.swt.widgets.Tree.*, which are all UI methods.  Even if this interface is poly, this object registers itself with the default preferences store, which requires safe listeners.  Unless somehow they ensure the properties are only changed on the UI thread... try to reproduce this!
         getViewer().refresh();
     }
 
      * @param columnData
      *            The column order and visibility
      */
-    private void setColumns(String columnData) {
+    @SafeEffect private void setColumns(String columnData) {
         columns.clear();
         for (String column : columnData.split(",")) { //$NON-NLS-1$
             String[] elemnets = column.split("="); //$NON-NLS-1$
 +20 (5:20), 24.  Mostly from making IPropertyChangeListener polymorphic.
 
 +30 (5:50), 19.  mostly backtracking to mark a bunch of obviously safe methods of UITypes (e.g. containing asyncExec) as SafeEffect.
++15 (6:05), 16.  A couple safe stubs (IStructuredSelection).  Also pretty sure I've found buggy implementations of IPropertyChangeListener.