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

          Attachments

            Issue Links

              Activity

                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: