Bug Tracker item #3418258, was opened at 2011-10-04 03:17
Message generated for change (Comment added) made by bphinz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1126848&aid=3418258&group_id=254363

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Java viewer
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: D. R. Commander (dcommander)
Assigned to: Brian Hinz (bphinz)
Summary: New Java viewer produces tons of warnings under OpenJDK

Initial Comment:
When building our new Java viewer using OpenJDK (the default Java environment 
on RHEL 5 and many newer distros of Linux), about 75 warnings are generated.  
These are mostly innocuous things such as unused imports, but they should 
really be cleaned up.


----------------------------------------------------------------------

>Comment By: Brian Hinz (bphinz)
Date: 2011-10-08 20:53

Message:
That is nuts!  OpenJDK on EL5 produces 147 warnings, compared to 19 on
Ubuntu 11.04.   I'll get cracking on cleaning those up.  Thanks

----------------------------------------------------------------------

Comment By: D. R. Commander (dcommander)
Date: 2011-10-06 03:24

Message:
As I look at these more closely, some of the warnings concern me.  For
instance, I am getting warnings regarding using static methods and members
in non-static ways.  I think that, for instance, you don't really intend
for Screen.id, Screen.dimensions, and Screen.flags to be static.

Not sure why Oracle JDK isn't producing these same warnings with
-Xlint:all

If you're using OpenJDK, try adding

  -nowarn -warn:+staticReceiver,unusedImport,unusedLocal,unusedPrivate

to your javac command line.  That should give you the exact set of
warnings that I'm seeing.


----------------------------------------------------------------------

Comment By: D. R. Commander (dcommander)
Date: 2011-10-05 15:15

Message:
Re-opening because, unfortunately, -Xlint:all,-serial,-cast seems to be
ignored by the version of OpenJDK I'm using (on RHEL 5.)  It doesn't
decrease the warnings at all, nor does r4694.


----------------------------------------------------------------------

Comment By: Brian Hinz (bphinz)
Date: 2011-10-04 19:56

Message:
Just committed change r4694, which should clean up some of these warnings,
but I still don't see anywhere near the same number of warnings.  I don't
know if this is a difference between what's enabled on 1.6.0_22 (Ubuntu
11.04) and RHEL5 or not.  I'll have to load up a RHEL5 vm to test it.

Also, I set the linter flags to filter out serial and cast warnings, let
me know if you disagree with this and I can revert that.

----------------------------------------------------------------------

Comment By: D. R. Commander (dcommander)
Date: 2011-10-04 14:15

Message:
It happens irrespective of the build system.  I can simply do:

cd tigervnc/java/src
javac -1.5 -cp . com/tigervnc/vncviewer/*.java

and get 152 warnings, of which about half are from the VncViewer code (the
other half from JZlib.)  These are the warnings it enables by default on
RHEL 5:

      assertIdentifier   + 'assert' used as identifier
      charConcat         + char[] in String concat
      constructorName    + method with constructor name
      deprecation        + deprecation outside deprecated code
      discouraged        + use of types matching a discouraged access
rule
      finally            + finally block not completing normally
      forbidden          + use of types matching a forbidden access rule
      intfAnnotation     + annotation type used as super interface
      intfNonInherited   + interface non-inherited method compatibility
      maskedCatchBlock   + hidden catch block
      noEffectAssign     + assignment without effect
      pkgDefaultMethod   + attempt to override package-default method
      serial             + missing serialVersionUID
      staticReceiver     + non-static reference to static member
      suppress           + enable @SuppressWarnings
      typeHiding         + type parameter hiding another type
      unchecked          + unchecked type operation
      unusedImport       + unused import declaration
      unusedLabel        + unused label
      unusedLocal        + unread local variable
      unusedPrivate      + unused private member declaration
      varargsCast        + varargs argument need explicit cast
      warningToken       + unhandled warning token in @SuppressWarnings


----------------------------------------------------------------------

Comment By: Brian Hinz (bphinz)
Date: 2011-10-04 06:24

Message:
Is this before or after the cmake integration?  I've been using OpenJDK for
quite a while and don't get any warnings with the pre-cmake build.  With
-Xlint, I do see 63 warnings, but > half are in JZlib, which I would prefer
not to change.  The others I'll work on.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1126848&aid=3418258&group_id=254363

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
_______________________________________________
Tigervnc-devel mailing list
Tigervnc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tigervnc-devel

Reply via email to