diff options
author | mdaniel | 2006-01-09 16:31:40 +0000 |
---|---|---|
committer | mdaniel | 2006-01-09 16:31:40 +0000 |
commit | 64be0e1955b0627416c496a964aba7a1211321fc (patch) | |
tree | 690aa5f147b76b1650d26ac8119f510eba71df57 | |
parent | 60cbdce444f3fcf3297f6f80ad9fdcf610a9a0c4 (diff) | |
download | eclipse.jdt.core-64be0e1955b0627416c496a964aba7a1211321fc.tar.gz eclipse.jdt.core-64be0e1955b0627416c496a964aba7a1211321fc.tar.xz eclipse.jdt.core-64be0e1955b0627416c496a964aba7a1211321fc.zip |
HEAD - 53773
Suppressed warning token and improved build notes.
3 files changed, 27 insertions, 7 deletions
diff --git a/org.eclipse.jdt.core/buildnotes_jdt-core.html b/org.eclipse.jdt.core/buildnotes_jdt-core.html index b44b83c892..386f52aca7 100644 --- a/org.eclipse.jdt.core/buildnotes_jdt-core.html +++ b/org.eclipse.jdt.core/buildnotes_jdt-core.html @@ -62,6 +62,17 @@ The former API <code>org.eclipse.jdt.core.IJavaElement#String getAttachedJavadoc corresponding to the component type of the array binding. See bug <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=120264">120264</a> for details. This API is still subject to change before 3.2 release. </li> +<li> +Added optional compiler diagnosis for signaling method parameter assignments. +<pre> +* COMPILER / Reporting Parameter Assignment +* When enabled, the compiler will issue an error or a warning if a parameter is +* assigned to. +* - option id: "org.eclipse.jdt.core.compiler.problem.parameterAssignment" +* - possible values: { "error", "warning", "ignore" } +* - default: "ignore" +</pre> +</li> </ul> <h3>Problem Reports Fixed</h3> diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java index 5df70bca8c..54f31f31f2 100644 --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java @@ -888,6 +888,7 @@ public class CompilerOptions { OPTION_ReportNonStaticAccessToStatic, OPTION_ReportNullReference, OPTION_ReportOverridingPackageDefaultMethod, + OPTION_ReportParameterAssignment, OPTION_ReportPossibleAccidentalBooleanAssignment, OPTION_ReportSyntheticAccessEmulation, OPTION_ReportTypeParameterHiding, @@ -903,7 +904,6 @@ public class CompilerOptions { OPTION_ReportUnusedPrivateMember, OPTION_ReportVarargsArgumentNeedCast, OPTION_ReportUnhandledWarningToken, - OPTION_ReportParameterAssignment, }; return result; } @@ -955,8 +955,6 @@ public class CompilerOptions { return "unchecked"; //$NON-NLS-1$ case (int) UnusedLabel: return "unused"; //$NON-NLS-1$ - case (int) (ParameterAssignment >>> 32) : - return "paramAssign"; //$NON-NLS-1$ } } return null; @@ -993,10 +991,6 @@ public class CompilerOptions { if ("nls".equals(warningToken)) //$NON-NLS-1$ return NonExternalizedString; break; - case 'p' : - if ("paramAssign".equals(warningToken)) //$NON-NLS-1$ - return ParameterAssignment; - break; case 's' : if ("serial".equals(warningToken)) //$NON-NLS-1$ return MissingSerialVersion; diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.java index b7bdbf9ad5..c7c597834c 100644 --- a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.java +++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.java @@ -56,6 +56,8 @@ * COMPILER_PB_UNUSED_DECLARED_THROWN_EXCEPTION_WHEN_OVERRIDING * IBM Corporation - added the following constants: * TIMEOUT_FOR_PARAMETER_NAME_FROM_ATTACHED_JAVADOC + * IBM Corporation - added the following constants: + * COMPILER_PB_PARAMETER_ASSIGNMENT *******************************************************************************/ package org.eclipse.jdt.core; @@ -575,6 +577,12 @@ public final class JavaCore extends Plugin { */ public static final String COMPILER_PB_FATAL_OPTIONAL_ERROR = PLUGIN_ID + ".compiler.problem.fatalOptionalError"; //$NON-NLS-1$ /** + * Possible configurable option ID. + * @see #getDefaultOptions() + * @since 3.2 + */ + public static final String COMPILER_PB_PARAMETER_ASSIGNMENT = PLUGIN_ID + ".compiler.problem.parameterAssignment"; //$NON-NLS-1$ + /** * Possible configurable option ID. * @see #getDefaultOptions() * @since 2.0 @@ -2262,6 +2270,13 @@ public final class JavaCore extends Plugin { * - possible values: { "error", "warning", "ignore" } * - default: "warning" * + * COMPILER / Reporting Parameter Assignment + * When enabled, the compiler will issue an error or a warning if a parameter is + * assigned to. + * - option id: "org.eclipse.jdt.core.compiler.problem.parameterAssignment" + * - possible values: { "error", "warning", "ignore" } + * - default: "ignore" + * * BUILDER / Specifying Filters for Resource Copying Control * Allow to specify some filters to control the resource copy process. * - option id: "org.eclipse.jdt.core.builder.resourceCopyExclusionFilter" |