Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 114159 Details for
Bug 249535
[compiler] Consider disabling the syncOverride warning/error by default
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed patch
249535.txt (text/plain), 8.66 KB, created by
Philipe Mulet
on 2008-10-03 03:51:10 EDT
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Philipe Mulet
Created:
2008-10-03 03:51:10 EDT
Size:
8.66 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core.tests.compiler >Index: src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java,v >retrieving revision 1.158 >diff -u -r1.158 MethodVerifyTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java 26 Aug 2008 11:52:58 -0000 1.158 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java 3 Oct 2008 07:50:40 -0000 >@@ -8794,6 +8794,8 @@ > > //https://bugs.eclipse.org/bugs/show_bug.cgi?id=239066 > public void test170() { >+ Map options = getCompilerOptions(); >+ options.put(CompilerOptions.OPTION_ReportMissingSynchronizedOnInheritedMethod, CompilerOptions.ERROR); > this.runNegativeTest( > new String[] { > "X.java", >@@ -8801,16 +8803,20 @@ > "class Y extends X { @Override void foo() { } }" > }, > "----------\n" + >- "1. WARNING in X.java (at line 2)\n" + >+ "1. ERROR in X.java (at line 2)\n" + > " class Y extends X { @Override void foo() { } }\n" + > " ^^^^^\n" + > "The method Y.foo() is overriding a synchronized method without being synchronized\n" + >- "----------\n" >- ); >+ "----------\n", >+ null, >+ false, >+ options); > } > > //https://bugs.eclipse.org/bugs/show_bug.cgi?id=239066 - variation > public void test171() { >+ Map options = getCompilerOptions(); >+ options.put(CompilerOptions.OPTION_ReportMissingSynchronizedOnInheritedMethod, CompilerOptions.ERROR); > this.runNegativeTest( > new String[] { > "X.java", >@@ -8820,15 +8826,20 @@ > "}" > }, > "----------\n" + >- "1. WARNING in X.java (at line 2)\n" + >+ "1. ERROR in X.java (at line 2)\n" + > " FOO { @Override void foo() { super.foo(); } };\n" + > " ^^^^^\n" + > "The method new X(){}.foo() is overriding a synchronized method without being synchronized\n" + >- "----------\n"); >+ "----------\n", >+ null, >+ false, >+ options); > } > > //https://bugs.eclipse.org/bugs/show_bug.cgi?id=239066 - variation > public void test172() { >+ Map options = getCompilerOptions(); >+ options.put(CompilerOptions.OPTION_ReportMissingSynchronizedOnInheritedMethod, CompilerOptions.ERROR); > this.runNegativeTest( > new String[] { > "X.java", >@@ -8838,15 +8849,20 @@ > "}" > }, > "----------\n" + >- "1. WARNING in X.java (at line 2)\n" + >+ "1. ERROR in X.java (at line 2)\n" + > " void bar() { new X() { @Override void foo() {} }; }\n"+ > " ^^^^^\n" + > "The method new X(){}.foo() is overriding a synchronized method without being synchronized\n" + >- "----------\n"); >+ "----------\n", >+ null, >+ false, >+ options); > } > > //https://bugs.eclipse.org/bugs/show_bug.cgi?id=239066 - variation > public void test173() { >+ Map options = getCompilerOptions(); >+ options.put(CompilerOptions.OPTION_ReportMissingSynchronizedOnInheritedMethod, CompilerOptions.ERROR); > this.runNegativeTest( > new String[] { > "X.java", >@@ -8855,11 +8871,14 @@ > "class Z extends Y { @Override void foo() {} }\n" > }, > "----------\n" + >- "1. WARNING in X.java (at line 3)\n" + >+ "1. ERROR in X.java (at line 3)\n" + > " class Z extends Y { @Override void foo() {} }\n" + > " ^^^^^\n" + > "The method Z.foo() is overriding a synchronized method without being synchronized\n" + >- "----------\n"); >+ "----------\n", >+ null, >+ false, >+ options); > } > > } >\ No newline at end of file >Index: src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java,v >retrieving revision 1.175 >diff -u -r1.175 BatchCompilerTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java 2 Oct 2008 16:08:15 -0000 1.175 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java 3 Oct 2008 07:50:39 -0000 >@@ -1679,7 +1679,7 @@ > " staticReceiver + non-static reference to static member\n" + > " super overriding a method without making a super invocation\n" + > " suppress + enable @SuppressWarnings\n" + >- " syncOverride + missing synchronized in synchr. method override\n" + >+ " syncOverride missing synchronized in synchr. method override\n" + > " syntheticAccess synthetic access for innerclass\n" + > " tasks(<tags separated by |>) tasks identified by tags inside comments\n" + > " typeHiding + type parameter hiding another type\n" + >@@ -1808,7 +1808,7 @@ > " <option key=\"org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility\" value=\"public\"/>\n" + > " <option key=\"org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation\" value=\"ignore\"/>\n" + > " <option key=\"org.eclipse.jdt.core.compiler.problem.missingSerialVersion\" value=\"warning\"/>\n" + >- " <option key=\"org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod\" value=\"warning\"/>\n" + >+ " <option key=\"org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod\" value=\"ignore\"/>\n" + > " <option key=\"org.eclipse.jdt.core.compiler.problem.noEffectAssignment\" value=\"warning\"/>\n" + > " <option key=\"org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion\" value=\"warning\"/>\n" + > " <option key=\"org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral\" value=\"ignore\"/>\n" + >#P org.eclipse.jdt.core >Index: batch/org/eclipse/jdt/internal/compiler/batch/messages.properties >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties,v >retrieving revision 1.768 >diff -u -r1.768 messages.properties >--- batch/org/eclipse/jdt/internal/compiler/batch/messages.properties 2 Oct 2008 16:08:17 -0000 1.768 >+++ batch/org/eclipse/jdt/internal/compiler/batch/messages.properties 3 Oct 2008 07:50:42 -0000 >@@ -276,7 +276,7 @@ > \ staticReceiver + non-static reference to static member\n\ > \ super overriding a method without making a super invocation\n\ > \ suppress + enable @SuppressWarnings\n\ >-\ syncOverride + missing synchronized in synchr. method override\n\ >+\ syncOverride missing synchronized in synchr. method override\n\ > \ syntheticAccess synthetic access for innerclass\n\ > \ tasks(<tags separated by |>) tasks identified by tags inside comments\n\ > \ typeHiding + type parameter hiding another type\n\ >Index: model/org/eclipse/jdt/core/JavaCore.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.java,v >retrieving revision 1.626 >diff -u -r1.626 JavaCore.java >--- model/org/eclipse/jdt/core/JavaCore.java 26 Sep 2008 09:01:23 -0000 1.626 >+++ model/org/eclipse/jdt/core/JavaCore.java 3 Oct 2008 07:50:42 -0000 >@@ -1476,7 +1476,7 @@ > * <dl> > * <dt>Option id:</dt><dd><code>"org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod"</code></dd> > * <dt>Possible values:</dt><dd><code>{ "error", "warning", "ignore" }</code></dd> >- * <dt>Default:</dt><dd><code>"warning"</code></dd> >+ * <dt>Default:</dt><dd><code>"ignore"</code></dd> > * </dl> > * @since 3.5 > * @category CompilerOptionID >Index: compiler/org/eclipse/jdt/internal/compiler/impl/IrritantSet.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/IrritantSet.java,v >retrieving revision 1.1 >diff -u -r1.1 IrritantSet.java >--- compiler/org/eclipse/jdt/internal/compiler/impl/IrritantSet.java 5 Sep 2008 10:24:43 -0000 1.1 >+++ compiler/org/eclipse/jdt/internal/compiler/impl/IrritantSet.java 3 Oct 2008 07:50:42 -0000 >@@ -117,8 +117,7 @@ > | CompilerOptions.UnusedLabel > | CompilerOptions.UnusedTypeArguments > | CompilerOptions.UnusedWarningToken >- | CompilerOptions.ComparingIdentical >- | CompilerOptions.MissingSynchronizedModifierInInheritedMethod); >+ | CompilerOptions.ComparingIdentical); > // group-2 warnings enabled by default > // next irritant goes here (group-1 is complete) >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 249535
: 114159