Lines 120-125
Link Here
|
120 |
public static final String OPTION_Process_Annotations = "org.eclipse.jdt.core.compiler.processAnnotations"; //$NON-NLS-1$ |
120 |
public static final String OPTION_Process_Annotations = "org.eclipse.jdt.core.compiler.processAnnotations"; //$NON-NLS-1$ |
121 |
public static final String OPTION_ReportRedundantSuperinterface = "org.eclipse.jdt.core.compiler.problem.redundantSuperinterface"; //$NON-NLS-1$ |
121 |
public static final String OPTION_ReportRedundantSuperinterface = "org.eclipse.jdt.core.compiler.problem.redundantSuperinterface"; //$NON-NLS-1$ |
122 |
public static final String OPTION_ReportComparingIdentical = "org.eclipse.jdt.core.compiler.problem.comparingIdentical"; //$NON-NLS-1$ |
122 |
public static final String OPTION_ReportComparingIdentical = "org.eclipse.jdt.core.compiler.problem.comparingIdentical"; //$NON-NLS-1$ |
|
|
123 |
public static final String OPTION_ReportMissingSynchronizedOnInheritedMethod = "org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod"; //$NON-NLS-1$ |
123 |
|
124 |
|
124 |
// Backward compatibility |
125 |
// Backward compatibility |
125 |
public static final String OPTION_ReportInvalidAnnotation = "org.eclipse.jdt.core.compiler.problem.invalidAnnotation"; //$NON-NLS-1$ |
126 |
public static final String OPTION_ReportInvalidAnnotation = "org.eclipse.jdt.core.compiler.problem.invalidAnnotation"; //$NON-NLS-1$ |
Lines 215-220
Link Here
|
215 |
public static final long UnusedWarningToken = ASTNode.Bit55L; |
216 |
public static final long UnusedWarningToken = ASTNode.Bit55L; |
216 |
public static final long RedundantSuperinterface = ASTNode.Bit56L; |
217 |
public static final long RedundantSuperinterface = ASTNode.Bit56L; |
217 |
public static final long ComparingIdentical = ASTNode.Bit57L; |
218 |
public static final long ComparingIdentical = ASTNode.Bit57L; |
|
|
219 |
public static final long MissingSynchronizedModifierInInheritedMethod= ASTNode.Bit58L; |
218 |
|
220 |
|
219 |
// Map: String optionKey --> Long irritant> |
221 |
// Map: String optionKey --> Long irritant> |
220 |
private static Map OptionToIrritants; |
222 |
private static Map OptionToIrritants; |
Lines 251-257
Link Here
|
251 |
| UnusedTypeArguments |
253 |
| UnusedTypeArguments |
252 |
| NullReference |
254 |
| NullReference |
253 |
| UnusedWarningToken |
255 |
| UnusedWarningToken |
254 |
| ComparingIdentical; |
256 |
| ComparingIdentical |
|
|
257 |
| MissingSynchronizedModifierInInheritedMethod; |
255 |
|
258 |
|
256 |
// By default only lines and source attributes are generated. |
259 |
// By default only lines and source attributes are generated. |
257 |
public int produceDebugAttributes = ClassFileConstants.ATTR_SOURCE | ClassFileConstants.ATTR_LINES; |
260 |
public int produceDebugAttributes = ClassFileConstants.ATTR_SOURCE | ClassFileConstants.ATTR_LINES; |
Lines 463-468
Link Here
|
463 |
optionsMap.put(OPTION_Process_Annotations, this.processAnnotations ? ENABLED : DISABLED); |
466 |
optionsMap.put(OPTION_Process_Annotations, this.processAnnotations ? ENABLED : DISABLED); |
464 |
optionsMap.put(OPTION_ReportRedundantSuperinterface, getSeverityString(RedundantSuperinterface)); |
467 |
optionsMap.put(OPTION_ReportRedundantSuperinterface, getSeverityString(RedundantSuperinterface)); |
465 |
optionsMap.put(OPTION_ReportComparingIdentical, getSeverityString(ComparingIdentical)); |
468 |
optionsMap.put(OPTION_ReportComparingIdentical, getSeverityString(ComparingIdentical)); |
|
|
469 |
optionsMap.put(OPTION_ReportMissingSynchronizedOnInheritedMethod, getSeverityString(MissingSynchronizedModifierInInheritedMethod)); |
466 |
return optionsMap; |
470 |
return optionsMap; |
467 |
} |
471 |
} |
468 |
|
472 |
|
Lines 595-600
Link Here
|
595 |
return OPTION_ReportRedundantSuperinterface; |
599 |
return OPTION_ReportRedundantSuperinterface; |
596 |
case (int)(ComparingIdentical >>> 32) : |
600 |
case (int)(ComparingIdentical >>> 32) : |
597 |
return OPTION_ReportComparingIdentical; |
601 |
return OPTION_ReportComparingIdentical; |
|
|
602 |
case (int)(MissingSynchronizedModifierInInheritedMethod >>> 32) : |
603 |
return OPTION_ReportMissingSynchronizedOnInheritedMethod; |
598 |
} |
604 |
} |
599 |
} |
605 |
} |
600 |
return null; |
606 |
return null; |
Lines 884-889
Link Here
|
884 |
if ((optionValue = optionsMap.get(OPTION_ReportUnusedTypeArgumentsForMethodInvocation)) != null) updateSeverity(UnusedTypeArguments, optionValue); |
890 |
if ((optionValue = optionsMap.get(OPTION_ReportUnusedTypeArgumentsForMethodInvocation)) != null) updateSeverity(UnusedTypeArguments, optionValue); |
885 |
if ((optionValue = optionsMap.get(OPTION_ReportRedundantSuperinterface)) != null) updateSeverity(RedundantSuperinterface, optionValue); |
891 |
if ((optionValue = optionsMap.get(OPTION_ReportRedundantSuperinterface)) != null) updateSeverity(RedundantSuperinterface, optionValue); |
886 |
if ((optionValue = optionsMap.get(OPTION_ReportComparingIdentical)) != null) updateSeverity(ComparingIdentical, optionValue); |
892 |
if ((optionValue = optionsMap.get(OPTION_ReportComparingIdentical)) != null) updateSeverity(ComparingIdentical, optionValue); |
|
|
893 |
if ((optionValue = optionsMap.get(OPTION_ReportMissingSynchronizedOnInheritedMethod)) != null) updateSeverity(MissingSynchronizedModifierInInheritedMethod, optionValue); |
887 |
|
894 |
|
888 |
// Javadoc options |
895 |
// Javadoc options |
889 |
if ((optionValue = optionsMap.get(OPTION_DocCommentSupport)) != null) { |
896 |
if ((optionValue = optionsMap.get(OPTION_DocCommentSupport)) != null) { |
Lines 1081-1086
Link Here
|
1081 |
buf.append("\n\t- unused type arguments for method/constructor invocation: ").append(getSeverityString(UnusedTypeArguments)); //$NON-NLS-1$ |
1088 |
buf.append("\n\t- unused type arguments for method/constructor invocation: ").append(getSeverityString(UnusedTypeArguments)); //$NON-NLS-1$ |
1082 |
buf.append("\n\t- redundant superinterface: ").append(getSeverityString(RedundantSuperinterface)); //$NON-NLS-1$ |
1089 |
buf.append("\n\t- redundant superinterface: ").append(getSeverityString(RedundantSuperinterface)); //$NON-NLS-1$ |
1083 |
buf.append("\n\t- comparing identical expr: ").append(getSeverityString(ComparingIdentical)); //$NON-NLS-1$ |
1090 |
buf.append("\n\t- comparing identical expr: ").append(getSeverityString(ComparingIdentical)); //$NON-NLS-1$ |
|
|
1091 |
buf.append("\n\t- missing synchronized on inherited method: ").append(getSeverityString(MissingSynchronizedModifierInInheritedMethod)); //$NON-NLS-1$ |
1084 |
return buf.toString(); |
1092 |
return buf.toString(); |
1085 |
} |
1093 |
} |
1086 |
|
1094 |
|
Lines 1321-1326
Link Here
|
1321 |
"unqualified-field-access", //$NON-NLS-1$ |
1329 |
"unqualified-field-access", //$NON-NLS-1$ |
1322 |
"unused", //$NON-NLS-1$ |
1330 |
"unused", //$NON-NLS-1$ |
1323 |
}; |
1331 |
}; |
|
|
1332 |
|
1324 |
public static long warningTokenToIrritants(String warningToken) { |
1333 |
public static long warningTokenToIrritants(String warningToken) { |
1325 |
// keep in sync with warningTokens and warningTokenFromIrritant |
1334 |
// keep in sync with warningTokens and warningTokenFromIrritant |
1326 |
if (warningToken == null || warningToken.length() == 0) return 0; |
1335 |
if (warningToken == null || warningToken.length() == 0) return 0; |