Lines 125-131
Link Here
|
125 |
public static final String OPTION_ReportMissingSynchronizedOnInheritedMethod = "org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod"; //$NON-NLS-1$ |
125 |
public static final String OPTION_ReportMissingSynchronizedOnInheritedMethod = "org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod"; //$NON-NLS-1$ |
126 |
public static final String OPTION_ReportMissingHashCodeMethod = "org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod"; //$NON-NLS-1$ |
126 |
public static final String OPTION_ReportMissingHashCodeMethod = "org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod"; //$NON-NLS-1$ |
127 |
public static final String OPTION_ReportDeadCode = "org.eclipse.jdt.core.compiler.problem.deadCode"; //$NON-NLS-1$ |
127 |
public static final String OPTION_ReportDeadCode = "org.eclipse.jdt.core.compiler.problem.deadCode"; //$NON-NLS-1$ |
128 |
public static final String OPTION_ReportDeadCodeInTrivialIfStatement = "org.eclipse.jdt.core.compiler.problem.deadCodeInTrivialIfStatement"; //$NON-NLS-1$ |
128 |
public static final String OPTION_ReportDeadCodeInTrivialIfStatement = "org.eclipse.jdt.core.compiler.problem.deadCodeInTrivialIfStatement"; //$NON-NLS-1$ |
|
|
129 |
public static final String OPTION_ReportUnnecessaryOperator = "org.eclipse.jdt.core.compiler.problem.unnecessaryOperator"; //$NON-NLS-1$ |
129 |
|
130 |
|
130 |
// Backward compatibility |
131 |
// Backward compatibility |
131 |
public static final String OPTION_ReportInvalidAnnotation = "org.eclipse.jdt.core.compiler.problem.invalidAnnotation"; //$NON-NLS-1$ |
132 |
public static final String OPTION_ReportInvalidAnnotation = "org.eclipse.jdt.core.compiler.problem.invalidAnnotation"; //$NON-NLS-1$ |
Lines 230-235
Link Here
|
230 |
// group 2 |
231 |
// group 2 |
231 |
public static final int ShouldImplementHashcode = IrritantSet.GROUP2 | ASTNode.Bit1; |
232 |
public static final int ShouldImplementHashcode = IrritantSet.GROUP2 | ASTNode.Bit1; |
232 |
public static final int DeadCode = IrritantSet.GROUP2 | ASTNode.Bit2; |
233 |
public static final int DeadCode = IrritantSet.GROUP2 | ASTNode.Bit2; |
|
|
234 |
public static final int UnnecessaryOperator = IrritantSet.GROUP2 | ASTNode.Bit3; |
233 |
|
235 |
|
234 |
// Severity level for handlers |
236 |
// Severity level for handlers |
235 |
/** |
237 |
/** |
Lines 512-517
Link Here
|
512 |
return OPTION_ReportMissingHashCodeMethod; |
514 |
return OPTION_ReportMissingHashCodeMethod; |
513 |
case DeadCode : |
515 |
case DeadCode : |
514 |
return OPTION_ReportDeadCode; |
516 |
return OPTION_ReportDeadCode; |
|
|
517 |
case UnnecessaryOperator : |
518 |
return OPTION_ReportUnnecessaryOperator; |
515 |
} |
519 |
} |
516 |
return null; |
520 |
return null; |
517 |
} |
521 |
} |
Lines 595-600
Link Here
|
595 |
OPTION_ReportAssertIdentifier, |
599 |
OPTION_ReportAssertIdentifier, |
596 |
OPTION_ReportAutoboxing, |
600 |
OPTION_ReportAutoboxing, |
597 |
OPTION_ReportDeadCode, |
601 |
OPTION_ReportDeadCode, |
|
|
602 |
OPTION_ReportUnnecessaryOperator, |
598 |
OPTION_ReportDeprecation, |
603 |
OPTION_ReportDeprecation, |
599 |
OPTION_ReportDiscouragedReference, |
604 |
OPTION_ReportDiscouragedReference, |
600 |
OPTION_ReportEmptyStatement, |
605 |
OPTION_ReportEmptyStatement, |
Lines 887-892
Link Here
|
887 |
optionsMap.put(OPTION_ReportMissingHashCodeMethod, getSeverityString(ShouldImplementHashcode)); |
892 |
optionsMap.put(OPTION_ReportMissingHashCodeMethod, getSeverityString(ShouldImplementHashcode)); |
888 |
optionsMap.put(OPTION_ReportDeadCode, getSeverityString(DeadCode)); |
893 |
optionsMap.put(OPTION_ReportDeadCode, getSeverityString(DeadCode)); |
889 |
optionsMap.put(OPTION_ReportDeadCodeInTrivialIfStatement, this.reportDeadCodeInTrivialIfStatement ? ENABLED : DISABLED); |
894 |
optionsMap.put(OPTION_ReportDeadCodeInTrivialIfStatement, this.reportDeadCodeInTrivialIfStatement ? ENABLED : DISABLED); |
|
|
895 |
optionsMap.put(OPTION_ReportUnnecessaryOperator, getSeverityString(UnnecessaryOperator)); |
890 |
return optionsMap; |
896 |
return optionsMap; |
891 |
} |
897 |
} |
892 |
|
898 |
|
Lines 1280-1285
Link Here
|
1280 |
if ((optionValue = optionsMap.get(OPTION_ReportMissingSynchronizedOnInheritedMethod)) != null) updateSeverity(MissingSynchronizedModifierInInheritedMethod, optionValue); |
1286 |
if ((optionValue = optionsMap.get(OPTION_ReportMissingSynchronizedOnInheritedMethod)) != null) updateSeverity(MissingSynchronizedModifierInInheritedMethod, optionValue); |
1281 |
if ((optionValue = optionsMap.get(OPTION_ReportMissingHashCodeMethod)) != null) updateSeverity(ShouldImplementHashcode, optionValue); |
1287 |
if ((optionValue = optionsMap.get(OPTION_ReportMissingHashCodeMethod)) != null) updateSeverity(ShouldImplementHashcode, optionValue); |
1282 |
if ((optionValue = optionsMap.get(OPTION_ReportDeadCode)) != null) updateSeverity(DeadCode, optionValue); |
1288 |
if ((optionValue = optionsMap.get(OPTION_ReportDeadCode)) != null) updateSeverity(DeadCode, optionValue); |
|
|
1289 |
if ((optionValue = optionsMap.get(OPTION_ReportUnnecessaryOperator)) != null) updateSeverity(UnnecessaryOperator, optionValue); |
1283 |
|
1290 |
|
1284 |
// Javadoc options |
1291 |
// Javadoc options |
1285 |
if ((optionValue = optionsMap.get(OPTION_DocCommentSupport)) != null) { |
1292 |
if ((optionValue = optionsMap.get(OPTION_DocCommentSupport)) != null) { |