changeset 11169:258959486dc2

8067092: Suppress windows-specific deprecation warnings in the java.desktop module Reviewed-by: prr, alanb
author darcy
date Tue, 16 Dec 2014 09:57:33 -0800
parents e0a52d4987aa
children f85dbd5ae7be 07175dc5b2da
files src/java.desktop/windows/classes/sun/awt/Win32GraphicsDevice.java src/java.desktop/windows/classes/sun/awt/windows/WInputMethod.java src/java.desktop/windows/classes/sun/awt/windows/WKeyboardFocusManagerPeer.java src/java.desktop/windows/classes/sun/awt/windows/WListPeer.java src/java.desktop/windows/classes/sun/awt/windows/WScrollPanePeer.java src/java.desktop/windows/classes/sun/awt/windows/WTrayIconPeer.java src/java.desktop/windows/classes/sun/java2d/d3d/D3DGraphicsConfig.java src/java.desktop/windows/classes/sun/java2d/d3d/D3DGraphicsDevice.java src/java.desktop/windows/classes/sun/java2d/d3d/D3DScreenUpdateManager.java src/java.desktop/windows/classes/sun/java2d/d3d/D3DVolatileSurfaceManager.java src/java.desktop/windows/classes/sun/java2d/opengl/WGLGraphicsConfig.java src/java.desktop/windows/classes/sun/java2d/opengl/WGLVolatileSurfaceManager.java
diffstat 12 files changed, 22 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.desktop/windows/classes/sun/awt/Win32GraphicsDevice.java	Tue Dec 16 20:23:46 2014 +0300
+++ b/src/java.desktop/windows/classes/sun/awt/Win32GraphicsDevice.java	Tue Dec 16 09:57:33 2014 -0800
@@ -329,6 +329,7 @@
     }
 
     @Override
+    @SuppressWarnings("deprecation")
     public synchronized void setFullScreenWindow(Window w) {
         Window old = getFullScreenWindow();
         if (w == old) {
@@ -404,6 +405,7 @@
     }
 
     @Override
+    @SuppressWarnings("deprecation")
     public synchronized void setDisplayMode(DisplayMode dm) {
         if (!isDisplayChangeSupported()) {
             super.setDisplayMode(dm);
--- a/src/java.desktop/windows/classes/sun/awt/windows/WInputMethod.java	Tue Dec 16 20:23:46 2014 +0300
+++ b/src/java.desktop/windows/classes/sun/awt/windows/WInputMethod.java	Tue Dec 16 09:57:33 2014 -0800
@@ -606,6 +606,7 @@
 
     // java.awt.Toolkit#getNativeContainer() is not available
     //  from this package
+    @SuppressWarnings("deprecation")
     private WComponentPeer getNearestNativePeer(Component comp)
     {
         if (comp==null)     return null;
--- a/src/java.desktop/windows/classes/sun/awt/windows/WKeyboardFocusManagerPeer.java	Tue Dec 16 20:23:46 2014 +0300
+++ b/src/java.desktop/windows/classes/sun/awt/windows/WKeyboardFocusManagerPeer.java	Tue Dec 16 09:57:33 2014 -0800
@@ -46,6 +46,7 @@
     }
 
     @Override
+    @SuppressWarnings("deprecation")
     public void setCurrentFocusOwner(Component comp) {
         setNativeFocusOwner(comp != null ? comp.getPeer() : null);
     }
--- a/src/java.desktop/windows/classes/sun/awt/windows/WListPeer.java	Tue Dec 16 20:23:46 2014 +0300
+++ b/src/java.desktop/windows/classes/sun/awt/windows/WListPeer.java	Tue Dec 16 09:57:33 2014 -0800
@@ -39,6 +39,7 @@
     // ListPeer implementation
 
     @Override
+    @SuppressWarnings("deprecation")
     public int[] getSelectedIndexes() {
         List l = (List)target;
         int len = l.countItems();
@@ -92,6 +93,7 @@
 
     @Override
     public native void delItems(int start, int end);
+    @SuppressWarnings("deprecation")
     public void clear() {
         List l = (List)target;
         delItems(0, l.countItems());
@@ -129,6 +131,7 @@
     native void create(WComponentPeer parent);
 
     @Override
+    @SuppressWarnings("deprecation")
     void initialize() {
         List li = (List)target;
 
--- a/src/java.desktop/windows/classes/sun/awt/windows/WScrollPanePeer.java	Tue Dec 16 20:23:46 2014 +0300
+++ b/src/java.desktop/windows/classes/sun/awt/windows/WScrollPanePeer.java	Tue Dec 16 09:57:33 2014 -0800
@@ -199,6 +199,7 @@
         }
 
         @Override
+        @SuppressWarnings("deprecation")
         public void run() {
             if (getScrollChild() == null) {
                 return;
--- a/src/java.desktop/windows/classes/sun/awt/windows/WTrayIconPeer.java	Tue Dec 16 20:23:46 2014 +0300
+++ b/src/java.desktop/windows/classes/sun/awt/windows/WTrayIconPeer.java	Tue Dec 16 09:57:33 2014 -0800
@@ -82,6 +82,7 @@
 
         SunToolkit.executeOnEventHandlerThread(target, new Runnable() {
                 @Override
+                @SuppressWarnings("deprecation")
                 public void run() {
                     PopupMenu newPopup = ((TrayIcon)target).getPopupMenu();
                     if (popup != newPopup) {
--- a/src/java.desktop/windows/classes/sun/java2d/d3d/D3DGraphicsConfig.java	Tue Dec 16 20:23:46 2014 +0300
+++ b/src/java.desktop/windows/classes/sun/java2d/d3d/D3DGraphicsConfig.java	Tue Dec 16 09:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -61,6 +61,7 @@
     private BufferCapabilities bufferCaps;
     private D3DGraphicsDevice device;
 
+    @SuppressWarnings("deprecation")
     protected D3DGraphicsConfig(D3DGraphicsDevice device) {
         super(device, 0);
         this.device = device;
--- a/src/java.desktop/windows/classes/sun/java2d/d3d/D3DGraphicsDevice.java	Tue Dec 16 20:23:46 2014 +0300
+++ b/src/java.desktop/windows/classes/sun/java2d/d3d/D3DGraphicsDevice.java	Tue Dec 16 09:57:33 2014 -0800
@@ -176,6 +176,7 @@
                                                                  long hwnd);
 
     @Override
+    @SuppressWarnings("deprecation")
     protected void enterFullScreenExclusive(final int screen, WindowPeer wp)
     {
         final WWindowPeer wpeer = (WWindowPeer)realFSWindow.getPeer();
@@ -246,6 +247,7 @@
     }
 
     @Override
+    @SuppressWarnings("deprecation")
     protected void addFSWindowListener(Window w) {
         // if the window is not a toplevel (has an owner) we have to use the
         // real toplevel to enter the full-screen mode with (4933099).
@@ -273,6 +275,7 @@
     }
 
     @Override
+    @SuppressWarnings("deprecation")
     protected void removeFSWindowListener(Window w) {
         realFSWindow.removeWindowListener(fsWindowListener);
         fsWindowListener = null;
@@ -337,6 +340,7 @@
                                                        int bitDepth,
                                                        int refreshRate);
     @Override
+    @SuppressWarnings("deprecation")
     protected void configDisplayMode(final int screen, final WindowPeer w,
                                      final int width, final int height,
                                      final int bitDepth, final int refreshRate)
--- a/src/java.desktop/windows/classes/sun/java2d/d3d/D3DScreenUpdateManager.java	Tue Dec 16 20:23:46 2014 +0300
+++ b/src/java.desktop/windows/classes/sun/java2d/d3d/D3DScreenUpdateManager.java	Tue Dec 16 09:57:33 2014 -0800
@@ -523,6 +523,7 @@
      * @param comp component to check for hw children
      * @return true if Component has heavyweight children
      */
+    @SuppressWarnings("deprecation")
     private static boolean hasHWChildren(Component comp) {
         if (comp instanceof Container) {
             for (Component c : ((Container)comp).getComponents()) {
--- a/src/java.desktop/windows/classes/sun/java2d/d3d/D3DVolatileSurfaceManager.java	Tue Dec 16 20:23:46 2014 +0300
+++ b/src/java.desktop/windows/classes/sun/java2d/d3d/D3DVolatileSurfaceManager.java	Tue Dec 16 09:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -79,6 +79,7 @@
      * Create a pbuffer-based SurfaceData object (or init the backbuffer
      * of an existing window if this is a double buffered GraphicsConfig).
      */
+    @SuppressWarnings("deprecation")
     protected SurfaceData initAcceleratedSurface() {
         SurfaceData sData;
         Component comp = vImg.getComponent();
--- a/src/java.desktop/windows/classes/sun/java2d/opengl/WGLGraphicsConfig.java	Tue Dec 16 20:23:46 2014 +0300
+++ b/src/java.desktop/windows/classes/sun/java2d/opengl/WGLGraphicsConfig.java	Tue Dec 16 09:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -81,6 +81,7 @@
         wglAvailable = initWGL();
     }
 
+    @SuppressWarnings("deprecation")
     protected WGLGraphicsConfig(Win32GraphicsDevice device, int visualnum,
                                 long configInfo, ContextCapabilities oglCaps)
     {
--- a/src/java.desktop/windows/classes/sun/java2d/opengl/WGLVolatileSurfaceManager.java	Tue Dec 16 20:23:46 2014 +0300
+++ b/src/java.desktop/windows/classes/sun/java2d/opengl/WGLVolatileSurfaceManager.java	Tue Dec 16 09:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -73,6 +73,7 @@
      * Create a pbuffer-based SurfaceData object (or init the backbuffer
      * of an existing window if this is a double buffered GraphicsConfig).
      */
+    @SuppressWarnings("deprecation")
     protected SurfaceData initAcceleratedSurface() {
         SurfaceData sData;
         Component comp = vImg.getComponent();