Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 338372

Summary: compile warnings in official build
Product: [Eclipse Project] PDE Reporter: Dani Megert <daniel_megert>
Component: API ToolsAssignee: Michael Rennie <Michael_Rennie>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.6.2   
Target Milestone: 3.7 M6   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
fix none

Description Dani Megert CLA 2011-02-28 03:55:31 EST
N20110227-2000.

/src/org/eclipse/pde/api/tools/model/tests/TagScannerTests.java : 3 warnings :
1. WARNING in /src/org/eclipse/pde/api/tools/model/tests/TagScannerTests.java
 (at line 90)
fail(MessageFormat.format("Error scanning: {0}", new String[] {name}));
The argument of type String[] should explicitly be cast to Object[] for the invocation of the varargs method format(String, Object...) from type MessageFormat. It could alternatively be cast to Object for a varargs invocation

2. WARNING in /src/org/eclipse/pde/api/tools/model/tests/TagScannerTests.java
 (at line 104)
fail(MessageFormat.format("Error scanning: {0}", new String[] {name}));
The argument of type String[] should explicitly be cast to Object[] for the invocation of the varargs method format(String, Object...) from type MessageFormat. It could alternatively be cast to Object for a varargs invocation

3. WARNING in /src/org/eclipse/pde/api/tools/model/tests/TagScannerTests.java
 (at line 119)
fail(MessageFormat.format("Error scanning: {0}", new String[] {name}));
The argument of type String[] should explicitly be cast to Object[] for the invocation of the varargs method format(String, Object...) from type MessageFormat. It could alternatively be cast to Object for a varargs invocation


/src/org/eclipse/pde/api/tools/util/tests/ApiDescriptionProcessorTests.java : 1 warning :
1. WARNING in /src/org/eclipse/pde/api/tools/util/tests/ApiDescriptionProcessorTests.java
 (at line 241)
change = new TextFileChange(MessageFormat.format(WizardMessages.JavadocTagRefactoring_2, new String[] {file.getName()}), file);
The argument of type String[] should explicitly be cast to Object[] for the invocation of the varargs method format(String, Object...) from type MessageFormat. It could alternatively be cast to Object for a varargs invocation
Comment 1 Michael Rennie CLA 2011-02-28 12:29:13 EST
Created attachment 189971 [details]
fix

The patch fixes up the mentioned warnings and many more including:

1. deprecated use of new DefaultScope() and new InstanceScope()
2. access warnings to PDE core
3. access warnings to PDE UI
4. raw collection warnings
5. synthetic accessor use
Comment 2 Michael Rennie CLA 2011-02-28 12:30:41 EST
applied patch to HEAD
Comment 3 Dani Megert CLA 2011-03-01 02:14:56 EST
Verified in N20110228-2000.