### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: buildnotes_jdt-core.html =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/buildnotes_jdt-core.html,v retrieving revision 1.4844 diff -u -r1.4844 buildnotes_jdt-core.html --- buildnotes_jdt-core.html 9 Jan 2006 14:33:50 -0000 1.4844 +++ buildnotes_jdt-core.html 9 Jan 2006 15:09:13 -0000 @@ -62,6 +62,17 @@ corresponding to the component type of the array binding. See bug 120264 for details. This API is still subject to change before 3.2 release. +
  • +Added optional compiler diagnosis for signaling method parameter assignments. +
    +* 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"
    +
    +
  • Problem Reports Fixed

    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.518 diff -u -r1.518 JavaCore.java --- model/org/eclipse/jdt/core/JavaCore.java 5 Jan 2006 10:50:29 -0000 1.518 +++ model/org/eclipse/jdt/core/JavaCore.java 9 Jan 2006 15:09:15 -0000 @@ -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 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 @@ * - 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" Index: compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java,v retrieving revision 1.151 diff -u -r1.151 CompilerOptions.java --- compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java 4 Jan 2006 16:06:21 -0000 1.151 +++ compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java 9 Jan 2006 15:09:13 -0000 @@ -888,6 +888,7 @@ OPTION_ReportNonStaticAccessToStatic, OPTION_ReportNullReference, OPTION_ReportOverridingPackageDefaultMethod, + OPTION_ReportParameterAssignment, OPTION_ReportPossibleAccidentalBooleanAssignment, OPTION_ReportSyntheticAccessEmulation, OPTION_ReportTypeParameterHiding, @@ -903,7 +904,6 @@ OPTION_ReportUnusedPrivateMember, OPTION_ReportVarargsArgumentNeedCast, OPTION_ReportUnhandledWarningToken, - OPTION_ReportParameterAssignment, }; return result; } @@ -955,8 +955,6 @@ 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 @@ 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;