Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8005629

javac warnings compiling java.awt.EventDispatchThread and sun.awt.X11.XIconWindow

    Details

    • Subcomponent:
    • Resolved In Build:
      b78

      Backports

        Description

        javac warnings are a lot more obvious with the new build. For the jdk repo then there are currently 3 warnings, all java.awt, when compiling on Linux. There would of course be hundreds of warnings if we compiled the entire jdk repo with -Xlint:all.

        Compiling 9907 files for BUILD_JDK
        /u/alanb/ws/profiles/jdk/src/share/classes/java/awt/EventDispatchThread.java:123: warning: non-varargs call of varargs method with inexact argument type for last parameter;
                        final Method evaluateMethod = Class.forName("sun.lwawt.macosx.EventDispatchAccess").getMethod("evaluate", null);
                                                                                                                                  ^
          cast to Class<?> for a varargs call
          cast to Class<?>[] for a non-varargs call and to suppress this warning
        /u/alanb/ws/profiles/jdk/src/share/classes/java/awt/EventDispatchThread.java:126: warning: non-varargs call of varargs method with inexact argument type for last parameter;
                                return ((Boolean)evaluateMethod.invoke(cond, null)).booleanValue();
                                                                             ^
          cast to Object for a varargs call
          cast to Object[] for a non-varargs call and to suppress this warning

        /u/alanb/ws/profiles/jdk/src/solaris/classes/sun/awt/X11/XIconWindow.java:95: warning: non-varargs call of varargs method with inexact argument type for last parameter;
                log.finest("Icon sizes: {0}", sizeList);
                                              ^
          cast to Object for a varargs call
          cast to Object[] for a non-varargs call and to suppress this warning
        Note: Some input files use or override a deprecated API.
        Note: Recompile with -Xlint:deprecation for details.
        Note: Some input files use unchecked or unsafe operations.
        Note: Recompile with -Xlint:unchecked for details.
        3 warnings

          Activity

          Hide
          art Artem Ananiev added a comment -
          XIconWindow should be easy to fix. As for the warning in EDT.java, I would love to get rid of this OS X specific workaround from shared code at all or rewrite it using supported API. Such dependencies as EDT._macosxGetConditional() method are very hard to track and very easy to break.
          Show
          art Artem Ananiev added a comment - XIconWindow should be easy to fix. As for the warning in EDT.java, I would love to get rid of this OS X specific workaround from shared code at all or rewrite it using supported API. Such dependencies as EDT._macosxGetConditional() method are very hard to track and very easy to break.
          Hide
          hgupdate HG Updates added a comment -
          URL: http://hg.openjdk.java.net/jdk8/awt/jdk/rev/c552cde0e3f9
          User: serb
          Date: 2013-02-13 15:34:40 +0000
          Show
          hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk8/awt/jdk/rev/c552cde0e3f9 User: serb Date: 2013-02-13 15:34:40 +0000
          Hide
          hgupdate HG Updates added a comment -
          URL: http://hg.openjdk.java.net/jdk8/jdk8/jdk/rev/c552cde0e3f9
          User: lana
          Date: 2013-02-15 17:35:39 +0000
          Show
          hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk8/jdk8/jdk/rev/c552cde0e3f9 User: lana Date: 2013-02-15 17:35:39 +0000

            People

            • Assignee:
              pchelko Petr Pchelko (Inactive)
              Reporter:
              alanb Alan Bateman
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: