Commits

Colin Gordon  committed f0d804d

categorized the final set of errors

  • Participants
  • Parent commits 8a06dc7

Comments (0)

Files changed (3)

File src/categories.txt

+
+************************** Subtyping/Generics
+subclipse/org.tigris.subversion.subclipse.ui/src/org/tigris/subversion/subclipse/ui/dialogs/DialogArea.java:63: error: incompatible types.
+		if (!listeners.contains(listener))
+		                        ^
+  found   : @UI IPropertyChangeListener
+  required: @AlwaysSafe Object
+subclipse/org.tigris.subversion.subclipse.ui/src/org/tigris/subversion/subclipse/ui/dialogs/DialogArea.java:64: error: incompatible types.
+			listeners.add(listener);
+			              ^
+  found   : @UI IPropertyChangeListener
+  required: @AlwaysSafe IPropertyChangeListener
+subclipse/org.tigris.subversion.subclipse.ui/src/org/tigris/subversion/subclipse/ui/dialogs/DialogArea.java:72: error: incompatible types.
+		listeners.remove(listener);
+		                 ^
+  found   : @UI IPropertyChangeListener
+  required: @AlwaysSafe Object
+subclipse/org.tigris.subversion.subclipse.ui/src/org/tigris/subversion/subclipse/ui/authentication/KeyFileHistoryContentHandler.java:57: error: incompatible component type of Vector.copyInto argument.
+			keyFiles.copyInto(KeyFilesManager.previousKeyFiles);
+			                                 ^
+  found   : ? extends @AlwaysSafe Object
+  required: @AlwaysSafe String
+subclipse/org.tigris.subversion.subclipse.ui/src/org/tigris/subversion/subclipse/ui/comments/CommentHistoryContentHandler.java:70: error: incompatible component type of Vector.copyInto argument.
+			comments.copyInto(CommentsManager.previousComments);
+			                                 ^
+  found   : ? extends @AlwaysSafe Object
+  required: @AlwaysSafe String
+subclipse/org.tigris.subversion.subclipse.ui/src/org/tigris/subversion/subclipse/ui/comments/CommentTemplatesContentHandler.java:67: error: incompatible component type of Vector.copyInto argument.
+			comments.copyInto(CommentsManager.commentTemplates);
+			                                 ^
+  found   : ? extends @AlwaysSafe Object
+  required: @AlwaysSafe String
+subclipse/org.tigris.subversion.subclipse.ui/src/org/tigris/subversion/subclipse/ui/comments/CommitCommentArea.java:256: error: An method override may only be @UI if it overrides an @UI method (overriding @AlwaysSafe Observer.update(java.util.Observable,java.lang.Object)).
+        public void update(Observable o, Object arg) { // Colin Gordon: Observer & Observable are polymorphic and intertwined, but I can't use them in this instance unless I fix handling of types that implement differently-permissioned interfaces.
+                    ^
+
+
+************************** IFace abuse
+subclipse/org.tigris.subversion.subclipse.ui/src/org/tigris/subversion/subclipse/ui/operations/FetchMembersOperation.java:38: error: An method override may only be @UI if it overrides an @UI method (overriding org.tigris.subversion.subclipse.ui.operations.SVNOperation.execute(org.eclipse.core.runtime.IProgressMonitor)).
+	@UIEffect protected void execute(IProgressMonitor monitor) throws SVNException, InterruptedException { // Colin Gordon: necessary invalid override: only called exlicitly (via run()) from a UI context, not properly used as an Operation.
+	                         ^
+
+
+************************** Missing Dependent Effects
+subclipse/org.tigris.subversion.subclipse.graph/src/org/tigris/subversion/subclipse/graph/editors/GraphBackgroundTask.java:156: error: Calling a method with UIEffect effect from a context limited to SafeEffect effects.
+					Activator.showErrorDialog("Calculate Revision Graph Information", e, false); // Colin Gordon: safe - the false indicates that showErrorDialog will do a syncExec, though this is not checked
+					                         ^
+subclipse/org.tigris.subversion.subclipse.graph/src/org/tigris/subversion/subclipse/graph/editors/GraphBackgroundTask.java:180: error: Calling a method with UIEffect effect from a context limited to SafeEffect effects.
+			Activator.showErrorDialog("Calculate Revision Graph Information", e, false); // Colin Gordon: safe - the false indicates that showErrorDialog will do a syncExec, though this is not checked
+			                         ^
+subclipse/org.tigris.subversion.subclipse.ui/src/org/tigris/subversion/subclipse/ui/SVNUIPlugin.java:428: error: Calling a method with UIEffect effect from a context limited to SafeEffect effects.
+			outerRunnable.run(); // Colin Gordon: SAFE I think - dynamic check for which thread we're on
+			                 ^
+
+************************** Dynamic Thread Checks
+subclipse/org.tigris.subversion.subclipse.ui/src/org/tigris/subversion/subclipse/ui/SVNUIPlugin.java:196: error: Calling a method with UIEffect effect from a context limited to SafeEffect effects.
+				parent = display.getActiveShell(); // Colin Gordon: subject to dynamic thread check
+				                               ^
+subclipse/org.tigris.subversion.subclipse.ui/src/org/tigris/subversion/subclipse/ui/SVNUIPlugin.java:204: error: Calling a method with UIEffect effect from a context limited to SafeEffect effects.
+			BusyIndicator.showWhile(parent.getDisplay(), new @UI Runnable() { // Colin Gordon: subject to dynamic thread check
+			                       ^
+subclipse/org.tigris.subversion.subclipse.ui/src/org/tigris/subversion/subclipse/ui/SVNUIPlugin.java:224: error: Calling a method with UIEffect effect from a context limited to SafeEffect effects.
+			if (createdShell) parent.dispose(); // Colin Gordon: subject to dynamic thread check + other control flow for safety
+			                                ^
+
+
+
+
+************************** Dead Code
+subclipse/org.tigris.subversion.subclipse.ui/src/org/tigris/subversion/subclipse/ui/preferences/SVNDecoratorPreferencesPage.java:682: error: An method override may only be @UI if it overrides an @UI method (overriding @AlwaysSafe Observer.update(java.util.Observable,java.lang.Object)).
+		public void update(Observable o, Object arg) { // Colin Gordon: This method will never be called - Preview is never used as an Observer (removing that implements clause fixes this error)
+		            ^
+
+
+
+
+************************** Global Property Store stuff
+subclipse/org.tigris.subversion.subclipse.ui/src/org/tigris/subversion/subclipse/ui/decorator/SVNLightweightDecorator.java:699: 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) {
+                    ^
+
+
+
+************************** Some combination of dependent effects and muliple params: IRunnableWithProgress.run() effect is LUB of execute() body and the progress monitor variant!
+subclipse/org.tigris.subversion.subclipse.ui/src/org/tigris/subversion/subclipse/ui/SVNUIPlugin.java:192: error: Calling a method with UIEffect effect from a context limited to SafeEffect effects.
+					runnable.run(new NullProgressMonitor()); // Colin Gordon: BUG or I misunderstood IRunnableWithProgress effects, or the conditionals around this check the thread dynamically
+					            ^
+
+
+
+
+
+************************** TBD
+subclipse/org.tigris.subversion.subclipse.ui/src/org/tigris/subversion/subclipse/ui/compare/SVNLocalResourceNode.java:83: error: Calling a method with UIEffect effect from a context limited to SafeEffect effects.
+			new ProgressMonitorDialog(Display.getDefault().getActiveShell()).run(false, false, runnable); // Colin Gordon: BUG? Same as SVNLocalResourceSummaryNode...
+			                                                                    ^
+subclipse/org.tigris.subversion.subclipse.ui/src/org/tigris/subversion/subclipse/ui/compare/SVNLocalResourceNode.java:83: error: Calling a method with UIEffect effect from a context limited to SafeEffect effects.
+			new ProgressMonitorDialog(Display.getDefault().getActiveShell()).run(false, false, runnable); // Colin Gordon: BUG? Same as SVNLocalResourceSummaryNode...
+			                                                             ^
+subclipse/org.tigris.subversion.subclipse.ui/src/org/tigris/subversion/subclipse/ui/compare/SVNLocalResourceSummaryNode.java:86: error: Calling a method with UIEffect effect from a context limited to SafeEffect effects.
+			new ProgressMonitorDialog(Display.getDefault().getActiveShell()).run(false, false, runnable); // Colin Gordon: BUG? context method must be a safe method by inheritance, but getActiveShell() is not safe, and ProgressMonitorDialog.run() eventually calls Label.setText...
+			                                                                    ^
+subclipse/org.tigris.subversion.subclipse.ui/src/org/tigris/subversion/subclipse/ui/compare/SVNLocalResourceSummaryNode.java:86: error: Calling a method with UIEffect effect from a context limited to SafeEffect effects.
+			new ProgressMonitorDialog(Display.getDefault().getActiveShell()).run(false, false, runnable); // Colin Gordon: BUG? context method must be a safe method by inheritance, but getActiveShell() is not safe, and ProgressMonitorDialog.run() eventually calls Label.setText...
+			                                                             ^
+subclipse/org.tigris.subversion.subclipse.ui/src/org/tigris/subversion/subclipse/ui/compare/SVNCompareRevisionsInput.java:119: error: Calling a method with UIEffect effect from a context limited to SafeEffect effects.
+				new ProgressMonitorDialog(shell).run(false, false, runnable); // Colin Gordon: BUG? Same as SVNLocalResourceSummaryNode...
+				                                    ^
+
+Note: Some input files use or override a deprecated API.
+Note: Recompile with -Xlint:deprecation for details.
+Note: Some input files use unchecked or unsafe operations.
+Note: Recompile with -Xlint:unchecked for details.
+22 errors
+14 warnings
 			listeners.add(listener);
 			              ^
   found   : @UI IPropertyChangeListener
-  required: ? extends @AlwaysSafe Object
+  required: @AlwaysSafe IPropertyChangeListener
 subclipse/org.tigris.subversion.subclipse.ui/src/org/tigris/subversion/subclipse/ui/dialogs/DialogArea.java:72: error: incompatible types.
 		listeners.remove(listener);
 		                 ^

File src/subclipse/org.tigris.subversion.subclipse.ui/src/org/tigris/subversion/subclipse/ui/decorator/SVNLightweightDecorator.java

 	/*
 	* Perform a blanket refresh of all SVN decorations
 	*/
-	@SafeEffect public static void refresh() {
+	public static void refresh() {
 		SVNUIPlugin.getPlugin().getWorkbench().getDecoratorManager().update(SVNUIPlugin.DECORATOR_ID); // Colin Gordon: BUG? At a glance .update() is not safe (though it depends on the ILabelProviderListeners), but this is called from projectConfigured(), which must be safe by inheritance
 	}
 
 	/* (non-Javadoc)
 	 * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
 	 */
-	@SafeEffect public void propertyChange(PropertyChangeEvent event) {
+	public void propertyChange(PropertyChangeEvent event) {
 		if (isEventOfInterest(event)) {
 			ensureFontAndColorsCreated(fonts, colors);
 		    refresh();
 		}	
 	}
 
-    @SafeEffect private boolean isEventOfInterest(PropertyChangeEvent event) {
+    private boolean isEventOfInterest(PropertyChangeEvent event) {
         String prop = event.getProperty();
         return prop.equals(TeamUI.GLOBAL_IGNORES_CHANGED) 
         	|| prop.equals(TeamUI.GLOBAL_FILE_TYPES_CHANGED)