# HG changeset patch # User darcy # Date 1418752653 28800 # Node ID f694f257671998f8ebedd88acfeb8cf2929a243f # Parent 9dc3764ed475f8189f2bec42846705a25eb60ea6 8067092: Suppress windows-specific deprecation warnings in the java.desktop module Reviewed-by: prr, alanb diff -r 9dc3764ed475 -r f694f2576719 jdk/src/java.desktop/windows/classes/sun/awt/Win32GraphicsDevice.java --- a/jdk/src/java.desktop/windows/classes/sun/awt/Win32GraphicsDevice.java Tue Dec 16 20:23:46 2014 +0300 +++ b/jdk/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); diff -r 9dc3764ed475 -r f694f2576719 jdk/src/java.desktop/windows/classes/sun/awt/windows/WInputMethod.java --- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WInputMethod.java Tue Dec 16 20:23:46 2014 +0300 +++ b/jdk/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; diff -r 9dc3764ed475 -r f694f2576719 jdk/src/java.desktop/windows/classes/sun/awt/windows/WKeyboardFocusManagerPeer.java --- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WKeyboardFocusManagerPeer.java Tue Dec 16 20:23:46 2014 +0300 +++ b/jdk/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); } diff -r 9dc3764ed475 -r f694f2576719 jdk/src/java.desktop/windows/classes/sun/awt/windows/WListPeer.java --- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WListPeer.java Tue Dec 16 20:23:46 2014 +0300 +++ b/jdk/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; diff -r 9dc3764ed475 -r f694f2576719 jdk/src/java.desktop/windows/classes/sun/awt/windows/WScrollPanePeer.java --- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WScrollPanePeer.java Tue Dec 16 20:23:46 2014 +0300 +++ b/jdk/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; diff -r 9dc3764ed475 -r f694f2576719 jdk/src/java.desktop/windows/classes/sun/awt/windows/WTrayIconPeer.java --- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WTrayIconPeer.java Tue Dec 16 20:23:46 2014 +0300 +++ b/jdk/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) { diff -r 9dc3764ed475 -r f694f2576719 jdk/src/java.desktop/windows/classes/sun/java2d/d3d/D3DGraphicsConfig.java --- a/jdk/src/java.desktop/windows/classes/sun/java2d/d3d/D3DGraphicsConfig.java Tue Dec 16 20:23:46 2014 +0300 +++ b/jdk/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; diff -r 9dc3764ed475 -r f694f2576719 jdk/src/java.desktop/windows/classes/sun/java2d/d3d/D3DGraphicsDevice.java --- a/jdk/src/java.desktop/windows/classes/sun/java2d/d3d/D3DGraphicsDevice.java Tue Dec 16 20:23:46 2014 +0300 +++ b/jdk/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) diff -r 9dc3764ed475 -r f694f2576719 jdk/src/java.desktop/windows/classes/sun/java2d/d3d/D3DScreenUpdateManager.java --- a/jdk/src/java.desktop/windows/classes/sun/java2d/d3d/D3DScreenUpdateManager.java Tue Dec 16 20:23:46 2014 +0300 +++ b/jdk/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()) { diff -r 9dc3764ed475 -r f694f2576719 jdk/src/java.desktop/windows/classes/sun/java2d/d3d/D3DVolatileSurfaceManager.java --- a/jdk/src/java.desktop/windows/classes/sun/java2d/d3d/D3DVolatileSurfaceManager.java Tue Dec 16 20:23:46 2014 +0300 +++ b/jdk/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(); diff -r 9dc3764ed475 -r f694f2576719 jdk/src/java.desktop/windows/classes/sun/java2d/opengl/WGLGraphicsConfig.java --- a/jdk/src/java.desktop/windows/classes/sun/java2d/opengl/WGLGraphicsConfig.java Tue Dec 16 20:23:46 2014 +0300 +++ b/jdk/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) { diff -r 9dc3764ed475 -r f694f2576719 jdk/src/java.desktop/windows/classes/sun/java2d/opengl/WGLVolatileSurfaceManager.java --- a/jdk/src/java.desktop/windows/classes/sun/java2d/opengl/WGLVolatileSurfaceManager.java Tue Dec 16 20:23:46 2014 +0300 +++ b/jdk/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();