Lines 122-127
Link Here
|
122 |
public static final String OPTION_ReportRedundantSuperinterface = "org.eclipse.jdt.core.compiler.problem.redundantSuperinterface"; //$NON-NLS-1$ |
122 |
public static final String OPTION_ReportRedundantSuperinterface = "org.eclipse.jdt.core.compiler.problem.redundantSuperinterface"; //$NON-NLS-1$ |
123 |
public static final String OPTION_ReportComparingIdentical = "org.eclipse.jdt.core.compiler.problem.comparingIdentical"; //$NON-NLS-1$ |
123 |
public static final String OPTION_ReportComparingIdentical = "org.eclipse.jdt.core.compiler.problem.comparingIdentical"; //$NON-NLS-1$ |
124 |
public static final String OPTION_ReportMissingSynchronizedOnInheritedMethod = "org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod"; //$NON-NLS-1$ |
124 |
public static final String OPTION_ReportMissingSynchronizedOnInheritedMethod = "org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod"; //$NON-NLS-1$ |
|
|
125 |
public static final String OPTION_ReportMissingHashCodeMethod = "org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod"; //$NON-NLS-1$ |
125 |
|
126 |
|
126 |
// Backward compatibility |
127 |
// Backward compatibility |
127 |
public static final String OPTION_ReportInvalidAnnotation = "org.eclipse.jdt.core.compiler.problem.invalidAnnotation"; //$NON-NLS-1$ |
128 |
public static final String OPTION_ReportInvalidAnnotation = "org.eclipse.jdt.core.compiler.problem.invalidAnnotation"; //$NON-NLS-1$ |
Lines 224-231
Link Here
|
224 |
public static final int MissingSynchronizedModifierInInheritedMethod= IrritantSet.GROUP1 | ASTNode.Bit29; |
225 |
public static final int MissingSynchronizedModifierInInheritedMethod= IrritantSet.GROUP1 | ASTNode.Bit29; |
225 |
|
226 |
|
226 |
// group 2 |
227 |
// group 2 |
227 |
// NEXT IRRITANT GOES HERE (group1 is complete already) |
228 |
public static final int ShouldImplementHashcode= IrritantSet.GROUP2 | ASTNode.Bit1; |
228 |
// public static final int FirstInGroup2 = IrritantSet.GROUP2 | ASTNode.Bit1; |
|
|
229 |
|
229 |
|
230 |
// Map: String optionKey --> Long irritant> |
230 |
// Map: String optionKey --> Long irritant> |
231 |
private static Map OptionToIrritants; |
231 |
private static Map OptionToIrritants; |
Lines 476-481
Link Here
|
476 |
return OPTION_ReportComparingIdentical; |
476 |
return OPTION_ReportComparingIdentical; |
477 |
case MissingSynchronizedModifierInInheritedMethod : |
477 |
case MissingSynchronizedModifierInInheritedMethod : |
478 |
return OPTION_ReportMissingSynchronizedOnInheritedMethod; |
478 |
return OPTION_ReportMissingSynchronizedOnInheritedMethod; |
|
|
479 |
case ShouldImplementHashcode : |
480 |
return OPTION_ReportMissingHashCodeMethod; |
479 |
} |
481 |
} |
480 |
return null; |
482 |
return null; |
481 |
} |
483 |
} |
Lines 890-895
Link Here
|
890 |
optionsMap.put(OPTION_ReportRedundantSuperinterface, getSeverityString(RedundantSuperinterface)); |
892 |
optionsMap.put(OPTION_ReportRedundantSuperinterface, getSeverityString(RedundantSuperinterface)); |
891 |
optionsMap.put(OPTION_ReportComparingIdentical, getSeverityString(ComparingIdentical)); |
893 |
optionsMap.put(OPTION_ReportComparingIdentical, getSeverityString(ComparingIdentical)); |
892 |
optionsMap.put(OPTION_ReportMissingSynchronizedOnInheritedMethod, getSeverityString(MissingSynchronizedModifierInInheritedMethod)); |
894 |
optionsMap.put(OPTION_ReportMissingSynchronizedOnInheritedMethod, getSeverityString(MissingSynchronizedModifierInInheritedMethod)); |
|
|
895 |
optionsMap.put(OPTION_ReportMissingHashCodeMethod, getSeverityString(ShouldImplementHashcode)); |
893 |
return optionsMap; |
896 |
return optionsMap; |
894 |
} |
897 |
} |
895 |
|
898 |
|
Lines 1260-1265
Link Here
|
1260 |
if ((optionValue = optionsMap.get(OPTION_ReportRedundantSuperinterface)) != null) updateSeverity(RedundantSuperinterface, optionValue); |
1263 |
if ((optionValue = optionsMap.get(OPTION_ReportRedundantSuperinterface)) != null) updateSeverity(RedundantSuperinterface, optionValue); |
1261 |
if ((optionValue = optionsMap.get(OPTION_ReportComparingIdentical)) != null) updateSeverity(ComparingIdentical, optionValue); |
1264 |
if ((optionValue = optionsMap.get(OPTION_ReportComparingIdentical)) != null) updateSeverity(ComparingIdentical, optionValue); |
1262 |
if ((optionValue = optionsMap.get(OPTION_ReportMissingSynchronizedOnInheritedMethod)) != null) updateSeverity(MissingSynchronizedModifierInInheritedMethod, optionValue); |
1265 |
if ((optionValue = optionsMap.get(OPTION_ReportMissingSynchronizedOnInheritedMethod)) != null) updateSeverity(MissingSynchronizedModifierInInheritedMethod, optionValue); |
|
|
1266 |
if ((optionValue = optionsMap.get(OPTION_ReportMissingHashCodeMethod)) != null) updateSeverity(ShouldImplementHashcode, optionValue); |
1263 |
|
1267 |
|
1264 |
// Javadoc options |
1268 |
// Javadoc options |
1265 |
if ((optionValue = optionsMap.get(OPTION_DocCommentSupport)) != null) { |
1269 |
if ((optionValue = optionsMap.get(OPTION_DocCommentSupport)) != null) { |
Lines 1456-1461
Link Here
|
1456 |
buf.append("\n\t- redundant superinterface: ").append(getSeverityString(RedundantSuperinterface)); //$NON-NLS-1$ |
1460 |
buf.append("\n\t- redundant superinterface: ").append(getSeverityString(RedundantSuperinterface)); //$NON-NLS-1$ |
1457 |
buf.append("\n\t- comparing identical expr: ").append(getSeverityString(ComparingIdentical)); //$NON-NLS-1$ |
1461 |
buf.append("\n\t- comparing identical expr: ").append(getSeverityString(ComparingIdentical)); //$NON-NLS-1$ |
1458 |
buf.append("\n\t- missing synchronized on inherited method: ").append(getSeverityString(MissingSynchronizedModifierInInheritedMethod)); //$NON-NLS-1$ |
1462 |
buf.append("\n\t- missing synchronized on inherited method: ").append(getSeverityString(MissingSynchronizedModifierInInheritedMethod)); //$NON-NLS-1$ |
|
|
1463 |
buf.append("\n\t- should implement hashCode() method: ").append(getSeverityString(ShouldImplementHashcode)); //$NON-NLS-1$ |
1459 |
return buf.toString(); |
1464 |
return buf.toString(); |
1460 |
} |
1465 |
} |
1461 |
|
1466 |
|