I've been running svn builds compiled for java7 for some time now and
noticed the log increased a lot with wanrings, npes etc after playing a
while.

Qutting and restarting, then loading a game from just before the errors
started often gave a message that AI integrity check failed, but could be
fixed.
Saving the fixed game, quitting/restarting/reloading and continuing the
game did not repeat the errors again.

To me this suggests that when active for a while all kind of things get
corrupted.

A while ago i submitted a patch for an "unchecked" warning in
BuildQueue.Java that could cause possible heap pollution.
Websearch indicated that this only occurred on Java7 , and could be
suppressed with a SuppressWarnings directive in the code (my patch didn't
use that).

I ran

find . -type f -exec grep -l 'SuppressWarnings' {} \;
from the src/net/sf/freecol folder and found many files where
SuppressWarnings is used.

further analysis showed there are 3 kinds of warnings that are suppressed :

A. @SuppressWarnings("static-access")
B. @SuppressWarnings("unused")
C. @SuppressWarnings("unchecked")

A is only used in Freecol.java , B and C occur in multiple files.

The SuppressWarnings don't seem to come with many explanation why they are
used.

Personally i feel using SuppressWarnings hides problems in the code that
need to be taken care of, not hidden.

Are there disadvantages to removing/commenting out the SuppressWarnings ?



------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Freecol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freecol-developers

Reply via email to