View | Details | Raw Unified | Return to bug 67836 | Differences between
and this patch

Collapse All | Expand All

(-)compiler/org/eclipse/jdt/internal/compiler/ast/SwitchStatement.java (+22 lines)
Lines 32-37 Link Here
32
	public int caseCount;
32
	public int caseCount;
33
	int[] constants;
33
	int[] constants;
34
	
34
	
35
	// fallthrough
36
	public final static int CASE = 0;
37
	public final static int FALLTHROUGH = 1;
38
	public final static int ESCAPING = 2;
39
	
40
	
35
	public SyntheticMethodBinding synthetic; // use for switch on enums types
41
	public SyntheticMethodBinding synthetic; // use for switch on enums types
36
	
42
	
37
	// for local variables table attributes
43
	// for local variables table attributes
Lines 57-76 Link Here
57
			int caseIndex = 0;
63
			int caseIndex = 0;
58
			if (statements != null) {
64
			if (statements != null) {
59
				boolean didAlreadyComplain = false;
65
				boolean didAlreadyComplain = false;
66
				int fallThroughState = CASE;
60
				for (int i = 0, max = statements.length; i < max; i++) {
67
				for (int i = 0, max = statements.length; i < max; i++) {
61
					Statement statement = statements[i];
68
					Statement statement = statements[i];
62
					if ((caseIndex < caseCount) && (statement == cases[caseIndex])) { // statement is a case
69
					if ((caseIndex < caseCount) && (statement == cases[caseIndex])) { // statement is a case
63
						this.scope.enclosingCase = cases[caseIndex]; // record entering in a switch case block
70
						this.scope.enclosingCase = cases[caseIndex]; // record entering in a switch case block
64
						caseIndex++;
71
						caseIndex++;
72
						if (fallThroughState == FALLTHROUGH
73
								&& (statement.bits & ASTNode.DocumentedFallthrough) == 0) { // the case is not fall-through protected by a line comment
74
							scope.problemReporter().possibleFallThroughCase(this.scope.enclosingCase);
75
						}
65
						caseInits = caseInits.mergedWith(flowInfo.unconditionalInits());
76
						caseInits = caseInits.mergedWith(flowInfo.unconditionalInits());
66
						didAlreadyComplain = false; // reset complaint
77
						didAlreadyComplain = false; // reset complaint
78
						fallThroughState = CASE;
67
					} else if (statement == defaultCase) { // statement is the default case
79
					} else if (statement == defaultCase) { // statement is the default case
68
						this.scope.enclosingCase = defaultCase; // record entering in a switch case block
80
						this.scope.enclosingCase = defaultCase; // record entering in a switch case block
81
						if (fallThroughState == FALLTHROUGH 
82
								&& (statement.bits & ASTNode.DocumentedFallthrough) == 0) {
83
							scope.problemReporter().possibleFallThroughCase(this.scope.enclosingCase);
84
						}
69
						caseInits = caseInits.mergedWith(flowInfo.unconditionalInits());
85
						caseInits = caseInits.mergedWith(flowInfo.unconditionalInits());
70
						didAlreadyComplain = false; // reset complaint
86
						didAlreadyComplain = false; // reset complaint
87
						fallThroughState = CASE;
88
					} else {
89
						fallThroughState = FALLTHROUGH; // reset below if needed
71
					}
90
					}
72
					if (!statement.complainIfUnreachable(caseInits, scope, didAlreadyComplain)) {
91
					if (!statement.complainIfUnreachable(caseInits, scope, didAlreadyComplain)) {
73
						caseInits = statement.analyseCode(scope, switchContext, caseInits);
92
						caseInits = statement.analyseCode(scope, switchContext, caseInits);
93
						if (caseInits == FlowInfo.DEAD_END) {
94
							fallThroughState = ESCAPING;
95
						}
74
					} else {
96
					} else {
75
						didAlreadyComplain = true;
97
						didAlreadyComplain = true;
76
					}
98
					}
(-)compiler/org/eclipse/jdt/internal/compiler/ast/ASTNode.java (-2 / +3 lines)
Lines 40-46 Link Here
40
	public final static int Bit16 = 0x8000; 				// in javadoc comment (name ref, type ref, msg)
40
	public final static int Bit16 = 0x8000; 				// in javadoc comment (name ref, type ref, msg)
41
	public final static int Bit17 = 0x10000; 				// compound assigned (reference lhs)
41
	public final static int Bit17 = 0x10000; 				// compound assigned (reference lhs)
42
	public final static int Bit18 = 0x20000;				// non null (expression)				
42
	public final static int Bit18 = 0x20000;				// non null (expression)				
43
	public final static int Bit19 = 0x40000; 
43
	public final static int Bit19 = 0x40000;
44
	public final static int Bit20 = 0x80000; 
44
	public final static int Bit20 = 0x80000; 
45
	public final static int Bit21 = 0x100000; 		
45
	public final static int Bit21 = 0x100000; 		
46
	public final static int Bit22 = 0x200000; 			// parenthesis count (expression)
46
	public final static int Bit22 = 0x200000; 			// parenthesis count (expression)
Lines 51-57 Link Here
51
	public final static int Bit27 = 0x4000000; 			// parenthesis count (expression)
51
	public final static int Bit27 = 0x4000000; 			// parenthesis count (expression)
52
	public final static int Bit28 = 0x8000000; 			// parenthesis count (expression)
52
	public final static int Bit28 = 0x8000000; 			// parenthesis count (expression)
53
	public final static int Bit29 = 0x10000000; 		// parenthesis count (expression)
53
	public final static int Bit29 = 0x10000000; 		// parenthesis count (expression)
54
	public final static int Bit30 = 0x20000000; 		// assignment with no effect (assignment) | elseif (if statement) | try block exit (try statement)
54
	public final static int Bit30 = 0x20000000; 		// assignment with no effect (assignment) | elseif (if statement) | try block exit (try statement) | fall-through (case statement)
55
	public final static int Bit31 = 0x40000000; 		// local declaration reachable (local decl) | ignore raw type check (type ref) | discard entire assignment (assignment)
55
	public final static int Bit31 = 0x40000000; 		// local declaration reachable (local decl) | ignore raw type check (type ref) | discard entire assignment (assignment)
56
	public final static int Bit32 = 0x80000000; 		// reachable (statement)
56
	public final static int Bit32 = 0x80000000; 		// reachable (statement)
57
57
Lines 112-117 Link Here
112
	public static final int IsReachable = Bit32; 
112
	public static final int IsReachable = Bit32; 
113
	public static final int IsLocalDeclarationReachable = Bit31; 
113
	public static final int IsLocalDeclarationReachable = Bit31; 
114
	public static final int LabelUsed = Bit7;
114
	public static final int LabelUsed = Bit7;
115
	public static final int DocumentedFallthrough = Bit30;
115
	
116
	
116
	// try statements
117
	// try statements
117
	public static final int IsSubRoutineEscaping = Bit15;
118
	public static final int IsSubRoutineEscaping = Bit15;
(-)compiler/org/eclipse/jdt/core/compiler/IProblem.java (-3 / +7 lines)
Lines 74-79 Link Here
74
 *								   InvalidDigit
74
 *								   InvalidDigit
75
 *     IBM Corporation - added the following constants
75
 *     IBM Corporation - added the following constants
76
 *								   ParameterAssignment
76
 *								   ParameterAssignment
77
 *								   FallthroughCase
77
 *******************************************************************************/
78
 *******************************************************************************/
78
package org.eclipse.jdt.core.compiler;
79
package org.eclipse.jdt.core.compiler;
79
 
80
 
Lines 275-281 Link Here
275
	int DuplicateFinalLocalInitialization = Internal + 57;
276
	int DuplicateFinalLocalInitialization = Internal + 57;
276
	/** @since 2.1 */
277
	/** @since 2.1 */
277
	int NonBlankFinalLocalAssignment = Internal + 58;
278
	int NonBlankFinalLocalAssignment = Internal + 58;
278
	
279
	/** @since 3.2 */
280
	int ParameterAssignment = Internal + 59;	
279
	int FinalOuterLocalAssignment = Internal + 60;
281
	int FinalOuterLocalAssignment = Internal + 60;
280
	int LocalVariableIsNeverUsed = Internal + 61;
282
	int LocalVariableIsNeverUsed = Internal + 61;
281
	int ArgumentIsNeverUsed = Internal + 62;
283
	int ArgumentIsNeverUsed = Internal + 62;
Lines 289-296 Link Here
289
	int TooManyArrayDimensions = Internal + 68;
291
	int TooManyArrayDimensions = Internal + 68;
290
	/** @since 2.1 */
292
	/** @since 2.1 */
291
	int BytecodeExceeds64KLimitForConstructor = Internal + 69;
293
	int BytecodeExceeds64KLimitForConstructor = Internal + 69;
292
	/** @since 3.2 */
293
	int ParameterAssignment = Internal + 860;
294
	
294
	
295
	// fields
295
	// fields
296
	int UndefinedField = FieldRelated + 70;
296
	int UndefinedField = FieldRelated + 70;
Lines 406-411 Link Here
406
	// switch       
406
	// switch       
407
	int IncorrectSwitchType = TypeRelated + 169;
407
	int IncorrectSwitchType = TypeRelated + 169;
408
	int DuplicateCase = FieldRelated + 170;
408
	int DuplicateCase = FieldRelated + 170;
409
409
	// labelled
410
	// labelled
410
	int DuplicateLabel = Internal + 171;
411
	int DuplicateLabel = Internal + 171;
411
	int InvalidBreak = Internal + 172;
412
	int InvalidBreak = Internal + 172;
Lines 449-454 Link Here
449
	int NeedToEmulateMethodAccess = MethodRelated + 192;
450
	int NeedToEmulateMethodAccess = MethodRelated + 192;
450
	int NeedToEmulateConstructorAccess = MethodRelated + 193;
451
	int NeedToEmulateConstructorAccess = MethodRelated + 193;
451
452
453
	/** @since 3.2 */
454
	int FallthroughCase = Internal + 194;	
455
	
452
	//inherited name hides enclosing name (sort of ambiguous)
456
	//inherited name hides enclosing name (sort of ambiguous)
453
	int InheritedMethodHidesEnclosingName = MethodRelated + 195;
457
	int InheritedMethodHidesEnclosingName = MethodRelated + 195;
454
	int InheritedFieldHidesEnclosingName = FieldRelated + 196;
458
	int InheritedFieldHidesEnclosingName = FieldRelated + 196;
(-)batch/org/eclipse/jdt/internal/compiler/batch/messages.properties (+1 lines)
Lines 143-148 Link Here
143
\      discouraged        + use of types matching a discouraged access rule\n\
143
\      discouraged        + use of types matching a discouraged access rule\n\
144
\      emptyBlock           undocumented empty block\n\
144
\      emptyBlock           undocumented empty block\n\
145
\      enumSwitch           incomplete enum switch\n\
145
\      enumSwitch           incomplete enum switch\n\
146
\      fallthrough          possible fall-through case\n\
146
\      fieldHiding          field hiding another variable\n\
147
\      fieldHiding          field hiding another variable\n\
147
\      finalBound           type parameter with final bound\n\
148
\      finalBound           type parameter with final bound\n\
148
\      finally            + finally block not completing normally\n\
149
\      finally            + finally block not completing normally\n\
(-)batch/org/eclipse/jdt/internal/compiler/batch/Main.java (+4 lines)
Lines 1962-1967 Link Here
1962
						this.options.put(
1962
						this.options.put(
1963
							CompilerOptions.OPTION_ReportForbiddenReference,
1963
							CompilerOptions.OPTION_ReportForbiddenReference,
1964
							isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
1964
							isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
1965
					} else if (token.equals("fallthrough")) { //$NON-NLS-1$
1966
						this.options.put(
1967
							CompilerOptions.OPTION_ReportFallthroughCase,
1968
							isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
1965
					} else {
1969
					} else {
1966
						throw new InvalidInputException(Main.bind("configure.invalidWarning", token)); //$NON-NLS-1$
1970
						throw new InvalidInputException(Main.bind("configure.invalidWarning", token)); //$NON-NLS-1$
1967
					}
1971
					}
(-)compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties (-3 / +2 lines)
Lines 45-51 Link Here
45
56 = Duplicate parameter {0}
45
56 = Duplicate parameter {0}
46
57 = The final local variable {0} may already have been assigned
46
57 = The final local variable {0} may already have been assigned
47
58 = The final local variable {0} cannot be assigned. It must be blank and not using a compound assignment
47
58 = The final local variable {0} cannot be assigned. It must be blank and not using a compound assignment
48
48
59 = The parameter {0} should not be assigned
49
60 = The final local variable {0} cannot be assigned, since it is defined in an enclosing type
49
60 = The final local variable {0} cannot be assigned, since it is defined in an enclosing type
50
61 = The local variable {0} is never read
50
61 = The local variable {0} is never read
51
62 = The parameter {0} is never read
51
62 = The parameter {0} is never read
Lines 157-167 Link Here
157
187 = Unreachable catch block for {0}. It is already handled by the catch block for {1}
157
187 = Unreachable catch block for {0}. It is already handled by the catch block for {1}
158
188 = Empty control-flow statement
158
188 = Empty control-flow statement
159
189 = Statement unnecessarily nested within else clause. The corresponding then clause does not complete normally
159
189 = Statement unnecessarily nested within else clause. The corresponding then clause does not complete normally
160
161
190 = Read access to enclosing field {0}.{1} is emulated by a synthetic accessor method. Increasing its visibility will improve your performance
160
190 = Read access to enclosing field {0}.{1} is emulated by a synthetic accessor method. Increasing its visibility will improve your performance
162
191 = Write access to enclosing field {0}.{1} is emulated by a synthetic accessor method. Increasing its visibility will improve your performance
161
191 = Write access to enclosing field {0}.{1} is emulated by a synthetic accessor method. Increasing its visibility will improve your performance
163
192 = Access to enclosing method {1}({2}) from the type {0} is emulated by a synthetic accessor method. Increasing its visibility will improve your performance
162
192 = Access to enclosing method {1}({2}) from the type {0} is emulated by a synthetic accessor method. Increasing its visibility will improve your performance
164
193 = Access to enclosing constructor {0}({1}) is emulated by a synthetic accessor method. Increasing its visibility will improve your performance
163
193 = Access to enclosing constructor {0}({1}) is emulated by a synthetic accessor method. Increasing its visibility will improve your performance
164
194 = Switch case may be entered by falling through previous case
165
195 = The method {1} is defined in an inherited type and an enclosing scope
165
195 = The method {1} is defined in an inherited type and an enclosing scope
166
196 = The field {0} is defined in an inherited type and an enclosing scope 
166
196 = The field {0} is defined in an inherited type and an enclosing scope 
167
197 = The type {0} is defined in an inherited type and an enclosing scope
167
197 = The type {0} is defined in an inherited type and an enclosing scope
Lines 561-564 Link Here
561
858 = The parameterized constructor <{3}>{0}({1}) of type {2} is not applicable for the arguments ({4})
561
858 = The parameterized constructor <{3}>{0}({1}) of type {2} is not applicable for the arguments ({4})
562
859 = The constructor {0}({1}) of raw type {2} is no longer generic; it cannot be parameterized with arguments <{3}>
562
859 = The constructor {0}({1}) of raw type {2} is no longer generic; it cannot be parameterized with arguments <{3}>
563
563
564
860 = The parameter {0} should not be assigned
(-)compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java (+11 lines)
Lines 1535-1540 Link Here
1535
1535
1536
		case IProblem.ParameterAssignment:
1536
		case IProblem.ParameterAssignment:
1537
			return CompilerOptions.ParameterAssignment;
1537
			return CompilerOptions.ParameterAssignment;
1538
1539
		case IProblem.FallthroughCase:
1540
			return CompilerOptions.FallthroughCase;
1538
	}
1541
	}
1539
	return 0;
1542
	return 0;
1540
}
1543
}
Lines 4927-4932 Link Here
4927
		start,
4930
		start,
4928
		end);
4931
		end);
4929
}
4932
}
4933
public void possibleFallThroughCase(CaseStatement caseStatement) {
4934
	this.handle(
4935
		IProblem.FallthroughCase,
4936
		NoArgument,
4937
		NoArgument,
4938
		caseStatement.sourceStart,
4939
		caseStatement.sourceEnd);
4940
}
4930
public void possibleAccidentalBooleanAssignment(Assignment assignment) {
4941
public void possibleAccidentalBooleanAssignment(Assignment assignment) {
4931
	this.handle(
4942
	this.handle(
4932
		IProblem.PossibleAccidentalBooleanAssignment,
4943
		IProblem.PossibleAccidentalBooleanAssignment,
(-)model/org/eclipse/jdt/core/JavaCore.java (+14 lines)
Lines 57-62 Link Here
57
 *     IBM Corporation - added the following constants:
57
 *     IBM Corporation - added the following constants:
58
 *                                 TIMEOUT_FOR_PARAMETER_NAME_FROM_ATTACHED_JAVADOC
58
 *                                 TIMEOUT_FOR_PARAMETER_NAME_FROM_ATTACHED_JAVADOC
59
 *     IBM Corporation - added the following constants:
59
 *     IBM Corporation - added the following constants:
60
 *                                 COMPILER_PB_FALLTHROUGH_CASE
60
 *                                 COMPILER_PB_PARAMETER_ASSIGNMENT
61
 *                                 COMPILER_PB_PARAMETER_ASSIGNMENT
61
 *                                 COMPILER_PB_NULL_REFERENCE
62
 *                                 COMPILER_PB_NULL_REFERENCE
62
 *     IBM Corporation - added the following constants:
63
 *     IBM Corporation - added the following constants:
Lines 365-370 Link Here
365
	/**
366
	/**
366
	 * Possible  configurable option ID.
367
	 * Possible  configurable option ID.
367
	 * @see #getDefaultOptions()
368
	 * @see #getDefaultOptions()
369
	 * @since 3.2
370
	 */
371
	public static final String COMPILER_PB_FALLTHROUGH_CASE = PLUGIN_ID + ".compiler.problem.fallthroughCase"; //$NON-NLS-1$
372
	/**
373
	 * Possible  configurable option ID.
374
	 * @see #getDefaultOptions()
368
	 * @since 3.0
375
	 * @since 3.0
369
	 */
376
	 */
370
	public static final String COMPILER_PB_EMPTY_STATEMENT = PLUGIN_ID + ".compiler.problem.emptyStatement"; //$NON-NLS-1$
377
	public static final String COMPILER_PB_EMPTY_STATEMENT = PLUGIN_ID + ".compiler.problem.emptyStatement"; //$NON-NLS-1$
Lines 2271-2276 Link Here
2271
	 *     - possible values:   { "error", "warning", "ignore" }
2278
	 *     - possible values:   { "error", "warning", "ignore" }
2272
	 *     - default:           "ignore"
2279
	 *     - default:           "ignore"
2273
	 * 
2280
	 * 
2281
	 * COMPILER / Reporting Switch Fall-Through Case
2282
	 *    When enabled, the compiler will issue an error or a warning if a case may be
2283
	 *    entered by falling through previous case. Empty cases are allowed.
2284
	 *     - option id:         "org.eclipse.jdt.core.compiler.problem.fallthroughCase"
2285
	 *     - possible values:   { "error", "warning", "ignore" }
2286
	 *     - default:           "ignore"
2287
	 * 
2274
	 * BUILDER / Specifying Filters for Resource Copying Control
2288
	 * BUILDER / Specifying Filters for Resource Copying Control
2275
	 *    Allow to specify some filters to control the resource copy process.
2289
	 *    Allow to specify some filters to control the resource copy process.
2276
	 *     - option id:         "org.eclipse.jdt.core.builder.resourceCopyExclusionFilter"
2290
	 *     - option id:         "org.eclipse.jdt.core.builder.resourceCopyExclusionFilter"
(-)compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java (-1 / +10 lines)
Lines 104-109 Link Here
104
	public static final String OPTION_ReportUnusedLabel =  "org.eclipse.jdt.core.compiler.problem.unusedLabel"; //$NON-NLS-1$
104
	public static final String OPTION_ReportUnusedLabel =  "org.eclipse.jdt.core.compiler.problem.unusedLabel"; //$NON-NLS-1$
105
	public static final String OPTION_FatalOptionalError =  "org.eclipse.jdt.core.compiler.problem.fatalOptionalError"; //$NON-NLS-1$
105
	public static final String OPTION_FatalOptionalError =  "org.eclipse.jdt.core.compiler.problem.fatalOptionalError"; //$NON-NLS-1$
106
	public static final String OPTION_ReportParameterAssignment =  "org.eclipse.jdt.core.compiler.problem.parameterAssignment"; //$NON-NLS-1$
106
	public static final String OPTION_ReportParameterAssignment =  "org.eclipse.jdt.core.compiler.problem.parameterAssignment"; //$NON-NLS-1$
107
	public static final String OPTION_ReportFallthroughCase =  "org.eclipse.jdt.core.compiler.problem.fallthroughCase"; //$NON-NLS-1$
107
	
108
	
108
	// Backward compatibility
109
	// Backward compatibility
109
	public static final String OPTION_ReportInvalidAnnotation = "org.eclipse.jdt.core.compiler.problem.invalidAnnotation"; //$NON-NLS-1$
110
	public static final String OPTION_ReportInvalidAnnotation = "org.eclipse.jdt.core.compiler.problem.invalidAnnotation"; //$NON-NLS-1$
Lines 187-192 Link Here
187
	public static final long RawTypeReference = ASTNode.Bit46L;
188
	public static final long RawTypeReference = ASTNode.Bit46L;
188
	public static final long UnusedLabel = ASTNode.Bit47L;
189
	public static final long UnusedLabel = ASTNode.Bit47L;
189
	public static final long ParameterAssignment = ASTNode.Bit48L;
190
	public static final long ParameterAssignment = ASTNode.Bit48L;
191
	public static final long FallthroughCase = ASTNode.Bit49L;
190
	
192
	
191
	// Default severity level for handlers
193
	// Default severity level for handlers
192
	public long errorThreshold = 0;
194
	public long errorThreshold = 0;
Lines 381-387 Link Here
381
		optionsMap.put(OPTION_Source, versionFromJdkLevel(this.sourceLevel)); 
383
		optionsMap.put(OPTION_Source, versionFromJdkLevel(this.sourceLevel)); 
382
		optionsMap.put(OPTION_TargetPlatform, versionFromJdkLevel(this.targetJDK)); 
384
		optionsMap.put(OPTION_TargetPlatform, versionFromJdkLevel(this.targetJDK)); 
383
		optionsMap.put(OPTION_FatalOptionalError, this.treatOptionalErrorAsFatal ? ENABLED : DISABLED); 
385
		optionsMap.put(OPTION_FatalOptionalError, this.treatOptionalErrorAsFatal ? ENABLED : DISABLED); 
384
		
385
		if (this.defaultEncoding != null) {
386
		if (this.defaultEncoding != null) {
386
			optionsMap.put(OPTION_Encoding, this.defaultEncoding); 
387
			optionsMap.put(OPTION_Encoding, this.defaultEncoding); 
387
		}
388
		}
Lines 397-402 Link Here
397
		optionsMap.put(OPTION_SuppressWarnings, this.suppressWarnings ? ENABLED : DISABLED); 
398
		optionsMap.put(OPTION_SuppressWarnings, this.suppressWarnings ? ENABLED : DISABLED); 
398
		optionsMap.put(OPTION_ReportUnhandledWarningToken, getSeverityString(UnhandledWarningToken));
399
		optionsMap.put(OPTION_ReportUnhandledWarningToken, getSeverityString(UnhandledWarningToken));
399
		optionsMap.put(OPTION_ReportParameterAssignment, getSeverityString(ParameterAssignment));
400
		optionsMap.put(OPTION_ReportParameterAssignment, getSeverityString(ParameterAssignment));
401
		optionsMap.put(OPTION_ReportFallthroughCase, getSeverityString(FallthroughCase));
400
		return optionsMap;		
402
		return optionsMap;		
401
	}
403
	}
402
	
404
	
Lines 638-643 Link Here
638
		if ((optionValue = optionsMap.get(OPTION_ReportUnhandledWarningToken)) != null) updateSeverity(UnhandledWarningToken, optionValue);
640
		if ((optionValue = optionsMap.get(OPTION_ReportUnhandledWarningToken)) != null) updateSeverity(UnhandledWarningToken, optionValue);
639
		if ((optionValue = optionsMap.get(OPTION_ReportUnusedLabel)) != null) updateSeverity(UnusedLabel, optionValue);
641
		if ((optionValue = optionsMap.get(OPTION_ReportUnusedLabel)) != null) updateSeverity(UnusedLabel, optionValue);
640
		if ((optionValue = optionsMap.get(OPTION_ReportParameterAssignment)) != null) updateSeverity(ParameterAssignment, optionValue);
642
		if ((optionValue = optionsMap.get(OPTION_ReportParameterAssignment)) != null) updateSeverity(ParameterAssignment, optionValue);
643
		if ((optionValue = optionsMap.get(OPTION_ReportFallthroughCase)) != null) updateSeverity(FallthroughCase, optionValue);
641
644
642
		// Javadoc options
645
		// Javadoc options
643
		if ((optionValue = optionsMap.get(OPTION_DocCommentSupport)) != null) {
646
		if ((optionValue = optionsMap.get(OPTION_DocCommentSupport)) != null) {
Lines 867-872 Link Here
867
			OPTION_ReportDiscouragedReference,
870
			OPTION_ReportDiscouragedReference,
868
			OPTION_ReportEmptyStatement,
871
			OPTION_ReportEmptyStatement,
869
			OPTION_ReportEnumIdentifier,
872
			OPTION_ReportEnumIdentifier,
873
			OPTION_ReportFallthroughCase,
870
			OPTION_ReportFieldHiding,
874
			OPTION_ReportFieldHiding,
871
			OPTION_ReportFinalParameterBound,
875
			OPTION_ReportFinalParameterBound,
872
			OPTION_ReportFinallyBlockNotCompletingNormally,
876
			OPTION_ReportFinallyBlockNotCompletingNormally,
Lines 962-967 Link Here
962
					return "restriction"; //$NON-NLS-1$
966
					return "restriction"; //$NON-NLS-1$
963
				case (int) (NullReference >>> 32) :
967
				case (int) (NullReference >>> 32) :
964
					return "null"; //$NON-NLS-1$
968
					return "null"; //$NON-NLS-1$
969
				case (int) (FallthroughCase >>> 32) :
970
					return "fallthrough"; //$NON-NLS-1$
965
			}
971
			}
966
		}
972
		}
967
		return null;
973
		return null;
Lines 972-977 Link Here
972
		"boxing", //$NON-NLS-1$
978
		"boxing", //$NON-NLS-1$
973
		"dep-ann", //$NON-NLS-1$
979
		"dep-ann", //$NON-NLS-1$
974
		"deprecation", //$NON-NLS-1$
980
		"deprecation", //$NON-NLS-1$
981
		"fall-through", //$NON-NLS-1$
975
		"finally", //$NON-NLS-1$
982
		"finally", //$NON-NLS-1$
976
		"hiding", //$NON-NLS-1$
983
		"hiding", //$NON-NLS-1$
977
		"incomplete-switch", //$NON-NLS-1$
984
		"incomplete-switch", //$NON-NLS-1$
Lines 1004-1009 Link Here
1004
					return MissingDeprecatedAnnotation;
1011
					return MissingDeprecatedAnnotation;
1005
				break;
1012
				break;
1006
			case 'f' :
1013
			case 'f' :
1014
				if ("fallthrough".equals(warningToken)) //$NON-NLS-1$
1015
					return FallthroughCase;
1007
				if ("finally".equals(warningToken)) //$NON-NLS-1$
1016
				if ("finally".equals(warningToken)) //$NON-NLS-1$
1008
					return FinallyBlockNotCompleting;
1017
					return FinallyBlockNotCompleting;
1009
				break;
1018
				break;

Return to bug 67836