[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[platform-releng-dev] Compiler settings to prevent warnings during build
|
Hi,
In order to get rid of the remaining warnings in integration builds, the
best way is to change from warning to error the severity of some compiler
settings.
Here are the settings that you might want to change. It is better to save
it for each project. Then if a user loaded the project, it preserves the
right compiler settings.
In the compiler prefs page:
Compiler compliance level: 1.4
- Uncheck "use default compliance settings"
- set usage of assert and enum identifier to error
Error/Warnings page:
Code style:
- Non-static access to static member: error
- Indirect access to static member: error (this one is ignored by default,
but it is a good style to target the right class directly)
- Method with a constructor name: error
Potential programming problems:
- Serializable class without serialVersionUID: error
- Assignment has no effect (e.g. 'x = x'): error
- 'finally' does not complete normally: error
- Using a char array in string concatenation: error
- Hidden catch block: error
Name shadowing and conflicts:
- Method overridden but not package visible: error
- Interface method conflicts with protected 'Object' method: error
Unnecessary code:
- Unused import: error
- Unused break/continue label: error
- Local variable is never read: error
- Unused local or private member: error
I didn't change the javadoc settings, since they could flag internal code.
If you have any question/concern, let me know.
Olivier