Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-releng-dev] Warnings in latest builds


Hi,

We found few different warnings in latest builds. The compiler has been updated to a more recent version that reports more warnings. We believe it makes sense to get rid of these warnings.

1) Missing serialVersionUID fields

In order to fix this one, you need to be sure to use the definition of the class when it has been created. Otherwise serialized instances of the classes won't be able to be deserialized. When the serialVersionUID field is not provided and the default serialization is used, the serialized instances are compiler-dependant. Updated versions of the Eclipse compiler might break the deserialization of the instances. More likely if another compiler is used (jikes, javac).

2) 'enum' as an identifier.
In order to prevent problems when the source is compiled with a 1.5 compiler, this identifier has to be renamed. Thanks to the wonderful refactoring feature, it is extremely easy to fix this warning. In 1.5, enum is a keyword and therefore cannot be used as an identifier.

3) Assignment has no effect.
This one is reported when trying to assign the same local of instance variable into itself. Trivial to fix.

4) hidden method doesn't override ...
This is when a method is defined in a subclass and it doesn't override the one from the superclass due to visibility problem. This can be intentional, but it is confusing when reading the code. So the best is to rename the method.

5) static fields accessed in a non-static way
This is reported when accessing a static field using a receiver. Only the class name should be used. In this case, the static fields are accessed using 'super.'. This is not required.

Hope this helps to fix these warnings. The sooner, the better.

Olivier
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
Here is a summary of the warnings found in the latest build:

org.apache.lucene
3 missing serialVersionUID fields

org.eclipse.ant.core:
1 missing serialVersionUID field

org.eclipse.ant.tests.ui:
1 missing serialVersionUID field

org.eclipse.ant.ui:
2 missing serialVersionUID fields

org.eclipse.ant.ui: (remoteAnt.jar)
1 missing serialVersionUID field

org.eclipse.core.runtime:
1 missing serialVersionUID field

org.eclipse.debug.core:
2 missing serialVersionUID fields

org.eclipse.ftp:
3 missing serialVersionUID fields

org.eclipse.help.base:
5 missing serialVersionUID fields

org.eclipse.help.webapp: (jsp.jar)
46 missing serialVersionUID fields

org.eclipse.help.webapp: (servelts.jar)
6 missing serialVersionUID fields

org.eclipse.help:
1 missing serialVersionUID field

org.eclipse.jdt.debug: (jdi.jar)
24 missing serialVersionUID fields

org.eclipse.jdt.debug: (jdimodel.jar)
7 missing serialVersionUID fields

org.eclipse.jdt.launching:
1 missing serialVersionUID field

org.eclipse.jdt.ui.tests:
1 missing serialVersionUID field

org.eclipse.jdt.ui:
2 missing serialVersionUID fields

org.eclipse.jface:
9 missing serialVersionUID fields

org.eclipse.osgi: (console.jar)
3 enum as identifier

org.eclipse.osgi: (core.jar)
29 enum as identifier
11 missing serialVersionUID fields

org.eclipse.osgi: (defaultAdaptor.jar)
2 enum as identifier

org.eclipse.osgi: (eclipseAdaptor.jar)
9 enum as identifier
2 missing serialVersionUID fields

org.eclipse.osgi: (osgi.jar)
2 enum as identifier
13 missing serialVersionUID fields

org.eclipse.osgi: (resolver.jar)
2 missing serialVersionUID fields

org.eclipse.pde.build:
6 enum as identifier

org.eclipse.pde.core:
58 missing serialVersionUID fields

org.eclipse.pde.ui:
11 missing serialVersionUID fields

org.eclipse.search:
2 missing serialVersionUID fields

org.eclipse.swt.carbon:
40 missing serialVersionUID fields

org.eclipse.swt.gtk64: (swt-mozilla.jar)
637 static fields accessed in a non-static way

org.eclipse.swt.gtk64: (swt.jar)
40 missing serialVersionUID fields

org.eclipse.swt.gtk: (swt-mozilla.jar)
637 static fields accessed in a non-static way

org.eclipse.swt.gtk: (swt.jar)
40 missing serialVersionUID fields

org.eclipse.swt.motif: (swt-mozilla.jar)
637 static fields accessed in a non-static way

org.eclipse.swt.motif: (swt.jar)
40 missing serialVersionUID fields
2 hidden methods don't override ...

org.eclipse.swt.photon:
40 missing serialVersionUID fields

org.eclipse.swt.win32:
40 missing serialVersionUID fields
5 hidden methods don't override ...

org.eclipse.test
3 enum as identifier
1 missing serialVersionUID field

org.eclipse.ui.cheatsheets
6 enum as identifier
1 missing serialVersionUID field

org.eclipse.ui.forms
2 missing serialVersionUID fields

org.eclipse.ui.ide
39 enum as identifier

org.eclipse.ui.presentation:
1 missing serialVersionUID field
1 hidden method doesn't override ...

org.eclipse.ui.tests
1 assignment to variable has no effect

org.eclipse.ui.views
3 enum as identifier

org.eclipse.ui.workbench
109 enum as identifier
11 missing serialVersionUID fields

org.eclipse.update.configurator
1 missing serialVersionUID field

org.eclipse.update.core
7 missing serialVersionUID fields
3 enum as identifier

org.eclipse.update.ui
4 missing serialVersionUID fields
6 enum as identifier

org.eclipse.webdav
22 enum as identifier
13 missing serialVersionUID fields

Back to the top