changeset 5618:5d040a8be658

Merge
author lana
date Wed, 26 Dec 2012 19:03:36 -0800
parents cb81ee79a72d 2d482e463c7e
children b5e180ef18a0
files .hgtags test/java/rmi/server/Unmarshal/checkUnmarshalOnStopThread/CheckUnmarshall.java
diffstat 201 files changed, 1646 insertions(+), 829 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Wed Dec 19 15:49:39 2012 -0800
+++ b/.hgtags	Wed Dec 26 19:03:36 2012 -0800
@@ -213,6 +213,16 @@
 901c290c9c8b495a2696f10a87523363239d001b jdk7u9-b02
 7302c386ca9c6cd20c27d0a2adb0b142f679d6b3 jdk7u9-b04
 ffad06d7009576c3098705e05452ebc309a59e56 jdk7u9-b05
+c1efb11d7db509dafd7882811b2562ba593f6431 jdk7u10-b10
+0243e41000c6f76654725cac31ffdc95633c63e7 jdk7u10-b11
+c86a49dd4a0dca3a56f00429cfcffb2ad5f2a224 jdk7u10-b12
+c6de70ed568d190c9c7d9641b88b9b5f1bc36fd5 jdk7u10-b13
+abe96e9e10f973cf0fdacc1475e69a274ef76fcf jdk7u10-b14
+c9a0e381cd8eaf62bcacfd59b01c249de81ae167 jdk7u10-b15
+ed59989fb0635f2d4461173e218c43494f06bb82 jdk7u10-b16
+a1c5bac982a6d4aa58f551cb46cde53f526aca48 jdk7u10-b17
+115d1e4365293846bbc911cf312886c471e37fbd jdk7u10-b18
+84218dff5e4c7bc00fd9266769c0d12bdde866f5 jdk7u10-b30
 df945ef30444adf08f3ef14b0c49c8bda6dda587 jdk7u8-b01
 dd1e513c05b8b8c8402e9ecf9c0d5bdbebb1a089 jdk7u8-b02
 355cf1937d0824b54ac38ee5a5496197647840f9 jdk7u8-b03
--- a/make/sun/rmi/cgi/Makefile	Wed Dec 19 15:49:39 2012 -0800
+++ b/make/sun/rmi/cgi/Makefile	Wed Dec 26 19:03:36 2012 -0800
@@ -28,6 +28,8 @@
 #
 
 BUILDDIR = ../../..
+JAVAC_MAX_WARNINGS = true
+JAVAC_WARNINGS_FATAL = true
 # java-rmi.cgi is a JDK tool
 PACKAGE = sun.rmi
 PRODUCT = sun
--- a/make/sun/rmi/registry/Makefile	Wed Dec 19 15:49:39 2012 -0800
+++ b/make/sun/rmi/registry/Makefile	Wed Dec 26 19:03:36 2012 -0800
@@ -28,6 +28,9 @@
 #
 
 BUILDDIR = ../../..
+JAVAC_MAX_WARNINGS = true
+JAVAC_WARNINGS_FATAL = true
+JAVAC_LINT_OPTIONS = -Xlint:all,-deprecation
 PACKAGE = sun.rmi.registry
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/sun/rmi/rmi/Makefile	Wed Dec 19 15:49:39 2012 -0800
+++ b/make/sun/rmi/rmi/Makefile	Wed Dec 26 19:03:36 2012 -0800
@@ -28,6 +28,9 @@
 #
 
 BUILDDIR = ../../..
+JAVAC_MAX_WARNINGS = true
+JAVAC_WARNINGS_FATAL = true
+JAVAC_LINT_OPTIONS = -Xlint:all,-deprecation
 PACKAGE = sun.rmi
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/sun/rmi/rmid/Makefile	Wed Dec 19 15:49:39 2012 -0800
+++ b/make/sun/rmi/rmid/Makefile	Wed Dec 26 19:03:36 2012 -0800
@@ -29,6 +29,8 @@
 #
 
 BUILDDIR = ../../..
+JAVAC_MAX_WARNINGS = true
+JAVAC_WARNINGS_FATAL = true
 PACKAGE = sun.rmi.activation
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/src/macosx/classes/sun/lwawt/LWToolkit.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/macosx/classes/sun/lwawt/LWToolkit.java	Wed Dec 26 19:03:36 2012 -0800
@@ -210,9 +210,9 @@
      * and DialogPeer interfaces.
      */
     private LWWindowPeer createDelegatedPeer(Window target, PlatformComponent platformComponent,
-                                             PlatformWindow platformWindow)
+                                             PlatformWindow platformWindow, LWWindowPeer.PeerType peerType)
     {
-        LWWindowPeer peer = new LWWindowPeer(target, platformComponent, platformWindow);
+        LWWindowPeer peer = new LWWindowPeer(target, platformComponent, platformWindow, peerType);
         targetCreatedPeer(target, peer);
         peer.initialize();
         return peer;
@@ -222,22 +222,29 @@
     public WindowPeer createWindow(Window target) {
         PlatformComponent platformComponent = createPlatformComponent();
         PlatformWindow platformWindow = createPlatformWindow(LWWindowPeer.PeerType.SIMPLEWINDOW);
-        return createDelegatedPeer(target, platformComponent, platformWindow);
+        return createDelegatedPeer(target, platformComponent, platformWindow, LWWindowPeer.PeerType.SIMPLEWINDOW);
     }
 
     @Override
     public FramePeer createFrame(Frame target) {
         PlatformComponent platformComponent = createPlatformComponent();
         PlatformWindow platformWindow = createPlatformWindow(LWWindowPeer.PeerType.FRAME);
-        return createDelegatedPeer(target, platformComponent, platformWindow);
+        return createDelegatedPeer(target, platformComponent, platformWindow, LWWindowPeer.PeerType.FRAME);
     }
 
     public LWWindowPeer createEmbeddedFrame(CEmbeddedFrame target) {
         PlatformComponent platformComponent = createPlatformComponent();
-        PlatformWindow platformWindow = createPlatformWindow(LWWindowPeer.PeerType.EMBEDDEDFRAME);
-        return createDelegatedPeer(target, platformComponent, platformWindow);
+        PlatformWindow platformWindow = createPlatformWindow(LWWindowPeer.PeerType.EMBEDDED_FRAME);
+        return createDelegatedPeer(target, platformComponent, platformWindow, LWWindowPeer.PeerType.EMBEDDED_FRAME);
     }
 
+    public LWWindowPeer createEmbeddedFrame(CViewEmbeddedFrame target) {
+        PlatformComponent platformComponent = createPlatformComponent();
+        PlatformWindow platformWindow = createPlatformWindow(LWWindowPeer.PeerType.VIEW_EMBEDDED_FRAME);
+        return createDelegatedPeer(target, platformComponent, platformWindow, LWWindowPeer.PeerType.VIEW_EMBEDDED_FRAME);
+    }
+
+
     CPrinterDialogPeer createCPrinterDialog(CPrinterDialog target) {
         PlatformComponent platformComponent = createPlatformComponent();
         PlatformWindow platformWindow = createPlatformWindow(LWWindowPeer.PeerType.DIALOG);
@@ -254,7 +261,7 @@
 
         PlatformComponent platformComponent = createPlatformComponent();
         PlatformWindow platformWindow = createPlatformWindow(LWWindowPeer.PeerType.DIALOG);
-        return createDelegatedPeer(target, platformComponent, platformWindow);
+        return createDelegatedPeer(target, platformComponent, platformWindow, LWWindowPeer.PeerType.DIALOG);
     }
 
     @Override
--- a/src/macosx/classes/sun/lwawt/LWWindowPeer.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/macosx/classes/sun/lwawt/LWWindowPeer.java	Wed Dec 26 19:03:36 2012 -0800
@@ -48,7 +48,8 @@
         SIMPLEWINDOW,
         FRAME,
         DIALOG,
-        EMBEDDEDFRAME
+        EMBEDDED_FRAME,
+        VIEW_EMBEDDED_FRAME
     }
 
     private static final PlatformLogger focusLog = PlatformLogger.getLogger("sun.lwawt.focus.LWWindowPeer");
@@ -114,6 +115,8 @@
 
     private volatile boolean textured;
 
+    private final PeerType peerType;
+
     /**
      * Current modal blocker or null.
      *
@@ -122,10 +125,11 @@
     private LWWindowPeer blocker;
 
     public LWWindowPeer(Window target, PlatformComponent platformComponent,
-                        PlatformWindow platformWindow)
+                        PlatformWindow platformWindow, PeerType peerType)
     {
         super(target, platformComponent);
         this.platformWindow = platformWindow;
+        this.peerType = peerType;
 
         Window owner = target.getOwner();
         LWWindowPeer ownerPeer = (owner != null) ? (LWWindowPeer)owner.getPeer() : null;
@@ -339,6 +343,11 @@
 
     @Override
     public void setBounds(int x, int y, int w, int h, int op) {
+
+        if((op & NO_EMBEDDED_CHECK) == 0 && getPeerType() == PeerType.VIEW_EMBEDDED_FRAME) {
+            return;
+        }
+
         if ((op & SET_CLIENT_SIZE) != 0) {
             // SET_CLIENT_SIZE is only applicable to window peers, so handle it here
             // instead of pulling 'insets' field up to LWComponentPeer
@@ -1307,6 +1316,10 @@
         return this == grabbingWindow;
     }
 
+    public PeerType getPeerType() {
+        return peerType;
+    }
+
     @Override
     public String toString() {
         return super.toString() + " [target is " + getTarget() + "]";
--- a/src/macosx/classes/sun/lwawt/PlatformWindow.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/macosx/classes/sun/lwawt/PlatformWindow.java	Wed Dec 26 19:03:36 2012 -0800
@@ -160,4 +160,6 @@
     public long getLayerPtr();
 
     public LWWindowPeer getPeer();
+
+    public boolean isUnderMouse();
 }
--- a/src/macosx/classes/sun/lwawt/macosx/CMouseInfoPeer.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/macosx/classes/sun/lwawt/macosx/CMouseInfoPeer.java	Wed Dec 26 19:03:36 2012 -0800
@@ -26,7 +26,6 @@
 package sun.lwawt.macosx;
 
 import java.awt.Window;
-
 import sun.lwawt.LWMouseInfoPeer;
 import sun.lwawt.LWWindowPeer;
 
@@ -41,10 +40,6 @@
             return false;
         }
 
-        LWWindowPeer peer = (LWWindowPeer)w.getPeer();
-        CPlatformWindow platformWindow = (CPlatformWindow)peer.getPlatformWindow();
-        return nativeIsWindowUnderMouse(platformWindow.getNSWindowPtr());
+        return ((LWWindowPeer)w.getPeer()).getPlatformWindow().isUnderMouse();
     }
-
-    private static native boolean nativeIsWindowUnderMouse(long ptr);
 }
--- a/src/macosx/classes/sun/lwawt/macosx/CPlatformEmbeddedFrame.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/macosx/classes/sun/lwawt/macosx/CPlatformEmbeddedFrame.java	Wed Dec 26 19:03:36 2012 -0800
@@ -207,4 +207,13 @@
 
     @Override
     public void setModalBlocked(boolean blocked) {}
+
+    /*
+     * The method could not be implemented due to CALayer restrictions.
+     * The exeption enforce clients not to use it.
+     */
+    @Override
+    public boolean isUnderMouse() {
+        throw new RuntimeException("Not implemented");
+    }
 }
--- a/src/macosx/classes/sun/lwawt/macosx/CPlatformView.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/macosx/classes/sun/lwawt/macosx/CPlatformView.java	Wed Dec 26 19:03:36 2012 -0800
@@ -27,9 +27,11 @@
 
 import java.awt.*;
 import java.awt.event.*;
+import java.awt.geom.Rectangle2D;
 import java.awt.image.VolatileImage;
 
 import sun.awt.CGraphicsConfig;
+import sun.awt.CGraphicsEnvironment;
 import sun.lwawt.LWWindowPeer;
 import sun.lwawt.macosx.event.NSEvent;
 
@@ -39,6 +41,10 @@
 
 public class CPlatformView extends CFRetainedResource {
     private native long nativeCreateView(int x, int y, int width, int height, long windowLayerPtr);
+    private static native void nativeSetAutoResizable(long awtView, boolean toResize);
+    private static native int nativeGetNSViewDisplayID(long awtView);
+    private static native Rectangle2D nativeGetLocationOnScreen(long awtView);
+    private static native boolean nativeIsViewUnderMouse(long ptr);
 
     private LWWindowPeer peer;
     private SurfaceData surfaceData;
@@ -61,7 +67,7 @@
 
     public long getAWTView() {
         return ptr;
-    }
+        }
 
     public boolean isOpaque() {
         return !peer.isTranslucent();
@@ -180,10 +186,46 @@
         }
     }
 
+    public void setAutoResizable(boolean toResize) {
+        nativeSetAutoResizable(this.getAWTView(), toResize);
+    }
+
+    public boolean isUnderMouse() {
+        return nativeIsViewUnderMouse(getAWTView());
+    }
+
+    public GraphicsDevice getGraphicsDevice() {
+        GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
+        CGraphicsEnvironment cge = (CGraphicsEnvironment)ge;
+        int displayID = nativeGetNSViewDisplayID(getAWTView());
+        GraphicsDevice gd = cge.getScreenDevice(displayID);
+        if (gd == null) {
+            // this could possibly happen during device removal
+            // use the default screen device in this case
+            gd = ge.getDefaultScreenDevice();
+        }
+        return gd;
+    }
+
+    public Point getLocationOnScreen() {
+        Rectangle r = nativeGetLocationOnScreen(this.getAWTView()).getBounds();
+        return new Point(r.x, r.y);
+    }
+
     // ----------------------------------------------------------------------
     // NATIVE CALLBACKS
     // ----------------------------------------------------------------------
 
+    /*
+     * The callback is called only in the embedded case when the view is
+     * automatically resized by the superview.
+     * In normal mode this method is never called.
+     */
+    private void deliverResize(int x, int y, int w, int h) {
+        peer.notifyReshape(x, y, w, h);
+    }
+
+
     private void deliverMouseEvent(NSEvent event) {
         int x = event.getX();
         int y = getBounds().height - event.getY();
--- a/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java	Wed Dec 26 19:03:36 2012 -0800
@@ -64,8 +64,6 @@
     private static native void nativeSynthesizeMouseEnteredExitedEvents(long nsWindowPtr);
     private static native void nativeDispose(long nsWindowPtr);
 
-    private static native int nativeGetNSWindowDisplayID(long nsWindowPtr);
-
     // Loger to report issues happened during execution but that do not affect functionality
     private static final PlatformLogger logger = PlatformLogger.getLogger("sun.lwawt.macosx.CPlatformWindow");
     private static final PlatformLogger focusLogger = PlatformLogger.getLogger("sun.lwawt.macosx.focus.CPlatformWindow");
@@ -211,9 +209,8 @@
     private CPlatformResponder responder;
     private volatile boolean zoomed = false; // from native perspective
 
-    public CPlatformWindow(final PeerType peerType) {
+    public CPlatformWindow() {
         super(0, true);
-        assert (peerType == PeerType.SIMPLEWINDOW || peerType == PeerType.DIALOG || peerType == PeerType.FRAME);
     }
 
     /*
@@ -441,16 +438,7 @@
 
     @Override
     public GraphicsDevice getGraphicsDevice() {
-        GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
-        CGraphicsEnvironment cge = (CGraphicsEnvironment)ge;
-        int displayID = nativeGetNSWindowDisplayID(getNSWindowPtr());
-        GraphicsDevice gd = cge.getScreenDevice(displayID);
-        if (gd == null) {
-            // this could possibly happen during device removal
-            // use the default screen device in this case
-            gd = ge.getDefaultScreenDevice();
-        }
-        return gd;
+        return contentView.getGraphicsDevice();
     }
 
     @Override // PlatformWindow
@@ -861,6 +849,11 @@
         return peer;
     }
 
+    @Override
+    public boolean isUnderMouse() {
+        return contentView.isUnderMouse();
+    }
+
     public CPlatformView getContentView() {
         return contentView;
     }
--- a/src/macosx/classes/sun/lwawt/macosx/CPrinterDialogPeer.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/macosx/classes/sun/lwawt/macosx/CPrinterDialogPeer.java	Wed Dec 26 19:03:36 2012 -0800
@@ -41,7 +41,7 @@
     public CPrinterDialogPeer(CPrinterDialog target, PlatformComponent platformComponent,
                               PlatformWindow platformWindow)
     {
-        super(target, platformComponent, platformWindow);
+        super(target, platformComponent, platformWindow, LWWindowPeer.PeerType.DIALOG);
         //super(target);
         fTarget = target;
         super.initialize();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/macosx/classes/sun/lwawt/macosx/CViewEmbeddedFrame.java	Wed Dec 26 19:03:36 2012 -0800
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2012, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package sun.lwawt.macosx;
+
+import java.awt.AWTKeyStroke;
+import java.awt.Toolkit;
+import java.lang.reflect.InvocationTargetException;
+import sun.awt.EmbeddedFrame;
+import sun.lwawt.LWToolkit;
+import sun.lwawt.LWWindowPeer;
+/*
+ * The CViewEmbeddedFrame class is used in the SWT_AWT bridge.
+ * This is a part of public API and should not be renamed or moved
+ */
+public class CViewEmbeddedFrame extends EmbeddedFrame {
+
+    private final long nsViewPtr;
+
+    private boolean isActive = false;
+
+    public CViewEmbeddedFrame(long nsViewPtr) {
+        this.nsViewPtr = nsViewPtr;
+    }
+
+    @SuppressWarnings("deprecation")
+    @Override
+    public void addNotify() {
+        if (getPeer() == null) {
+            LWToolkit toolkit = (LWToolkit) Toolkit.getDefaultToolkit();
+            setPeer(toolkit.createEmbeddedFrame(this));
+        }
+        super.addNotify();
+    }
+
+    public long getEmbedderHandle() {
+        return nsViewPtr;
+    }
+
+    @Override
+    public void registerAccelerator(AWTKeyStroke awtks) {
+    }
+
+    @Override
+    public void unregisterAccelerator(AWTKeyStroke awtks) {
+    }
+
+    public boolean isParentWindowActive() {
+        return isActive;
+    }
+
+    /*
+     * Synthetic event delivery for focus management
+     */
+    @Override
+    public void synthesizeWindowActivation(boolean activated) {
+        if (isActive != activated) {
+            isActive = activated;
+            ((LWWindowPeer)getPeer()).notifyActivation(activated);
+        }
+    }
+
+    /*
+     * Initializes the embedded frame bounds and validates a component.
+     * Designed to be called from the main thread
+     * This method should be called once from the initialization of the SWT_AWT Bridge
+     */
+    @SuppressWarnings("deprecation")
+    public void validateWithBounds(final int x, final int y, final int width, final int height) {
+        try {
+            LWCToolkit.invokeAndWait(new Runnable() {
+                @Override
+                public void run() {
+                    ((LWWindowPeer) getPeer()).setBoundsPrivate(0, 0, width, height);
+                    validate();
+                    setVisible(true);
+                }
+            }, null);
+        } catch (InterruptedException | InvocationTargetException ex) {}
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/macosx/classes/sun/lwawt/macosx/CViewPlatformEmbeddedFrame.java	Wed Dec 26 19:03:36 2012 -0800
@@ -0,0 +1,220 @@
+/*
+ * Copyright (c) 2012, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.lwawt.macosx;
+
+import java.awt.BufferCapabilities.FlipContents;
+import java.awt.Font;
+import java.awt.FontMetrics;
+import java.awt.Graphics;
+import java.awt.GraphicsDevice;
+import java.awt.Image;
+import java.awt.Insets;
+import java.awt.MenuBar;
+import java.awt.Point;
+import java.awt.Rectangle;
+import java.awt.Transparency;
+import java.awt.Window;
+import sun.awt.CausedFocusEvent.Cause;
+import sun.java2d.SurfaceData;
+import sun.lwawt.LWWindowPeer;
+import sun.lwawt.PlatformWindow;
+
+public class CViewPlatformEmbeddedFrame implements PlatformWindow {
+
+    private CPlatformView view;
+    private LWWindowPeer peer;
+    private CViewEmbeddedFrame target;
+    private CPlatformResponder responder;
+
+    @Override // PlatformWindow
+    public void initialize(Window target, final LWWindowPeer peer, PlatformWindow owner) {
+        this.peer = peer;
+        this.target = (CViewEmbeddedFrame) target;
+        responder = new CPlatformResponder(peer, false);
+
+        view = new CPlatformView();
+        view.initialize(peer, responder);
+
+        CWrapper.NSView.addSubview(this.target.getEmbedderHandle(), view.getAWTView());
+        view.setAutoResizable(true);
+    }
+
+    public long getNSViewPtr() {
+        return view.getAWTView();
+    }
+
+    @Override
+    public long getLayerPtr() {
+        return view.getWindowLayerPtr();
+    }
+
+    @Override
+    public LWWindowPeer getPeer() {
+        return peer;
+    }
+
+    @Override
+    public void dispose() {
+        CWrapper.NSView.removeFromSuperview(view.getAWTView());
+        view.dispose();
+    }
+
+    @Override
+    public void setVisible(boolean visible) {
+        CWrapper.NSView.setHidden(view.getAWTView(), !visible);
+    }
+
+    @Override
+    public void setTitle(String title) {
+    }
+
+    @Override
+    public void setBounds(int x, int y, int w, int h) {
+        view.setBounds(x, y, w, h);
+        peer.notifyReshape(x, y, w, h);
+    }
+
+    @Override
+    public GraphicsDevice getGraphicsDevice() {
+        return view.getGraphicsDevice();
+    }
+
+    @Override
+    public Point getLocationOnScreen() {
+        return view.getLocationOnScreen();
+    }
+
+    @Override
+    public Insets getInsets() {
+        return new Insets(0, 0, 0, 0);
+    }
+
+    @Override
+    public FontMetrics getFontMetrics(Font f) {
+        throw new RuntimeException("Not implemented");
+    }
+
+    @Override
+    public SurfaceData getScreenSurface() {
+        return view.getSurfaceData();
+    }
+
+    @Override
+    public SurfaceData replaceSurfaceData() {
+        return view.replaceSurfaceData();
+    }
+
+    @Override
+    public void setModalBlocked(boolean blocked) {
+    }
+
+    @Override
+    public void toFront() {
+    }
+
+    @Override
+    public void toBack() {
+    }
+
+    @Override
+    public void setMenuBar(MenuBar mb) {
+    }
+
+    @Override
+    public void setAlwaysOnTop(boolean value) {
+    }
+
+    @Override
+    public void updateFocusableWindowState() {
+    }
+
+    @Override
+    public boolean rejectFocusRequest(Cause cause) {
+        return false;
+    }
+
+    @Override
+    public boolean requestWindowFocus() {
+        return true;
+    }
+
+    @Override
+    public boolean isActive() {
+        return target.isParentWindowActive();
+    }
+
+    @Override
+    public void setResizable(boolean resizable) {
+    }
+
+    @Override
+    public void setSizeConstraints(int minW, int minH, int maxW, int maxH) {
+    }
+
+    @Override
+    public Graphics transformGraphics(Graphics g) {
+        return g;
+    }
+
+    @Override
+    public void updateIconImages() {
+    }
+
+    @Override
+    public void setOpacity(float opacity) {
+    }
+
+    @Override
+    public void setOpaque(boolean isOpaque) {
+    }
+
+    @Override
+    public void enterFullScreenMode() {
+    }
+
+    @Override
+    public void exitFullScreenMode() {
+    }
+
+    @Override
+    public void setWindowState(int windowState) {
+    }
+
+    @Override
+    public boolean isUnderMouse() {
+        return view.isUnderMouse();
+    }
+
+    @Override
+    public Image createBackBuffer() {
+        return view.createBackBuffer();
+    }
+
+    @Override
+    public void flip(int x1, int y1, int x2, int y2, FlipContents flipAction) {
+        throw new RuntimeException("Not implemented");
+    }
+}
--- a/src/macosx/classes/sun/lwawt/macosx/CWrapper.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/macosx/classes/sun/lwawt/macosx/CWrapper.java	Wed Dec 26 19:03:36 2012 -0800
@@ -85,6 +85,8 @@
 
         public static native void enterFullScreenMode(long view);
         public static native void exitFullScreenMode(long view);
+
+        public static native void setHidden(long view, boolean hidden);
     }
 
     public static final class NSObject {
--- a/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java	Wed Dec 26 19:03:36 2012 -0800
@@ -162,10 +162,13 @@
 
     @Override
     protected PlatformWindow createPlatformWindow(PeerType peerType) {
-        if (peerType == PeerType.EMBEDDEDFRAME) {
+        if (peerType == PeerType.EMBEDDED_FRAME) {
             return new CPlatformEmbeddedFrame();
+        } else if (peerType == PeerType.VIEW_EMBEDDED_FRAME) {
+            return new CViewPlatformEmbeddedFrame();
         } else {
-            return new CPlatformWindow(peerType);
+            assert (peerType == PeerType.SIMPLEWINDOW || peerType == PeerType.DIALOG || peerType == PeerType.FRAME);
+            return new CPlatformWindow();
         }
     }
 
--- a/src/macosx/native/sun/awt/AWTSurfaceLayers.m	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/macosx/native/sun/awt/AWTSurfaceLayers.m	Wed Dec 26 19:03:36 2012 -0800
@@ -99,17 +99,16 @@
   __block AWTSurfaceLayers *surfaceLayers = nil;
 
 JNF_COCOA_ENTER(env);
-AWT_ASSERT_NOT_APPKIT_THREAD;
 
-  [JNFRunLoop performOnMainThreadWaiting:YES withBlock:^(){
-      AWT_ASSERT_APPKIT_THREAD;
-
-      CALayer *windowLayer = jlong_to_ptr(windowLayerPtr);
-      surfaceLayers = [[AWTSurfaceLayers alloc] initWithWindowLayer: windowLayer];
-      CFRetain(surfaceLayers);
-      [surfaceLayers release];
+    [ThreadUtilities performOnMainThreadWaiting:YES block:^(){
+        AWT_ASSERT_APPKIT_THREAD;
+        
+        CALayer *windowLayer = jlong_to_ptr(windowLayerPtr);
+        surfaceLayers = [[AWTSurfaceLayers alloc] initWithWindowLayer: windowLayer];
+        CFRetain(surfaceLayers);
+        [surfaceLayers release];
     }];
-
+    
 JNF_COCOA_EXIT(env);
 
   return ptr_to_jlong(surfaceLayers);
@@ -126,12 +125,13 @@
 JNF_COCOA_ENTER(env);
 
   AWTSurfaceLayers *surfaceLayers = OBJC(surfaceLayersPtr);
-  [JNFRunLoop performOnMainThreadWaiting:NO withBlock:^(){
+    
+  [ThreadUtilities performOnMainThreadWaiting:NO block:^(){
       AWT_ASSERT_APPKIT_THREAD;
 
       CGRect rect = CGRectMake(x, y, width, height);
       [surfaceLayers setBounds: rect];
-    }];
+  }];
 
 JNF_COCOA_EXIT(env);
 }
--- a/src/macosx/native/sun/awt/AWTView.m	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/macosx/native/sun/awt/AWTView.m	Wed Dec 26 19:03:36 2012 -0800
@@ -170,6 +170,11 @@
  * Automatically triggered functions.
  */
 
+- (void)resizeWithOldSuperviewSize:(NSSize)oldBoundsSize {
+    [super resizeWithOldSuperviewSize: oldBoundsSize];
+    [self deliverResize: [self frame]];
+}
+
 /*
  * MouseEvents support
  */
@@ -433,6 +438,18 @@
     }
 }
 
+-(void) deliverResize: (NSRect) rect {
+    jint x = (jint) rect.origin.x;
+    jint y = (jint) rect.origin.y;
+    jint w = (jint) rect.size.width;
+    jint h = (jint) rect.size.height;
+    JNIEnv *env = [ThreadUtilities getJNIEnv];
+    static JNF_CLASS_CACHE(jc_PlatformView, "sun/lwawt/macosx/CPlatformView");
+    static JNF_MEMBER_CACHE(jm_deliverResize, jc_PlatformView, "deliverResize", "(IIII)V");
+    JNFCallVoidMethod(env, m_cPlatformView, jm_deliverResize, x,y,w,h);
+}
+
+
 - (void) drawRect:(NSRect)dirtyRect {
 AWT_ASSERT_APPKIT_THREAD;
 
@@ -1216,21 +1233,19 @@
     __block AWTView *newView = nil;
 
 JNF_COCOA_ENTER(env);
-AWT_ASSERT_NOT_APPKIT_THREAD;
 
     NSRect rect = NSMakeRect(originX, originY, width, height);
     jobject cPlatformView = (*env)->NewGlobalRef(env, obj);
 
-    [JNFRunLoop performOnMainThreadWaiting:YES withBlock:^(){
+    [ThreadUtilities performOnMainThreadWaiting:YES block:^(){
         AWT_ASSERT_APPKIT_THREAD;
-
+                                           
         CALayer *windowLayer = jlong_to_ptr(windowLayerPtr);
         AWTView *view = [[AWTView alloc] initWithRect:rect
                                          platformView:cPlatformView
                                          windowLayer:windowLayer];
         CFRetain(view);
         [view release]; // GC
-
         newView = view;
     }];
 
@@ -1238,3 +1253,125 @@
 
     return ptr_to_jlong(newView);
 }
+
+/*
+ * Class:     sun_lwawt_macosx_CPlatformView
+ * Method:    nativeSetAutoResizable
+ * Signature: (JZ)V;
+ */
+
+JNIEXPORT void JNICALL
+Java_sun_lwawt_macosx_CPlatformView_nativeSetAutoResizable
+(JNIEnv *env, jclass cls, jlong viewPtr, jboolean toResize)
+{
+JNF_COCOA_ENTER(env);
+    
+    NSView *view = (NSView *)jlong_to_ptr(viewPtr);    
+
+   [ThreadUtilities performOnMainThreadWaiting:NO block:^(){
+       AWT_ASSERT_APPKIT_THREAD;
+       
+       if (toResize) {
+           [view setAutoresizingMask: NSViewHeightSizable | NSViewWidthSizable];
+       } else {
+           [view setAutoresizingMask: NSViewMinYMargin | NSViewMaxXMargin];
+       }
+       
+       if ([view superview] != nil) {
+           [[view superview] setAutoresizesSubviews:(BOOL)toResize];
+       }
+       
+    }];
+JNF_COCOA_EXIT(env);
+}
+
+/*
+ * Class:     sun_lwawt_macosx_CPlatformView
+ * Method:    nativeGetNSViewDisplayID
+ * Signature: (J)I;
+ */
+
+JNIEXPORT jint JNICALL
+Java_sun_lwawt_macosx_CPlatformView_nativeGetNSViewDisplayID
+(JNIEnv *env, jclass cls, jlong viewPtr)
+{
+    __block jint ret; //CGDirectDisplayID
+    
+JNF_COCOA_ENTER(env);
+    
+    NSView *view = (NSView *)jlong_to_ptr(viewPtr);    
+    NSWindow *window = [view window];
+    
+    [ThreadUtilities performOnMainThreadWaiting:YES block:^(){
+            AWT_ASSERT_APPKIT_THREAD;
+        
+            ret = (jint)[[AWTWindow getNSWindowDisplayID_AppKitThread: window] intValue];
+    }];
+    
+JNF_COCOA_EXIT(env);
+    
+    return ret;
+}
+
+/*
+ * Class:     sun_lwawt_macosx_CPlatformView
+ * Method:    nativeGetLocationOnScreen
+ * Signature: (J)Ljava/awt/Rectangle;
+ */
+
+JNIEXPORT jobject JNICALL
+Java_sun_lwawt_macosx_CPlatformView_nativeGetLocationOnScreen
+(JNIEnv *env, jclass cls, jlong viewPtr)
+{
+    jobject jRect = NULL;
+    
+JNF_COCOA_ENTER(env);
+    
+    __block NSRect rect = NSZeroRect;
+    
+    NSView *view = (NSView *)jlong_to_ptr(viewPtr);    
+    [ThreadUtilities performOnMainThreadWaiting:YES block:^(){
+        AWT_ASSERT_APPKIT_THREAD;
+        
+        NSRect viewBounds = [view bounds];
+        NSRect frameInWindow = [view convertRect:viewBounds toView:nil];
+        rect = [[view window] convertRectToScreen:frameInWindow];
+        NSRect screenRect = [[NSScreen mainScreen] frame];
+        //Convert coordinates to top-left corner origin
+        rect.origin.y = screenRect.size.height - rect.origin.y - viewBounds.size.height;
+    }];
+    jRect = NSToJavaRect(env, rect);
+    
+JNF_COCOA_EXIT(env);
+    
+    return jRect;
+}
+
+/*
+ * Class:     sun_lwawt_macosx_CPlatformView
+ * Method:    nativeIsViewUnderMouse
+ * Signature: (J)Z;
+ */
+
+JNIEXPORT jboolean JNICALL Java_sun_lwawt_macosx_CPlatformView_nativeIsViewUnderMouse
+(JNIEnv *env, jclass clazz, jlong viewPtr)
+{
+    __block jboolean underMouse = JNI_FALSE;
+    
+JNF_COCOA_ENTER(env);
+    
+    NSView *nsView = OBJC(viewPtr);
+   [ThreadUtilities performOnMainThreadWaiting:YES block:^(){
+       AWT_ASSERT_APPKIT_THREAD;
+       
+       NSPoint ptWindowCoords = [[nsView window] mouseLocationOutsideOfEventStream];
+       NSPoint ptViewCoords = [nsView convertPoint:ptWindowCoords fromView:nil];
+       underMouse = [nsView hitTest:ptViewCoords] != nil;
+    }];
+    
+JNF_COCOA_EXIT(env);
+    
+    return underMouse;
+}
+
+
--- a/src/macosx/native/sun/awt/AWTWindow.m	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/macosx/native/sun/awt/AWTWindow.m	Wed Dec 26 19:03:36 2012 -0800
@@ -1145,34 +1145,6 @@
 
 /*
  * Class:     sun_lwawt_macosx_CPlatformWindow
- * Method:    nativeGetDisplayID_AppKitThread
- * Signature: (J)I
- */
-JNIEXPORT jint JNICALL
-Java_sun_lwawt_macosx_CPlatformWindow_nativeGetNSWindowDisplayID
-(JNIEnv *env, jclass clazz, jlong windowPtr)
-{
-    __block jint ret; // CGDirectDisplayID
-
-JNF_COCOA_ENTER(env);
-
-    NSWindow *window = OBJC(windowPtr);
-
-    if ([NSThread isMainThread]) {
-        ret = (jint)[[AWTWindow getNSWindowDisplayID_AppKitThread: window] intValue];
-    } else {
-        [JNFRunLoop performOnMainThreadWaiting:YES withBlock:^(){
-            ret = (jint)[[AWTWindow getNSWindowDisplayID_AppKitThread: window] intValue];
-        }];
-    }
-
-JNF_COCOA_EXIT(env);
-
-    return ret;
-}
-
-/*
- * Class:     sun_lwawt_macosx_CPlatformWindow
  * Method:    _toggleFullScreenMode
  * Signature: (J)V
  */
@@ -1192,27 +1164,6 @@
 JNF_COCOA_EXIT(env);
 }
 
-JNIEXPORT jboolean JNICALL Java_sun_lwawt_macosx_CMouseInfoPeer_nativeIsWindowUnderMouse
-(JNIEnv *env, jclass clazz, jlong windowPtr)
-{
-    __block jboolean underMouse = JNI_FALSE;
-
-JNF_COCOA_ENTER(env);
-AWT_ASSERT_NOT_APPKIT_THREAD;
-
-    NSWindow *nsWindow = OBJC(windowPtr);
-    [JNFRunLoop performOnMainThreadWaiting:YES withBlock:^() {
-        AWT_ASSERT_APPKIT_THREAD;
-
-        NSPoint pt = [nsWindow mouseLocationOutsideOfEventStream];
-        underMouse = [[nsWindow contentView] hitTest:pt] != nil;
-    }];
-
-JNF_COCOA_EXIT(env);
-
-    return underMouse;
-}
-
 JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CPlatformWindow_nativeSetEnabled
 (JNIEnv *env, jclass clazz, jlong windowPtr, jboolean isEnabled)
 {
--- a/src/macosx/native/sun/awt/CCursorManager.m	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/macosx/native/sun/awt/CCursorManager.m	Wed Dec 26 19:03:36 2012 -0800
@@ -123,14 +123,15 @@
     jobject jpt = NULL;
 
 JNF_COCOA_ENTER(env);
-AWT_ASSERT_NOT_APPKIT_THREAD;
 
     __block NSPoint pt = NSZeroPoint;
-    [JNFRunLoop performOnMainThreadWaiting:YES withBlock:^(){
-        AWT_ASSERT_APPKIT_THREAD;
-
-        pt = ConvertNSScreenPoint(env, [NSEvent mouseLocation]);
+    
+    [ThreadUtilities performOnMainThreadWaiting:YES block:^(){
+            AWT_ASSERT_APPKIT_THREAD;
+        
+            pt = ConvertNSScreenPoint(env, [NSEvent mouseLocation]);
     }];
+    
     jpt = NSToJavaPoint(env, pt);
 
 JNF_COCOA_EXIT(env);
--- a/src/macosx/native/sun/awt/CWrapper.m	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/macosx/native/sun/awt/CWrapper.m	Wed Dec 26 19:03:36 2012 -0800
@@ -651,6 +651,26 @@
 }
 
 /*
+ * Class:     sun_lwawt_macosx_CWrapper$NSView
+ * Method:    setHidden
+ * Signature: (JZ)V
+ */
+JNIEXPORT jlong JNICALL
+Java_sun_lwawt_macosx_CWrapper_00024NSView_setHidden
+(JNIEnv *env, jclass cls, jlong viewPtr, jboolean toHide)
+{    
+    JNF_COCOA_ENTER(env);
+    
+    NSView *view = (NSView *)jlong_to_ptr(viewPtr);
+    [JNFRunLoop performOnMainThreadWaiting:NO withBlock:^(){
+        [view setHidden:(BOOL)toHide];
+    }];
+    
+    JNF_COCOA_EXIT(env);
+}
+
+
+/*
  * Class:     sun_lwawt_macosx_CWrapper$NSScreen
  * Method:    frame
  * Signature: (J)Ljava/awt/Rectangle;
--- a/src/macosx/native/sun/awt/awt.m	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/macosx/native/sun/awt/awt.m	Wed Dec 26 19:03:36 2012 -0800
@@ -371,7 +371,8 @@
             CFRunLoopRef runLoop = [[NSRunLoop currentRunLoop] getCFRunLoop];
             CFRunLoopRemoveObserver(runLoop, busyObserver, kCFRunLoopDefaultMode);
             CFRunLoopRemoveObserver(runLoop, notBusyObserver, kCFRunLoopDefaultMode);
-
+            // We don't track if the runloop is busy, so set it free to let AWT finish when it needs
+            setBusy(NO);
             busyObserver = NULL;
             notBusyObserver = NULL;
         } else {
--- a/src/macosx/native/sun/java2d/opengl/CGLLayer.m	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/macosx/native/sun/java2d/opengl/CGLLayer.m	Wed Dec 26 19:03:36 2012 -0800
@@ -146,16 +146,15 @@
     __block CGLLayer *layer = nil;
 
 JNF_COCOA_ENTER(env);
-AWT_ASSERT_NOT_APPKIT_THREAD;
 
     JNFJObjectWrapper *javaLayer = [JNFJObjectWrapper wrapperWithJObject:obj withEnv:env];
 
-    [JNFRunLoop performOnMainThreadWaiting:YES withBlock:^(){
-        AWT_ASSERT_APPKIT_THREAD;
-
-        layer = [[CGLLayer alloc] initWithJavaLayer: javaLayer];
+    [ThreadUtilities performOnMainThreadWaiting:YES block:^(){
+            AWT_ASSERT_APPKIT_THREAD;
+        
+            layer = [[CGLLayer alloc] initWithJavaLayer: javaLayer];
     }];
-
+    
 JNF_COCOA_EXIT(env);
 
     return ptr_to_jlong(layer);
--- a/src/macosx/native/sun/osxapp/ThreadUtilities.h	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/macosx/native/sun/osxapp/ThreadUtilities.h	Wed Dec 26 19:03:36 2012 -0800
@@ -139,7 +139,7 @@
 + (JNIEnv*)getJNIEnvUncached;
 
 + (void)performOnMainThread:(SEL)aSelector onObject:(id)target withObject:(id)arg waitUntilDone:(BOOL)wait awtMode:(BOOL)inAWT;
-
++ (void)performOnMainThreadWaiting:(BOOL)wait block:(void (^)())block;
 @end
 
 void OSXAPP_SetJavaVM(JavaVM *vm);
--- a/src/macosx/native/sun/osxapp/ThreadUtilities.m	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/macosx/native/sun/osxapp/ThreadUtilities.m	Wed Dec 26 19:03:36 2012 -0800
@@ -245,6 +245,14 @@
     }
 }
 
++ (void)performOnMainThreadWaiting:(BOOL)wait block:(void (^)())block {
+    if ([NSThread isMainThread] && wait == YES) {
+        block(); 
+    } else { 
+        [JNFRunLoop performOnMainThreadWaiting:wait withBlock:block]; 
+    }
+}
+
 @end
 
 
--- a/src/share/classes/com/sun/rmi/rmid/ExecOptionPermission.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/share/classes/com/sun/rmi/rmid/ExecOptionPermission.java	Wed Dec 26 19:03:36 2012 -0800
@@ -223,7 +223,7 @@
         implements java.io.Serializable
     {
 
-        private Hashtable permissions;
+        private Hashtable<String, Permission> permissions;
         private boolean all_allowed; // true if "*" is in the collection
         private static final long serialVersionUID = -1242475729790124375L;
 
@@ -231,7 +231,7 @@
          * Create an empty ExecOptionPermissionCollection.
          */
         public ExecOptionPermissionCollection() {
-            permissions = new Hashtable(11);
+            permissions = new Hashtable<>(11);
             all_allowed = false;
         }
 
@@ -291,7 +291,7 @@
 
             String pname = p.getName();
 
-            Permission x = (Permission) permissions.get(pname);
+            Permission x = permissions.get(pname);
 
             if (x != null)
                 // we have a direct hit!
@@ -306,7 +306,7 @@
             while ((last = pname.lastIndexOf(".", offset)) != -1) {
 
                 pname = pname.substring(0, last+1) + "*";
-                x = (Permission) permissions.get(pname);
+                x = permissions.get(pname);
 
                 if (x != null) {
                     return x.implies(permission);
@@ -321,7 +321,7 @@
             while ((last = pname.lastIndexOf("=", offset)) != -1) {
 
                 pname = pname.substring(0, last+1) + "*";
-                x = (Permission) permissions.get(pname);
+                x = permissions.get(pname);
 
                 if (x != null) {
                     return x.implies(permission);
@@ -341,7 +341,7 @@
          * @return an enumeration of all the ExecOptionPermission objects.
          */
 
-        public Enumeration elements()
+        public Enumeration<Permission> elements()
         {
             return permissions.elements();
         }
--- a/src/share/classes/com/sun/rmi/rmid/ExecPermission.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/share/classes/com/sun/rmi/rmid/ExecPermission.java	Wed Dec 26 19:03:36 2012 -0800
@@ -227,7 +227,7 @@
         extends PermissionCollection
         implements java.io.Serializable
     {
-        private Vector permissions;
+        private Vector<Permission> permissions;
 
         private static final long serialVersionUID = -3352558508888368273L;
 
@@ -235,7 +235,7 @@
          * Create an empty ExecPermissionCollection.
          */
         public ExecPermissionCollection() {
-            permissions = new Vector();
+            permissions = new Vector<>();
         }
 
         /**
@@ -274,10 +274,10 @@
             if (! (permission instanceof ExecPermission))
                 return false;
 
-            Enumeration e = permissions.elements();
+            Enumeration<Permission> e = permissions.elements();
 
             while (e.hasMoreElements()) {
-                ExecPermission x = (ExecPermission) e.nextElement();
+                ExecPermission x = (ExecPermission)e.nextElement();
                 if (x.implies(permission)) {
                     return true;
                 }
@@ -291,7 +291,7 @@
          *
          * @return an enumeration of all the ExecPermission objects.
          */
-        public Enumeration elements()
+        public Enumeration<Permission> elements()
         {
             return permissions.elements();
         }
--- a/src/share/classes/java/net/HttpCookie.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/share/classes/java/net/HttpCookie.java	Wed Dec 26 19:03:36 2012 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2012, 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
@@ -30,6 +30,8 @@
 import java.util.NoSuchElementException;
 import java.text.SimpleDateFormat;
 import java.util.TimeZone;
+import java.util.Calendar;
+import java.util.GregorianCalendar;
 import java.util.Date;
 
 import java.lang.NullPointerException;  // for javadoc
@@ -105,7 +107,10 @@
     private final static String[] COOKIE_DATE_FORMATS = {
         "EEE',' dd-MMM-yyyy HH:mm:ss 'GMT'",
         "EEE',' dd MMM yyyy HH:mm:ss 'GMT'",
-        "EEE MMM dd yyyy HH:mm:ss 'GMT'Z"
+        "EEE MMM dd yyyy HH:mm:ss 'GMT'Z",
+        "EEE',' dd-MMM-yy HH:mm:ss 'GMT'",
+        "EEE',' dd MMM yy HH:mm:ss 'GMT'",
+        "EEE MMM dd yy HH:mm:ss 'GMT'Z"
     };
 
     //
@@ -1125,12 +1130,29 @@
      *                          time and the time specified by dateString
      */
     private long expiryDate2DeltaSeconds(String dateString) {
+        Calendar cal = new GregorianCalendar(GMT);
         for (int i = 0; i < COOKIE_DATE_FORMATS.length; i++) {
-            SimpleDateFormat df = new SimpleDateFormat(COOKIE_DATE_FORMATS[i], Locale.US);
+            SimpleDateFormat df = new SimpleDateFormat(COOKIE_DATE_FORMATS[i],
+                                                       Locale.US);
+            cal.set(1970, 0, 1, 0, 0, 0);
             df.setTimeZone(GMT);
+            df.setLenient(false);
+            df.set2DigitYearStart(cal.getTime());
             try {
-                Date date = df.parse(dateString);
-                return (date.getTime() - whenCreated) / 1000;
+                cal.setTime(df.parse(dateString));
+                if (!COOKIE_DATE_FORMATS[i].contains("yyyy")) {
+                    // 2-digit years following the standard set
+                    // out it rfc 6265
+                    int year = cal.get(Calendar.YEAR);
+                    year %= 100;
+                    if (year < 70) {
+                        year += 2000;
+                    } else {
+                        year += 1900;
+                    }
+                    cal.set(Calendar.YEAR, year);
+                }
+                return (cal.getTimeInMillis() - whenCreated) / 1000;
             } catch (Exception e) {
                 // Ignore, try the next date format
             }
@@ -1139,7 +1161,6 @@
     }
 
 
-
     /*
      * try to guess the cookie version through set-cookie header string
      */
--- a/src/share/classes/javax/swing/JColorChooser.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/share/classes/javax/swing/JColorChooser.java	Wed Dec 26 19:03:36 2012 -0800
@@ -182,6 +182,7 @@
             dialog = new ColorChooserDialog((Dialog)window, title, modal, c, chooserPane,
                                             okListener, cancelListener);
         }
+        dialog.getAccessibleContext().setAccessibleDescription(title);
         return dialog;
     }
 
@@ -647,6 +648,7 @@
         buttonPane.setLayout(new FlowLayout(FlowLayout.CENTER));
         JButton okButton = new JButton(okString);
         getRootPane().setDefaultButton(okButton);
+        okButton.getAccessibleContext().setAccessibleDescription(okString);
         okButton.setActionCommand("OK");
         okButton.addActionListener(new ActionListener() {
             public void actionPerformed(ActionEvent e) {
@@ -659,6 +661,7 @@
         buttonPane.add(okButton);
 
         cancelButton = new JButton(cancelString);
+        cancelButton.getAccessibleContext().setAccessibleDescription(cancelString);
 
         // The following few lines are used to register esc to close the dialog
         Action cancelKeyAction = new AbstractAction() {
@@ -688,6 +691,7 @@
         buttonPane.add(cancelButton);
 
         JButton resetButton = new JButton(resetString);
+        resetButton.getAccessibleContext().setAccessibleDescription(resetString);
         resetButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                reset();
--- a/src/share/classes/javax/swing/colorchooser/ColorChooserPanel.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/share/classes/javax/swing/colorchooser/ColorChooserPanel.java	Wed Dec 26 19:03:36 2012 -0800
@@ -135,6 +135,7 @@
         String label = this.model.getText(this, "HexCode"); // NON-NLS: suffix
         boolean visible = label != null;
         this.text.setVisible(visible);
+        this.text.getAccessibleContext().setAccessibleDescription(label);
         this.label.setVisible(visible);
         if (visible) {
             this.label.setText(label);
--- a/src/share/classes/javax/swing/colorchooser/ColorPanel.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/share/classes/javax/swing/colorchooser/ColorPanel.java	Wed Dec 26 19:03:36 2012 -0800
@@ -37,6 +37,7 @@
 import javax.swing.JPanel;
 import javax.swing.JRadioButton;
 import javax.swing.border.EmptyBorder;
+import javax.swing.JSpinner.DefaultEditor;
 
 final class ColorPanel extends JPanel implements ActionListener {
 
@@ -119,17 +120,26 @@
         int count = this.model.getCount();
         this.spinners[4].setVisible(count > 4);
         for (int i = 0; i < count; i++) {
+            String text = this.model.getLabel(this, i);
             Object object = this.spinners[i].getLabel();
             if (object instanceof JRadioButton) {
                 JRadioButton button = (JRadioButton) object;
-                button.setText(this.model.getLabel(this, i));
+                button.setText(text);
+                button.getAccessibleContext().setAccessibleDescription(text);
             }
             else if (object instanceof JLabel) {
                 JLabel label = (JLabel) object;
-                label.setText(this.model.getLabel(this, i));
+                label.setText(text);
             }
             this.spinners[i].setRange(this.model.getMinimum(i), this.model.getMaximum(i));
             this.spinners[i].setValue(this.values[i]);
+            this.spinners[i].getSlider().getAccessibleContext().setAccessibleName(text);
+            this.spinners[i].getSpinner().getAccessibleContext().setAccessibleName(text);
+            DefaultEditor editor = (DefaultEditor) this.spinners[i].getSpinner().getEditor();
+            editor.getTextField().getAccessibleContext().setAccessibleName(text);
+            this.spinners[i].getSlider().getAccessibleContext().setAccessibleDescription(text);
+            this.spinners[i].getSpinner().getAccessibleContext().setAccessibleDescription(text);
+            editor.getTextField().getAccessibleContext().setAccessibleDescription(text);
         }
     }
 
--- a/src/share/classes/javax/swing/plaf/basic/BasicColorChooserUI.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/share/classes/javax/swing/plaf/basic/BasicColorChooserUI.java	Wed Dec 26 19:03:36 2012 -0800
@@ -94,6 +94,7 @@
         tabbedPane = new JTabbedPane();
         tabbedPane.setName("ColorChooser.tabPane");
         tabbedPane.setInheritsPopupMenu(true);
+        tabbedPane.getAccessibleContext().setAccessibleDescription(tabbedPane.getName());
         singlePanel = new JPanel(new CenterLayout());
         singlePanel.setName("ColorChooser.panel");
         singlePanel.setInheritsPopupMenu(true);
--- a/src/share/classes/sun/rmi/log/ReliableLog.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/share/classes/sun/rmi/log/ReliableLog.java	Wed Dec 26 19:03:36 2012 -0800
@@ -344,10 +344,9 @@
                                return ClassLoader.getSystemClassLoader();
                             }
                         });
-                Class cl = loader.loadClass(logClassName);
-                if (LogFile.class.isAssignableFrom(cl)) {
-                    return cl.getConstructor(String.class, String.class);
-                }
+                Class<? extends LogFile> cl =
+                    loader.loadClass(logClassName).asSubclass(LogFile.class);
+                return cl.getConstructor(String.class, String.class);
             } catch (Exception e) {
                 System.err.println("Exception occurred:");
                 e.printStackTrace();
@@ -595,10 +594,10 @@
         } else {
             name = versionFile;
         }
-        DataOutputStream out =
-            new DataOutputStream(new FileOutputStream(fName(name)));
-        writeInt(out, version);
-        out.close();
+        try (FileOutputStream fos = new FileOutputStream(fName(name));
+             DataOutputStream out = new DataOutputStream(fos)) {
+            writeInt(out, version);
+        }
     }
 
     /**
@@ -629,11 +628,9 @@
      * @exception IOException If an I/O error has occurred.
      */
     private int readVersion(String name) throws IOException {
-        DataInputStream in = new DataInputStream(new FileInputStream(name));
-        try {
+        try (DataInputStream in = new DataInputStream
+                (new FileInputStream(name))) {
             return in.readInt();
-        } finally {
-            in.close();
         }
     }
 
--- a/src/share/classes/sun/rmi/registry/RegistryImpl.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/share/classes/sun/rmi/registry/RegistryImpl.java	Wed Dec 26 19:03:36 2012 -0800
@@ -77,9 +77,9 @@
     /* indicate compatibility with JDK 1.1.x version of class */
     private static final long serialVersionUID = 4666870661827494597L;
     private Hashtable<String, Remote> bindings
-        = new Hashtable<String, Remote>(101);
+        = new Hashtable<>(101);
     private static Hashtable<InetAddress, InetAddress> allowedAccessCache
-        = new Hashtable<InetAddress, InetAddress>(3);
+        = new Hashtable<>(3);
     private static RegistryImpl registry;
     private static ObjID id = new ObjID(ObjID.REGISTRY_ID);
 
@@ -194,9 +194,9 @@
         synchronized (bindings) {
             int i = bindings.size();
             names = new String[i];
-            Enumeration enum_ = bindings.keys();
+            Enumeration<String> enum_ = bindings.keys();
             while ((--i) >= 0)
-                names[i] = (String)enum_.nextElement();
+                names[i] = enum_.nextElement();
         }
         return names;
     }
--- a/src/share/classes/sun/rmi/rmic/BatchEnvironment.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/share/classes/sun/rmi/rmic/BatchEnvironment.java	Wed Dec 26 19:03:36 2012 -0800
@@ -160,7 +160,7 @@
     }
 
     /** list of generated source files created in this environment */
-    private Vector generatedFiles = new Vector();
+    private Vector<File> generatedFiles = new Vector<>();
 
     /**
      * Remember a generated source file generated so that it
@@ -177,9 +177,9 @@
      */
     public void deleteGeneratedFiles() {
         synchronized(generatedFiles) {
-            Enumeration enumeration = generatedFiles.elements();
+            Enumeration<File> enumeration = generatedFiles.elements();
             while (enumeration.hasMoreElements()) {
-                File file = (File) enumeration.nextElement();
+                File file = enumeration.nextElement();
                 file.delete();
             }
             generatedFiles.removeAllElements();
--- a/src/share/classes/sun/rmi/rmic/Main.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/share/classes/sun/rmi/rmic/Main.java	Wed Dec 26 19:03:36 2012 -0800
@@ -73,14 +73,15 @@
     File destDir;
     int flags;
     long tm;
-    Vector classes;
+    Vector<String> classes;
     boolean nowrite;
     boolean nocompile;
     boolean keepGenerated;
     boolean status;
     String[] generatorArgs;
-    Vector generators;
-    Class environmentClass = BatchEnvironment.class;
+    Vector<Generator> generators;
+    Class<? extends BatchEnvironment> environmentClass =
+        BatchEnvironment.class;
     boolean iiopGeneration = false;
 
     /**
@@ -183,7 +184,7 @@
         destDir = null;
         flags = F_WARNINGS;
         tm = System.currentTimeMillis();
-        classes = new Vector();
+        classes = new Vector<>();
         nowrite = false;
         nocompile = false;
         keepGenerated = false;
@@ -191,7 +192,7 @@
         if (generatorArgs == null) {
             return false;
         }
-        generators = new Vector();
+        generators = new Vector<>();
 
         // Pre-process command line for @file arguments
         try {
@@ -411,7 +412,7 @@
 
         // Get the environment required by this generator...
 
-        Class envClass = BatchEnvironment.class;
+        Class<?> envClass = BatchEnvironment.class;
         String env = getString("generator.env." + arg);
         if (env != null) {
             try {
@@ -423,7 +424,7 @@
 
                     // Yes, so switch to the new one...
 
-                    environmentClass = envClass;
+                    environmentClass = envClass.asSubclass(BatchEnvironment.class);
 
                 } else {
 
@@ -495,8 +496,9 @@
         try {
             Class[] ctorArgTypes = {OutputStream.class,ClassPath.class,Main.class};
             Object[] ctorArgs = {out,classPath,this};
-            Constructor constructor = environmentClass.getConstructor(ctorArgTypes);
-            result = (BatchEnvironment) constructor.newInstance(ctorArgs);
+            Constructor<? extends BatchEnvironment> constructor =
+                environmentClass.getConstructor(ctorArgTypes);
+            result =  constructor.newInstance(ctorArgs);
             result.reset();
         }
         catch (Exception e) {
@@ -530,7 +532,7 @@
              */
             for (int i = classes.size()-1; i >= 0; i-- ) {
                 Identifier implClassName =
-                    Identifier.lookup((String)classes.elementAt(i));
+                    Identifier.lookup(classes.elementAt(i));
 
                 /*
                  * Fix bugid 4049354: support using '.' as an inner class
@@ -558,7 +560,7 @@
                 try {
                     ClassDefinition def = decl.getClassDefinition(env);
                     for (int j = 0; j < generators.size(); j++) {
-                        Generator gen = (Generator)generators.elementAt(j);
+                        Generator gen = generators.elementAt(j);
                         gen.generate(env, def, destDir);
                     }
                 } catch (ClassNotFound ex) {
@@ -673,7 +675,7 @@
 
         do {
             done = true;
-            for (Enumeration e = env.getClasses() ; e.hasMoreElements() ; ) {
+            for (Enumeration<?> e = env.getClasses() ; e.hasMoreElements() ; ) {
                 ClassDeclaration c = (ClassDeclaration)e.nextElement();
                 done = compileClass(c,buf,env);
             }
@@ -682,7 +684,9 @@
 
     /*
      * Compile a single class.
+     * Fallthrough is intentional
      */
+    @SuppressWarnings("fallthrough")
     public boolean compileClass (ClassDeclaration c,
                                  ByteArrayOutputStream buf,
                                  BatchEnvironment env)
@@ -879,6 +883,6 @@
         args[1] = (arg1 != null ? arg1.toString() : "null");
         args[2] = (arg2 != null ? arg2.toString() : "null");
 
-        return java.text.MessageFormat.format(format, args);
+        return java.text.MessageFormat.format(format, (Object[]) args);
     }
 }
--- a/src/share/classes/sun/rmi/rmic/RMIGenerator.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/share/classes/sun/rmi/rmic/RMIGenerator.java	Wed Dec 26 19:03:36 2012 -0800
@@ -61,7 +61,7 @@
  */
 public class RMIGenerator implements RMIConstants, Generator {
 
-    private static final Hashtable versionOptions = new Hashtable();
+    private static final Hashtable<String, Integer> versionOptions = new Hashtable<>();
     static {
         versionOptions.put("-v1.1", new Integer(STUB_VERSION_1_1));
         versionOptions.put("-vcompat", new Integer(STUB_VERSION_FAT));
@@ -96,7 +96,7 @@
                         return false;
                     }
                     explicitVersion = arg;
-                    version = ((Integer) versionOptions.get(arg)).intValue();
+                    version = versionOptions.get(arg);
                     argv[i] = null;
                 }
             }
@@ -519,7 +519,7 @@
          * follows a previous catch of it or of one of its superclasses.
          * The following method invocation takes care of these details.
          */
-        Vector catchList = computeUniqueCatchList(exceptions);
+        Vector<ClassDefinition> catchList = computeUniqueCatchList(exceptions);
 
         /*
          * If we need to catch any particular exceptions (i.e. this method
@@ -615,10 +615,10 @@
          * UnexpectedException, and end the try block.
          */
         if (catchList.size() > 0) {
-            for (Enumeration enumeration = catchList.elements();
+            for (Enumeration<ClassDefinition> enumeration = catchList.elements();
                  enumeration.hasMoreElements();)
             {
-                ClassDefinition def = (ClassDefinition) enumeration.nextElement();
+                ClassDefinition def = enumeration.nextElement();
                 p.pOlnI("} catch (" + def.getName() + " e) {");
                 p.pln("throw e;");
             }
@@ -650,8 +650,8 @@
      * of its superclasses is in the throws clause of the method, indicating
      * that no exceptions need to be caught.
      */
-    private Vector computeUniqueCatchList(ClassDeclaration[] exceptions) {
-        Vector uniqueList = new Vector();       // unique exceptions to catch
+    private Vector<ClassDefinition> computeUniqueCatchList(ClassDeclaration[] exceptions) {
+        Vector<ClassDefinition> uniqueList = new Vector<>();       // unique exceptions to catch
 
         uniqueList.addElement(defRuntimeException);
         uniqueList.addElement(defRemoteException);
@@ -682,8 +682,7 @@
                  * exceptions that need to be caught:
                  */
                 for (int j = 0; j < uniqueList.size();) {
-                    ClassDefinition def =
-                        (ClassDefinition) uniqueList.elementAt(j);
+                    ClassDefinition def = uniqueList.elementAt(j);
                     if (def.superClassOf(env, decl)) {
                         /*
                          * If a superclass of this exception is already on
--- a/src/share/classes/sun/rmi/rmic/newrmic/Main.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/share/classes/sun/rmi/rmic/newrmic/Main.java	Wed Dec 26 19:03:36 2012 -0800
@@ -455,7 +455,7 @@
         BatchEnvironment env;
         try {
             Constructor<? extends BatchEnvironment> cons =
-                batch.envClass.getConstructor(new Class[] { RootDoc.class });
+                batch.envClass.getConstructor(new Class<?>[] { RootDoc.class });
             env = cons.newInstance(rootDoc);
         } catch (NoSuchMethodException e) {
             throw new AssertionError(e);
--- a/src/share/classes/sun/rmi/rmic/newrmic/Resources.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/share/classes/sun/rmi/rmic/newrmic/Resources.java	Wed Dec 26 19:03:36 2012 -0800
@@ -69,7 +69,7 @@
             format = "missing resource key: key = \"" + key + "\", " +
                 "arguments = \"{0}\", \"{1}\", \"{2}\"";
         }
-        return MessageFormat.format(format, args);
+        return MessageFormat.format(format, (Object[]) args);
     }
 
     /**
--- a/src/share/classes/sun/rmi/server/ActivatableRef.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/share/classes/sun/rmi/server/ActivatableRef.java	Wed Dec 26 19:03:36 2012 -0800
@@ -80,7 +80,7 @@
         String className = desc.getClassName();
 
         try {
-            Class cl =
+            Class<?> cl =
                 RMIClassLoader.loadClass(desc.getLocation(), className);
             RemoteRef clientRef = new ActivatableRef(id, null);
             return Util.createProxy(cl, clientRef, false);
@@ -373,8 +373,8 @@
         if (className.equals("")) return;
 
         try {
-            Class refClass = Class.forName(RemoteRef.packagePrefix + "." +
-                                           className);
+            Class<?> refClass = Class.forName(RemoteRef.packagePrefix + "." +
+                                              className);
             ref = (RemoteRef)refClass.newInstance();
             ref.readExternal(in);
         } catch (InstantiationException e) {
--- a/src/share/classes/sun/rmi/server/Activation.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/share/classes/sun/rmi/server/Activation.java	Wed Dec 26 19:03:36 2012 -0800
@@ -139,7 +139,6 @@
 
     /** indicate compatibility with JDK 1.2 version of class */
     private static final long serialVersionUID = 2921265612698155191L;
-
     private static final byte MAJOR_VERSION = 1;
     private static final byte MINOR_VERSION = 0;
 
@@ -299,6 +298,7 @@
     private static class SystemRegistryImpl extends RegistryImpl {
 
         private static final String NAME = ActivationSystem.class.getName();
+        private static final long serialVersionUID = 4877330021609408794L;
         private final ActivationSystem systemStub;
 
         SystemRegistryImpl(int port,
@@ -805,9 +805,8 @@
         ActivationGroupDesc desc = null;
         ActivationGroupID groupID = null;
         long incarnation = 0;
-        Map<ActivationID,ObjectEntry> objects =
-            new HashMap<ActivationID,ObjectEntry>();
-        Set<ActivationID> restartSet = new HashSet<ActivationID>();
+        Map<ActivationID,ObjectEntry> objects = new HashMap<>();
+        Set<ActivationID> restartSet = new HashSet<>();
 
         transient ActivationInstantiator group = null;
         transient int status = NORMAL;
@@ -1058,6 +1057,11 @@
             }
         }
 
+       /*
+        * Fallthrough from TERMINATE to TERMINATING
+        * is intentional
+        */
+        @SuppressWarnings("fallthrough")
         private void await() {
             while (true) {
                 switch (status) {
@@ -1229,14 +1233,13 @@
                     PipeWriter.plugTogetherPair
                         (child.getInputStream(), System.out,
                          child.getErrorStream(), System.err);
-
-                    MarshalOutputStream out =
-                        new MarshalOutputStream(child.getOutputStream());
-                    out.writeObject(id);
-                    out.writeObject(desc);
-                    out.writeLong(incarnation);
-                    out.flush();
-                    out.close();
+                    try (MarshalOutputStream out =
+                            new MarshalOutputStream(child.getOutputStream())) {
+                        out.writeObject(id);
+                        out.writeObject(desc);
+                        out.writeLong(incarnation);
+                        out.flush();
+                    }
 
 
                 } catch (IOException e) {
@@ -1353,7 +1356,7 @@
         cmdenv = desc.getCommandEnvironment();
 
         // argv is the literal command to exec
-        List<String> argv = new ArrayList<String>();
+        List<String> argv = new ArrayList<>();
 
         // Command name/path
         argv.add((cmdenv != null && cmdenv.getCommandPath() != null)
@@ -1958,7 +1961,7 @@
             }
 
             String log = null;
-            List<String> childArgs = new ArrayList<String>();
+            List<String> childArgs = new ArrayList<>();
 
             /*
              * Parse arguments
@@ -2032,8 +2035,7 @@
                 }
 
                 try {
-                    Class<?> execPolicyClass =
-                        RMIClassLoader.loadClass(execPolicyClassName);
+                    Class<?> execPolicyClass = getRMIClass(execPolicyClassName);
                     execPolicy = execPolicyClass.newInstance();
                     execPolicyMethod =
                         execPolicyClass.getMethod("checkExecCommand",
@@ -2124,6 +2126,10 @@
         }
     }
 
+    @SuppressWarnings("deprecation")
+    private static Class<?> getRMIClass(String execPolicyClassName) throws Exception  {
+        return RMIClassLoader.loadClass(execPolicyClassName);
+    }
     /*
      * Dijkstra semaphore operations to limit the number of subprocesses
      * rmid attempts to make at once.
--- a/src/share/classes/sun/rmi/server/ActivationGroupImpl.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/share/classes/sun/rmi/server/ActivationGroupImpl.java	Wed Dec 26 19:03:36 2012 -0800
@@ -66,10 +66,10 @@
 
     /** maps persistent IDs to activated remote objects */
     private final Hashtable<ActivationID,ActiveEntry> active =
-        new Hashtable<ActivationID,ActiveEntry>();
+        new Hashtable<>();
     private boolean groupInactive = false;
     private final ActivationGroupID groupID;
-    private final List<ActivationID> lockedIDs = new ArrayList<ActivationID>();
+    private final List<ActivationID> lockedIDs = new ArrayList<>();
 
     /**
      * Creates a default activation group implementation.
@@ -296,14 +296,9 @@
             active.put(id, entry);
             return entry.mobj;
 
-        } catch (NoSuchMethodException e) {
-            /* user forgot to provide activatable constructor? */
-            throw new ActivationException
-                ("Activatable object must provide an activation"+
-                 " constructor", e);
-
-        } catch (NoSuchMethodError e) {
-            /* code recompiled and user forgot to provide
+        } catch (NoSuchMethodException | NoSuchMethodError e) {
+            /* user forgot to provide activatable constructor?
+             * or code recompiled and user forgot to provide
              *  activatable constructor?
              */
             throw new ActivationException
--- a/src/share/classes/sun/rmi/server/LoaderHandler.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/share/classes/sun/rmi/server/LoaderHandler.java	Wed Dec 26 19:03:36 2012 -0800
@@ -112,11 +112,11 @@
      * garbage collected.
      */
     private static final HashMap<LoaderKey, LoaderEntry> loaderTable
-        = new HashMap<LoaderKey, LoaderEntry>(5);
+        = new HashMap<>(5);
 
     /** reference queue for cleared class loader entries */
     private static final ReferenceQueue<Loader> refQueue
-        = new ReferenceQueue<Loader>();
+        = new ReferenceQueue<>();
 
     /*
      * Disallow anyone from creating one of these.
@@ -149,8 +149,8 @@
      * but first try to resolve the named class through the given
      * "default loader".
      */
-    public static Class loadClass(String codebase, String name,
-                                  ClassLoader defaultLoader)
+    public static Class<?> loadClass(String codebase, String name,
+                                     ClassLoader defaultLoader)
         throws MalformedURLException, ClassNotFoundException
     {
         if (loaderLog.isLoggable(Log.BRIEF)) {
@@ -170,7 +170,7 @@
 
         if (defaultLoader != null) {
             try {
-                Class c = Class.forName(name, false, defaultLoader);
+                Class<?> c = Class.forName(name, false, defaultLoader);
                 if (loaderLog.isLoggable(Log.VERBOSE)) {
                     loaderLog.log(Log.VERBOSE,
                         "class \"" + name + "\" found via defaultLoader, " +
@@ -189,7 +189,7 @@
      * a class) that RMI will use to annotate the call stream when
      * marshalling objects of the given class.
      */
-    public static String getClassAnnotation(Class cl) {
+    public static String getClassAnnotation(Class<?> cl) {
         String name = cl.getName();
 
         /*
@@ -261,15 +261,13 @@
 
                     annotation = urlsToPath(urls);
                 }
-            } catch (SecurityException e) {
+            } catch (SecurityException | IOException e) {
                 /*
-                 * If access was denied to the knowledge of the class
-                 * loader's URLs, fall back to the default behavior.
-                 */
-            } catch (IOException e) {
-                /*
-                 * This shouldn't happen, although it is declared to be
-                 * thrown by openConnection() and getPermission().  If it
+                 * SecurityException: If access was denied to the knowledge of
+                 * the class loader's URLs, fall back to the default behavior.
+                 *
+                 * IOException: This shouldn't happen, although it is declared
+                 * to be thrown by openConnection() and getPermission().  If it
                  * does happen, forget about this class loader's URLs and
                  * fall back to the default behavior.
                  */
@@ -358,7 +356,7 @@
      * Load a class from the RMI class loader corresponding to the given
      * codebase URL path in the current execution context.
      */
-    private static Class loadClass(URL[] urls, String name)
+    private static Class<?> loadClass(URL[] urls, String name)
         throws ClassNotFoundException
     {
         ClassLoader parent = getRMIContextClassLoader();
@@ -375,7 +373,7 @@
         SecurityManager sm = System.getSecurityManager();
         if (sm == null) {
             try {
-                Class c = Class.forName(name, false, parent);
+                Class<?> c = Class.forName(name, false, parent);
                 if (loaderLog.isLoggable(Log.VERBOSE)) {
                     loaderLog.log(Log.VERBOSE,
                         "class \"" + name + "\" found via " +
@@ -424,7 +422,7 @@
                  * resolved without the security-offending codebase anyway;
                  * if so, return successfully (see bugids 4191926 & 4349670).
                  */
-                Class c = Class.forName(name, false, parent);
+                Class<?> c = Class.forName(name, false, parent);
                 if (loaderLog.isLoggable(Log.VERBOSE)) {
                     loaderLog.log(Log.VERBOSE,
                         "class \"" + name + "\" found via " +
@@ -450,7 +448,7 @@
         }
 
         try {
-            Class c = Class.forName(name, false, loader);
+            Class<?> c = Class.forName(name, false, loader);
             if (loaderLog.isLoggable(Log.VERBOSE)) {
                 loaderLog.log(Log.VERBOSE,
                     "class \"" + name + "\" " + "found via codebase, " +
@@ -472,8 +470,8 @@
      * implement interface classes named by the given array of
      * interface names.
      */
-    public static Class loadProxyClass(String codebase, String[] interfaces,
-                                       ClassLoader defaultLoader)
+    public static Class<?> loadProxyClass(String codebase, String[] interfaces,
+                                          ClassLoader defaultLoader)
         throws MalformedURLException, ClassNotFoundException
     {
         if (loaderLog.isLoggable(Log.BRIEF)) {
@@ -537,7 +535,7 @@
         SecurityManager sm = System.getSecurityManager();
         if (sm == null) {
             try {
-                Class c = loadProxyClass(interfaces, defaultLoader, parent,
+                Class<?> c = loadProxyClass(interfaces, defaultLoader, parent,
                                          false);
                 if (loaderLog.isLoggable(Log.VERBOSE)) {
                     loaderLog.log(Log.VERBOSE,
@@ -584,8 +582,8 @@
                  * resolved without the security-offending codebase anyway;
                  * if so, return successfully (see bugids 4191926 & 4349670).
                  */
-                Class c = loadProxyClass(interfaces, defaultLoader, parent,
-                                         false);
+                Class<?> c = loadProxyClass(interfaces, defaultLoader, parent,
+                                            false);
                 if (loaderLog.isLoggable(Log.VERBOSE)) {
                     loaderLog.log(Log.VERBOSE,
                         "(access to codebase denied) " +
@@ -608,7 +606,7 @@
         }
 
         try {
-            Class c = loadProxyClass(interfaces, defaultLoader, loader, true);
+            Class<?> c = loadProxyClass(interfaces, defaultLoader, loader, true);
             if (loaderLog.isLoggable(Log.VERBOSE)) {
                 loaderLog.log(Log.VERBOSE,
                               "proxy class defined by " + c.getClassLoader());
@@ -629,14 +627,14 @@
      * class will implement classes which are named in the supplied
      * interfaceNames.
      */
-    private static Class loadProxyClass(String[] interfaceNames,
-                                        ClassLoader defaultLoader,
-                                        ClassLoader codebaseLoader,
-                                        boolean preferCodebase)
+    private static Class<?> loadProxyClass(String[] interfaceNames,
+                                           ClassLoader defaultLoader,
+                                           ClassLoader codebaseLoader,
+                                           boolean preferCodebase)
         throws ClassNotFoundException
     {
         ClassLoader proxyLoader = null;
-        Class[] classObjs = new Class[interfaceNames.length];
+        Class<?>[] classObjs = new Class<?>[interfaceNames.length];
         boolean[] nonpublic = { false };
 
       defaultLoaderCase:
@@ -692,7 +690,7 @@
      * Define a proxy class in the given class loader.  The proxy
      * class will implement the given interfaces Classes.
      */
-    private static Class loadProxyClass(ClassLoader loader, Class[] interfaces)
+    private static Class<?> loadProxyClass(ClassLoader loader, Class[] interfaces)
         throws ClassNotFoundException
     {
         try {
@@ -727,7 +725,7 @@
         ClassLoader nonpublicLoader = null;
 
         for (int i = 0; i < interfaces.length; i++) {
-            Class cl =
+            Class<?> cl =
                 (classObjs[i] = Class.forName(interfaces[i], false, loader));
 
             if (!Modifier.isPublic(cl.getModifiers())) {
@@ -778,7 +776,7 @@
 
     /** map from weak(key=string) to [URL[], soft(key)] */
     private static final Map<String, Object[]> pathToURLsCache
-        = new WeakHashMap<String, Object[]>(5);
+        = new WeakHashMap<>(5);
 
     /**
      * Convert an array of URL objects into a corresponding string
@@ -1171,9 +1169,9 @@
         private void checkPermissions() {
             SecurityManager sm = System.getSecurityManager();
             if (sm != null) {           // should never be null?
-                Enumeration enum_ = permissions.elements();
+                Enumeration<Permission> enum_ = permissions.elements();
                 while (enum_.hasMoreElements()) {
-                    sm.checkPermission((Permission) enum_.nextElement());
+                    sm.checkPermission(enum_.nextElement());
                 }
             }
         }
--- a/src/share/classes/sun/rmi/server/MarshalInputStream.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/share/classes/sun/rmi/server/MarshalInputStream.java	Wed Dec 26 19:03:36 2012 -0800
@@ -65,14 +65,14 @@
 
     /** table to hold sun classes to which access is explicitly permitted */
     protected static Map<String, Class<?>> permittedSunClasses
-        = new HashMap<String, Class<?>>(3);
+        = new HashMap<>(3);
 
     /** if true, don't try superclass first in resolveClass() */
     private boolean skipDefaultResolveClass = false;
 
     /** callbacks to make when done() called: maps Object to Runnable */
     private final Map<Object, Runnable> doneCallbacks
-        = new HashMap<Object, Runnable>(3);
+        = new HashMap<>(3);
 
     /**
      * if true, load classes (if not available locally) only from the
@@ -168,7 +168,7 @@
      * from which to load the specified class.
      * It will find, load, and return the class.
      */
-    protected Class resolveClass(ObjectStreamClass classDesc)
+    protected Class<?> resolveClass(ObjectStreamClass classDesc)
         throws IOException, ClassNotFoundException
     {
         /*
@@ -230,7 +230,7 @@
      * resolveProxyClass is extended to acquire (if present) the location
      * to determine the class loader to define the proxy class in.
      */
-    protected Class resolveProxyClass(String[] interfaces)
+    protected Class<?> resolveProxyClass(String[] interfaces)
         throws IOException, ClassNotFoundException
     {
         /*
@@ -262,7 +262,7 @@
      * Fix for 4179055: Need to assist resolving sun stubs; resolve
      * class locally if it is a "permitted" sun class
      */
-    private Class checkSunClass(String className, AccessControlException e)
+    private Class<?> checkSunClass(String className, AccessControlException e)
         throws AccessControlException
     {
         // ensure that we are giving out a stub for the correct reason
--- a/src/share/classes/sun/rmi/server/UnicastRef.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/share/classes/sun/rmi/server/UnicastRef.java	Wed Dec 26 19:03:36 2012 -0800
@@ -65,6 +65,7 @@
         Log.getLog("sun.rmi.client.call", "RMI",
                    AccessController.doPrivileged(
                        new GetBooleanAction("sun.rmi.client.logCalls")));
+    private static final long serialVersionUID = 8258372400816541186L;
 
     protected LiveRef ref;
 
--- a/src/share/classes/sun/rmi/server/UnicastRef2.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/share/classes/sun/rmi/server/UnicastRef2.java	Wed Dec 26 19:03:36 2012 -0800
@@ -36,6 +36,7 @@
  * implementation of javax.management.remote.rmi.RMIConnector.
  **/
 public class UnicastRef2 extends UnicastRef {
+    private static final long serialVersionUID = 1829537514995881838L;
 
     /**
      * Create a new (empty) Unicast remote reference.
--- a/src/share/classes/sun/rmi/server/UnicastServerRef.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/share/classes/sun/rmi/server/UnicastServerRef.java	Wed Dec 26 19:03:36 2012 -0800
@@ -189,7 +189,7 @@
                                boolean permanent)
         throws RemoteException
     {
-        Class implClass = impl.getClass();
+        Class<?> implClass = impl.getClass();
         Remote stub;
 
         try {
@@ -327,7 +327,7 @@
             // marshal return value
             try {
                 ObjectOutput out = call.getResultStream(true);
-                Class rtype = method.getReturnType();
+                Class<?> rtype = method.getReturnType();
                 if (rtype != void.class) {
                     marshalValue(rtype, result, out);
                 }
@@ -537,7 +537,7 @@
         HashToMethod_Maps() {}
 
         protected Map<Long,Method> computeValue(Class<?> remoteClass) {
-            Map<Long,Method> map = new HashMap<Long,Method>();
+            Map<Long,Method> map = new HashMap<>();
             for (Class<?> cl = remoteClass;
                  cl != null;
                  cl = cl.getSuperclass())
--- a/src/share/classes/sun/rmi/server/Util.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/share/classes/sun/rmi/server/Util.java	Wed Dec 26 19:03:36 2012 -0800
@@ -119,12 +119,12 @@
      * @throws StubNotFoundException if problem locating/creating stub or
      * creating the dynamic proxy instance
      **/
-    public static Remote createProxy(Class implClass,
+    public static Remote createProxy(Class<?> implClass,
                                      RemoteRef clientRef,
                                      boolean forceStubUse)
         throws StubNotFoundException
     {
-        Class remoteClass;
+        Class<?> remoteClass;
 
         try {
             remoteClass = getRemoteClass(implClass);
@@ -162,7 +162,7 @@
      *
      * @param remoteClass the class to obtain remote interfaces from
      */
-    private static boolean stubClassExists(Class remoteClass) {
+    private static boolean stubClassExists(Class<?> remoteClass) {
         if (!withoutStubs.containsKey(remoteClass)) {
             try {
                 Class.forName(remoteClass.getName() + "_Stub",
@@ -182,11 +182,11 @@
      * @throws ClassNotFoundException if no class is found to have a
      * remote interface
      */
-    private static Class getRemoteClass(Class cl)
+    private static Class<?> getRemoteClass(Class<?> cl)
         throws ClassNotFoundException
     {
         while (cl != null) {
-            Class[] interfaces = cl.getInterfaces();
+            Class<?>[] interfaces = cl.getInterfaces();
             for (int i = interfaces.length -1; i >= 0; i--) {
                 if (Remote.class.isAssignableFrom(interfaces[i]))
                     return cl;          // this class implements remote object
@@ -206,8 +206,8 @@
      *          any illegal remote interfaces
      * @throws  NullPointerException if remoteClass is null
      */
-    private static Class[] getRemoteInterfaces(Class remoteClass) {
-        ArrayList<Class<?>> list = new ArrayList<Class<?>>();
+    private static Class<?>[] getRemoteInterfaces(Class<?> remoteClass) {
+        ArrayList<Class<?>> list = new ArrayList<>();
         getRemoteInterfaces(list, remoteClass);
         return list.toArray(new Class<?>[list.size()]);
     }
@@ -220,15 +220,15 @@
      *          any illegal remote interfaces
      * @throws  NullPointerException if the specified class or list is null
      */
-    private static void getRemoteInterfaces(ArrayList<Class<?>> list, Class cl) {
-        Class superclass = cl.getSuperclass();
+    private static void getRemoteInterfaces(ArrayList<Class<?>> list, Class<?> cl) {
+        Class<?> superclass = cl.getSuperclass();
         if (superclass != null) {
             getRemoteInterfaces(list, superclass);
         }
 
-        Class[] interfaces = cl.getInterfaces();
+        Class<?>[] interfaces = cl.getInterfaces();
         for (int i = 0; i < interfaces.length; i++) {
-            Class intf = interfaces[i];
+            Class<?> intf = interfaces[i];
             /*
              * If it is a remote interface (if it extends from
              * java.rmi.Remote) and is not already in the list,
@@ -272,7 +272,7 @@
      * the stub class is initiated from class loader of the specified class
      * (which may be the bootstrap class loader).
      **/
-    private static RemoteStub createStub(Class remoteClass, RemoteRef ref)
+    private static RemoteStub createStub(Class<?> remoteClass, RemoteRef ref)
         throws StubNotFoundException
     {
         String stubname = remoteClass.getName() + "_Stub";
@@ -285,7 +285,7 @@
         try {
             Class<?> stubcl =
                 Class.forName(stubname, false, remoteClass.getClassLoader());
-            Constructor cons = stubcl.getConstructor(stubConsParamTypes);
+            Constructor<?> cons = stubcl.getConstructor(stubConsParamTypes);
             return (RemoteStub) cons.newInstance(new Object[] { ref });
 
         } catch (ClassNotFoundException e) {
@@ -315,7 +315,7 @@
     static Skeleton createSkeleton(Remote object)
         throws SkeletonNotFoundException
     {
-        Class cl;
+        Class<?> cl;
         try {
             cl = getRemoteClass(object.getClass());
         } catch (ClassNotFoundException ex ) {
@@ -327,7 +327,7 @@
         // now try to load the skeleton based ont he name of the class
         String skelname = cl.getName() + "_Skel";
         try {
-            Class skelcl = Class.forName(skelname, false, cl.getClassLoader());
+            Class<?> skelcl = Class.forName(skelname, false, cl.getClassLoader());
 
             return (Skeleton)skelcl.newInstance();
         } catch (ClassNotFoundException ex) {
@@ -391,12 +391,12 @@
     private static String getMethodNameAndDescriptor(Method m) {
         StringBuffer desc = new StringBuffer(m.getName());
         desc.append('(');
-        Class[] paramTypes = m.getParameterTypes();
+        Class<?>[] paramTypes = m.getParameterTypes();
         for (int i = 0; i < paramTypes.length; i++) {
             desc.append(getTypeDescriptor(paramTypes[i]));
         }
         desc.append(')');
-        Class returnType = m.getReturnType();
+        Class<?> returnType = m.getReturnType();
         if (returnType == void.class) { // optimization: handle void here
             desc.append('V');
         } else {
@@ -409,7 +409,7 @@
      * Get the descriptor of a particular type, as appropriate for either
      * a parameter or return type in a method descriptor.
      */
-    private static String getTypeDescriptor(Class type) {
+    private static String getTypeDescriptor(Class<?> type) {
         if (type.isPrimitive()) {
             if (type == int.class) {
                 return "I";
@@ -454,7 +454,7 @@
      * top-level type (and perhaps other enclosing types), the
      * separator will be '$', etc.
      **/
-    public static String getUnqualifiedName(Class c) {
+    public static String getUnqualifiedName(Class<?> c) {
         String binaryName = c.getName();
         return binaryName.substring(binaryName.lastIndexOf('.') + 1);
     }
--- a/src/share/classes/sun/rmi/server/WeakClassHashMap.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/share/classes/sun/rmi/server/WeakClassHashMap.java	Wed Dec 26 19:03:36 2012 -0800
@@ -46,8 +46,7 @@
  **/
 public abstract class WeakClassHashMap<V> {
 
-    private Map<Class<?>,ValueCell<V>> internalMap =
-        new WeakHashMap<Class<?>,ValueCell<V>>();
+    private Map<Class<?>,ValueCell<V>> internalMap = new WeakHashMap<>();
 
     protected WeakClassHashMap() { }
 
--- a/src/share/classes/sun/rmi/transport/ConnectionInputStream.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/share/classes/sun/rmi/transport/ConnectionInputStream.java	Wed Dec 26 19:03:36 2012 -0800
@@ -43,7 +43,7 @@
     private boolean dgcAckNeeded = false;
 
     /** Hashtable mapping Endpoints to lists of LiveRefs to register */
-    private Map incomingRefTable = new HashMap(5);
+    private Map<Endpoint, List<LiveRef>> incomingRefTable = new HashMap<>(5);
 
     /** identifier for gc ack*/
     private UID ackID;
@@ -70,10 +70,10 @@
         Endpoint ep = ref.getEndpoint();
 
         // check whether endpoint is already in the hashtable
-        List refList = (List) incomingRefTable.get(ep);
+        List<LiveRef> refList = incomingRefTable.get(ep);
 
         if (refList == null) {
-            refList = new ArrayList();
+            refList = new ArrayList<LiveRef>();
             incomingRefTable.put(ep, refList);
         }
 
@@ -89,13 +89,9 @@
      */
     void registerRefs() throws IOException {
         if (!incomingRefTable.isEmpty()) {
-            Set entrySet = incomingRefTable.entrySet();
-            Iterator iter = entrySet.iterator();
-            while (iter.hasNext()) {
-                Map.Entry entry = (Map.Entry) iter.next();
-                Endpoint ep = (Endpoint) entry.getKey();
-                List refList = (List) entry.getValue();
-                DGCClient.registerRefs(ep, refList);
+            for (Map.Entry<Endpoint, List<LiveRef>> entry :
+                     incomingRefTable.entrySet()) {
+                DGCClient.registerRefs(entry.getKey(), entry.getValue());
             }
         }
     }
--- a/src/share/classes/sun/rmi/transport/DGCAckHandler.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/share/classes/sun/rmi/transport/DGCAckHandler.java	Wed Dec 26 19:03:36 2012 -0800
@@ -78,7 +78,7 @@
         Collections.synchronizedMap(new HashMap<UID,DGCAckHandler>());
 
     private final UID id;
-    private List<Object> objList = new ArrayList<Object>(); // null if released
+    private List<Object> objList = new ArrayList<>(); // null if released
     private Future<?> task = null;
 
     /**
--- a/src/share/classes/sun/rmi/transport/DGCClient.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/share/classes/sun/rmi/transport/DGCClient.java	Wed Dec 26 19:03:36 2012 -0800
@@ -125,7 +125,7 @@
      * All of the LiveRefs in the list must be for remote objects at the
      * given endpoint.
      */
-    static void registerRefs(Endpoint ep, List refs) {
+    static void registerRefs(Endpoint ep, List<LiveRef> refs) {
         /*
          * Look up the given endpoint and register the refs with it.
          * The retrieved entry may get removed from the global endpoint
@@ -176,9 +176,9 @@
         private DGC dgc;
 
         /** table of refs held for endpoint: maps LiveRef to RefEntry */
-        private Map refTable = new HashMap(5);
+        private Map<LiveRef, RefEntry> refTable = new HashMap<>(5);
         /** set of RefEntry instances from last (failed) dirty call */
-        private Set invalidRefs = new HashSet(5);
+        private Set<RefEntry> invalidRefs = new HashSet<>(5);
 
         /** true if this entry has been removed from the global table */
         private boolean removed = false;
@@ -200,12 +200,12 @@
         private boolean interruptible = false;
 
         /** reference queue for phantom references */
-        private ReferenceQueue refQueue = new ReferenceQueue();
+        private ReferenceQueue<LiveRef> refQueue = new ReferenceQueue<>();
         /** set of clean calls that need to be made */
-        private Set pendingCleans = new HashSet(5);
+        private Set<CleanRequest> pendingCleans = new HashSet<>(5);
 
         /** global endpoint table: maps Endpoint to EndpointEntry */
-        private static Map endpointTable = new HashMap(5);
+        private static Map<Endpoint,EndpointEntry> endpointTable = new HashMap<>(5);
         /** handle for GC latency request (for future cancellation) */
         private static GC.LatencyRequest gcLatencyRequest = null;
 
@@ -215,7 +215,7 @@
          */
         public static EndpointEntry lookup(Endpoint ep) {
             synchronized (endpointTable) {
-                EndpointEntry entry = (EndpointEntry) endpointTable.get(ep);
+                EndpointEntry entry = endpointTable.get(ep);
                 if (entry == null) {
                     entry = new EndpointEntry(ep);
                     endpointTable.put(ep, entry);
@@ -260,10 +260,10 @@
          *
          * This method must NOT be called while synchronized on this entry.
          */
-        public boolean registerRefs(List refs) {
+        public boolean registerRefs(List<LiveRef> refs) {
             assert !Thread.holdsLock(this);
 
-            Set refsToDirty = null;     // entries for refs needing dirty
+            Set<RefEntry> refsToDirty = null;     // entries for refs needing dirty
             long sequenceNum;           // sequence number for dirty call
 
             synchronized (this) {
@@ -271,18 +271,18 @@
                     return false;
                 }
 
-                Iterator iter = refs.iterator();
+                Iterator<LiveRef> iter = refs.iterator();
                 while (iter.hasNext()) {
-                    LiveRef ref = (LiveRef) iter.next();
+                    LiveRef ref = iter.next();
                     assert ref.getEndpoint().equals(endpoint);
 
-                    RefEntry refEntry = (RefEntry) refTable.get(ref);
+                    RefEntry refEntry = refTable.get(ref);
                     if (refEntry == null) {
                         LiveRef refClone = (LiveRef) ref.clone();
                         refEntry = new RefEntry(refClone);
                         refTable.put(refClone, refEntry);
                         if (refsToDirty == null) {
-                            refsToDirty = new HashSet(5);
+                            refsToDirty = new HashSet<>(5);
                         }
                         refsToDirty.add(refEntry);
                     }
@@ -345,7 +345,7 @@
          *
          * This method must NOT be called while synchronized on this entry.
          */
-        private void makeDirtyCall(Set refEntries, long sequenceNum) {
+        private void makeDirtyCall(Set<RefEntry> refEntries, long sequenceNum) {
             assert !Thread.holdsLock(this);
 
             ObjID[] ids;
@@ -443,9 +443,9 @@
                          * refs, so that clean calls for them in the future
                          * will be strong.
                          */
-                        Iterator iter = refEntries.iterator();
+                        Iterator<RefEntry> iter = refEntries.iterator();
                         while (iter.hasNext()) {
-                            RefEntry refEntry = (RefEntry) iter.next();
+                            RefEntry refEntry = iter.next();
                             refEntry.markDirtyFailed();
                         }
                     }
@@ -497,7 +497,7 @@
                     long timeToWait;
                     RefEntry.PhantomLiveRef phantom = null;
                     boolean needRenewal = false;
-                    Set refsToDirty = null;
+                    Set<RefEntry> refsToDirty = null;
                     long sequenceNum = Long.MIN_VALUE;
 
                     synchronized (EndpointEntry.this) {
@@ -564,7 +564,7 @@
                             needRenewal = true;
                             if (!invalidRefs.isEmpty()) {
                                 refsToDirty = invalidRefs;
-                                invalidRefs = new HashSet(5);
+                                invalidRefs = new HashSet<>(5);
                             }
                             sequenceNum = getNextSequenceNum();
                         }
@@ -594,8 +594,8 @@
         private void processPhantomRefs(RefEntry.PhantomLiveRef phantom) {
             assert Thread.holdsLock(this);
 
-            Set strongCleans = null;
-            Set normalCleans = null;
+            Set<RefEntry> strongCleans = null;
+            Set<RefEntry> normalCleans = null;
 
             do {
                 RefEntry refEntry = phantom.getRefEntry();
@@ -603,12 +603,12 @@
                 if (refEntry.isRefSetEmpty()) {
                     if (refEntry.hasDirtyFailed()) {
                         if (strongCleans == null) {
-                            strongCleans = new HashSet(5);
+                            strongCleans = new HashSet<>(5);
                         }
                         strongCleans.add(refEntry);
                     } else {
                         if (normalCleans == null) {
-                            normalCleans = new HashSet(5);
+                            normalCleans = new HashSet<>(5);
                         }
                         normalCleans.add(refEntry);
                     }
@@ -659,9 +659,9 @@
         private void makeCleanCalls() {
             assert !Thread.holdsLock(this);
 
-            Iterator iter = pendingCleans.iterator();
+            Iterator<CleanRequest> iter = pendingCleans.iterator();
             while (iter.hasNext()) {
-                CleanRequest request = (CleanRequest) iter.next();
+                CleanRequest request = iter.next();
                 try {
                     dgc.clean(request.objIDs, request.sequenceNum, vmid,
                               request.strong);
@@ -683,11 +683,11 @@
          * Create an array of ObjIDs (needed for the DGC remote calls)
          * from the ids in the given set of refs.
          */
-        private static ObjID[] createObjIDArray(Set refEntries) {
+        private static ObjID[] createObjIDArray(Set<RefEntry> refEntries) {
             ObjID[] ids = new ObjID[refEntries.size()];
-            Iterator iter = refEntries.iterator();
+            Iterator<RefEntry> iter = refEntries.iterator();
             for (int i = 0; i < ids.length; i++) {
-                ids[i] = ((RefEntry) iter.next()).getRef().getObjID();
+                ids[i] = iter.next().getRef().getObjID();
             }
             return ids;
         }
@@ -704,7 +704,7 @@
             /** LiveRef value for this entry (not a registered instance) */
             private LiveRef ref;
             /** set of phantom references to registered instances */
-            private Set refSet = new HashSet(5);
+            private Set<PhantomLiveRef> refSet = new HashSet<>(5);
             /** true if a dirty call containing this ref has failed */
             private boolean dirtyFailed = false;
 
@@ -792,7 +792,7 @@
              * used to detect when the LiveRef becomes permanently
              * unreachable in this VM.
              */
-            private class PhantomLiveRef extends PhantomReference {
+            private class PhantomLiveRef extends PhantomReference<LiveRef> {
 
                 public PhantomLiveRef(LiveRef ref) {
                     super(ref, EndpointEntry.this.refQueue);
--- a/src/share/classes/sun/rmi/transport/DGCImpl.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/share/classes/sun/rmi/transport/DGCImpl.java	Wed Dec 26 19:03:36 2012 -0800
@@ -84,7 +84,7 @@
     /** remote implementation of DGC interface for this VM */
     private static DGCImpl dgc;
     /** table that maps VMID to LeaseInfo */
-    private Map<VMID,LeaseInfo> leaseTable = new HashMap<VMID,LeaseInfo>();
+    private Map<VMID,LeaseInfo> leaseTable = new HashMap<>();
     /** checks for lease expiration */
     private Future<?> checker = null;
 
@@ -236,7 +236,7 @@
         long time = System.currentTimeMillis();
 
         /* List of vmids that need to be removed from the leaseTable */
-        List<LeaseInfo> toUnregister = new ArrayList<LeaseInfo>();
+        List<LeaseInfo> toUnregister = new ArrayList<>();
 
         /* Build a list of leaseInfo objects that need to have
          * targets removed from their notifySet.  Remove expired
@@ -313,7 +313,7 @@
     private static class LeaseInfo {
         VMID vmid;
         long expiration;
-        Set<Target> notifySet = new HashSet<Target>();
+        Set<Target> notifySet = new HashSet<>();
 
         LeaseInfo(VMID vmid, long lease) {
             this.vmid = vmid;
--- a/src/share/classes/sun/rmi/transport/ObjectTable.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/share/classes/sun/rmi/transport/ObjectTable.java	Wed Dec 26 19:03:36 2012 -0800
@@ -62,9 +62,9 @@
 
     /** tables mapping to Target, keyed from ObjectEndpoint and impl object */
     private static final Map<ObjectEndpoint,Target> objTable =
-        new HashMap<ObjectEndpoint,Target>();
+        new HashMap<>();
     private static final Map<WeakRef,Target> implTable =
-        new HashMap<WeakRef,Target>();
+        new HashMap<>();
 
     /**
      * lock guarding keepAliveCount, reaper, and gcLatencyRequest.
@@ -79,7 +79,7 @@
     private static Thread reaper = null;
 
     /** queue notified when weak refs in the table are cleared */
-    static final ReferenceQueue reapQueue = new ReferenceQueue();
+    static final ReferenceQueue<Object> reapQueue = new ReferenceQueue<>();
 
     /** handle for GC latency request (for future cancellation) */
     private static GC.LatencyRequest gcLatencyRequest = null;
--- a/src/share/classes/sun/rmi/transport/StreamRemoteCall.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/share/classes/sun/rmi/transport/StreamRemoteCall.java	Wed Dec 26 19:03:36 2012 -0800
@@ -199,6 +199,7 @@
     /**
      * Do whatever it takes to execute the call.
      */
+    @SuppressWarnings("fallthrough")
     public void executeCall() throws Exception {
         byte returnType;
 
@@ -252,6 +253,7 @@
             } else {
                 throw new UnmarshalException("Return type not Exception");
             }
+            // Exception is thrown before fallthrough can occur
         default:
             if (Transport.transportLog.isLoggable(Log.BRIEF)) {
                 Transport.transportLog.log(Log.BRIEF,
--- a/src/share/classes/sun/rmi/transport/Target.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/share/classes/sun/rmi/transport/Target.java	Wed Dec 26 19:03:36 2012 -0800
@@ -53,9 +53,10 @@
     /** stub for remote object */
     private final Remote stub;
     /** set of clients that hold references to this target */
-    private final Vector refSet = new Vector();
+    private final Vector<VMID> refSet = new Vector<>();
     /** table that maps client endpoints to sequence numbers */
-    private final Hashtable sequenceTable = new Hashtable(5);
+    private final Hashtable<VMID, SequenceEntry> sequenceTable =
+        new Hashtable<>(5);
     /** access control context in which target was created */
     private final AccessControlContext acc;
     /** context class loader in which target was created */
@@ -241,7 +242,7 @@
      */
     synchronized void referenced(long sequenceNum, VMID vmid) {
         // check sequence number for vmid
-        SequenceEntry entry = (SequenceEntry) sequenceTable.get(vmid);
+        SequenceEntry entry = sequenceTable.get(vmid);
         if (entry == null) {
             sequenceTable.put(vmid, new SequenceEntry(sequenceNum));
         } else if (entry.sequenceNum < sequenceNum) {
@@ -280,7 +281,7 @@
     synchronized void unreferenced(long sequenceNum, VMID vmid, boolean strong)
     {
         // check sequence number for vmid
-        SequenceEntry entry = (SequenceEntry) sequenceTable.get(vmid);
+        SequenceEntry entry = sequenceTable.get(vmid);
         if (entry == null || entry.sequenceNum > sequenceNum) {
             // late clean call; ignore
             return;
@@ -366,9 +367,9 @@
              */
             unpinImpl();
             DGCImpl dgc = DGCImpl.getDGCImpl();
-            Enumeration enum_ = refSet.elements();
+            Enumeration<VMID> enum_ = refSet.elements();
             while (enum_.hasMoreElements()) {
-                VMID vmid = (VMID) enum_.nextElement();
+                VMID vmid = enum_.nextElement();
                 dgc.unregisterTarget(vmid, this);
             }
             return true;
--- a/src/share/classes/sun/rmi/transport/Transport.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/share/classes/sun/rmi/transport/Transport.java	Wed Dec 26 19:03:36 2012 -0800
@@ -62,7 +62,7 @@
         Log.getLog("sun.rmi.transport.misc", "transport", Transport.logLevel);
 
     /** References the current transport when a call is being serviced */
-    private static final ThreadLocal currentTransport = new ThreadLocal();
+    private static final ThreadLocal<Transport> currentTransport = new ThreadLocal<>();
 
     /** ObjID for DGCImpl */
     private static final ObjID dgcID = new ObjID(ObjID.DGC_ID);
@@ -104,7 +104,7 @@
      * returns null.
      **/
     static Transport currentTransport() {
-        return (Transport) currentTransport.get();
+        return currentTransport.get();
     }
 
     /**
--- a/src/share/classes/sun/rmi/transport/WeakRef.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/share/classes/sun/rmi/transport/WeakRef.java	Wed Dec 26 19:03:36 2012 -0800
@@ -41,7 +41,7 @@
  * @author  Ann Wollrath
  * @author  Peter Jones
  */
-class WeakRef extends WeakReference {
+class WeakRef extends WeakReference<Object> {
 
     /** value of the referent's "identity" hash code */
     private int hashValue;
@@ -60,7 +60,7 @@
     /**
      * Create a new WeakRef to the given object, registered with a queue.
      */
-    public WeakRef(Object obj, ReferenceQueue q) {
+    public WeakRef(Object obj, ReferenceQueue<Object> q) {
         super(obj, q);
         setHashValue(obj);      // cache object's "identity" hash code
     }
--- a/src/share/classes/sun/rmi/transport/proxy/CGIHandler.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/share/classes/sun/rmi/transport/proxy/CGIHandler.java	Wed Dec 26 19:03:36 2012 -0800
@@ -33,6 +33,7 @@
  * in a client's request.
  */
 class CGIClientException extends Exception {
+    private static final long serialVersionUID = 8147981687059865216L;
 
     public CGIClientException(String s) {
         super(s);
@@ -44,6 +45,8 @@
  */
 class CGIServerException extends Exception {
 
+    private static final long serialVersionUID = 6928425456704527017L;
+
     public CGIServerException(String s) {
         super(s);
     }
@@ -111,9 +114,9 @@
     };
 
     /* construct table mapping command strings to handlers */
-    private static Hashtable commandLookup;
+    private static Hashtable<String, CGICommandHandler> commandLookup;
     static {
-        commandLookup = new Hashtable();
+        commandLookup = new Hashtable<>();
         for (int i = 0; i < commands.length; ++ i)
             commandLookup.put(commands[i].getName(), commands[i]);
     }
@@ -140,7 +143,7 @@
                 param = QueryString.substring(delim + 1);
             }
             CGICommandHandler handler =
-                (CGICommandHandler) commandLookup.get(command);
+                commandLookup.get(command);
             if (handler != null)
                 try {
                     handler.execute(param);
@@ -200,7 +203,7 @@
 
 /**
  * "forward" command: Forward request body to local port on the server,
- * and send reponse back to client.
+ * and send response back to client.
  */
 final class CGIForwardCommand implements CGICommandHandler {
 
@@ -208,6 +211,11 @@
         return "forward";
     }
 
+    @SuppressWarnings("deprecation")
+    private String getLine (DataInputStream socketIn) throws IOException {
+        return socketIn.readLine();
+    }
+
     public void execute(String param) throws CGIClientException, CGIServerException
     {
         if (!CGIHandler.RequestMethod.equals("POST"))
@@ -276,7 +284,7 @@
         int responseContentLength = -1;
         do {
             try {
-                line = socketIn.readLine();
+                line = getLine(socketIn);
             } catch (IOException e) {
                 throw new CGIServerException("error reading from server");
             }
@@ -285,8 +293,8 @@
                     "unexpected EOF reading server response");
 
             if (line.toLowerCase().startsWith(key)) {
-                if (contentLengthFound)
-                    ; // what would we want to do in this case??
+                // if contentLengthFound is true
+                // we should probably do something here
                 responseContentLength =
                     Integer.parseInt(line.substring(key.length()).trim());
                 contentLengthFound = true;
--- a/src/share/classes/sun/rmi/transport/proxy/HttpInputStream.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/share/classes/sun/rmi/transport/proxy/HttpInputStream.java	Wed Dec 26 19:03:36 2012 -0800
@@ -70,8 +70,8 @@
                 throw new EOFException();
 
             if (line.toLowerCase().startsWith(key)) {
-                if (contentLengthFound)
-                    ; // what would we want to do in this case??
+                // if contentLengthFound is true
+                // we should probably do something here
                 bytesLeft =
                     Integer.parseInt(line.substring(key.length()).trim());
                 contentLengthFound = true;
--- a/src/share/classes/sun/rmi/transport/proxy/HttpSendSocket.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/share/classes/sun/rmi/transport/proxy/HttpSendSocket.java	Wed Dec 26 19:03:36 2012 -0800
@@ -203,7 +203,7 @@
 
                 message += "HttpSendSocket.readNotify: response body: ";
                 try {
-                    DataInputStream din = new DataInputStream(in);
+                    BufferedReader din = new BufferedReader(new InputStreamReader(in));
                     String line;
                     while ((line = din.readLine()) != null)
                         message += line + lineSeparator;
--- a/src/share/classes/sun/rmi/transport/proxy/RMIMasterSocketFactory.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/share/classes/sun/rmi/transport/proxy/RMIMasterSocketFactory.java	Wed Dec 26 19:03:36 2012 -0800
@@ -74,20 +74,21 @@
             "sun.rmi.transport.proxy.eagerHttpFallback")).booleanValue();
 
     /** table of hosts successfully connected to and the factory used */
-    private Hashtable successTable = new Hashtable();
+    private Hashtable<String, RMISocketFactory> successTable =
+        new Hashtable<>();
 
     /** maximum number of hosts to remember successful connection to */
     private static final int MaxRememberedHosts = 64;
 
     /** list of the hosts in successTable in initial connection order */
-    private Vector hostList = new Vector(MaxRememberedHosts);
+    private Vector<String> hostList = new Vector<>(MaxRememberedHosts);
 
-    /** default factory to initally use for direct socket connection */
+    /** default factory for initial use for direct socket connection */
     protected RMISocketFactory initialFactory = new RMIDirectSocketFactory();
 
     /** ordered list of factories to try as alternate connection
       * mechanisms if a direct socket connections fails */
-    protected Vector altFactoryList;
+    protected Vector<RMISocketFactory> altFactoryList;
 
     /**
      * Create a RMIMasterSocketFactory object.  Establish order of
@@ -95,7 +96,7 @@
      * socket connection fails.
      */
     public RMIMasterSocketFactory() {
-        altFactoryList = new Vector(2);
+        altFactoryList = new Vector<>(2);
         boolean setFactories = false;
 
         try {
@@ -152,7 +153,7 @@
          * If we remember successfully connecting to this host before,
          * use the same factory.
          */
-        factory = (RMISocketFactory) successTable.get(host);
+        factory = successTable.get(host);
         if (factory != null) {
             if (proxyLog.isLoggable(Log.BRIEF)) {
                 proxyLog.log(Log.BRIEF,
@@ -207,9 +208,7 @@
 
             return initialSocket;
 
-        } catch (UnknownHostException e) {
-            initialFailure = e;
-        } catch (NoRouteToHostException e) {
+        } catch (UnknownHostException | NoRouteToHostException e) {
             initialFailure = e;
         } catch (SocketException e) {
             if (eagerHttpFallback) {
@@ -227,22 +226,20 @@
 
                 // Finally, try any alternate connection mechanisms.
                 for (int i = 0; i < altFactoryList.size(); ++ i) {
-                    factory = (RMISocketFactory) altFactoryList.elementAt(i);
-                    try {
-                        if (proxyLog.isLoggable(Log.BRIEF)) {
-                            proxyLog.log(Log.BRIEF,
-                                "trying with factory: " + factory);
-                        }
-
+                    factory = altFactoryList.elementAt(i);
+                    if (proxyLog.isLoggable(Log.BRIEF)) {
+                        proxyLog.log(Log.BRIEF,
+                            "trying with factory: " + factory);
+                    }
+                    try (Socket testSocket =
+                            factory.createSocket(host, port)) {
                         // For HTTP connections, the output (POST request) must
                         // be sent before we verify a successful connection.
                         // So, sacrifice a socket for the sake of testing...
                         // The following sequence should verify a successful
                         // HTTP connection if no IOException is thrown.
-                        Socket testSocket = factory.createSocket(host, port);
                         InputStream in = testSocket.getInputStream();
                         int b = in.read(); // probably -1 for EOF...
-                        testSocket.close();
                     } catch (IOException ex) {
                         if (proxyLog.isLoggable(Log.BRIEF)) {
                             proxyLog.log(Log.BRIEF, "factory failed: ", ex);
@@ -276,9 +273,7 @@
                 }
                 // if connector ever does get socket, it won't be used
                 connector.notUsed();
-            } catch (UnknownHostException e) {
-                initialFailure = e;
-            } catch (NoRouteToHostException e) {
+            } catch (UnknownHostException | NoRouteToHostException e) {
                 initialFailure = e;
             } catch (SocketException e) {
                 if (eagerHttpFallback) {
--- a/src/share/classes/sun/rmi/transport/tcp/ConnectionMultiplexer.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/share/classes/sun/rmi/transport/tcp/ConnectionMultiplexer.java	Wed Dec 26 19:03:36 2012 -0800
@@ -85,7 +85,7 @@
     private DataOutputStream dataOut;
 
     /** table holding currently open connection IDs and related info */
-    private Hashtable connectionTable = new Hashtable(7);
+    private Hashtable<Integer, MultiplexConnectionInfo> connectionTable = new Hashtable<>(7);
 
     /** number of currently open connections */
     private int numConnections = 0;
@@ -131,7 +131,6 @@
     {
         try {
             int op, id, length;
-            Integer idObj;
             MultiplexConnectionInfo info;
 
             while (true) {
@@ -148,9 +147,7 @@
                         multiplexLog.log(Log.VERBOSE, "operation  OPEN " + id);
                     }
 
-                    idObj = new Integer(id);
-                    info =
-                        (MultiplexConnectionInfo) connectionTable.get(idObj);
+                    info = connectionTable.get(id);
                     if (info != null)
                         throw new IOException(
                             "OPEN: Connection ID already exists");
@@ -158,7 +155,7 @@
                     info.in = new MultiplexInputStream(this, info, 2048);
                     info.out = new MultiplexOutputStream(this, info, 2048);
                     synchronized (connectionTable) {
-                        connectionTable.put(idObj, info);
+                        connectionTable.put(id, info);
                         ++ numConnections;
                     }
                     sun.rmi.transport.Connection conn;
@@ -174,9 +171,7 @@
                         multiplexLog.log(Log.VERBOSE, "operation  CLOSE " + id);
                     }
 
-                    idObj = new Integer(id);
-                    info =
-                        (MultiplexConnectionInfo) connectionTable.get(idObj);
+                    info = connectionTable.get(id);
                     if (info == null)
                         throw new IOException(
                             "CLOSE: Invalid connection ID");
@@ -185,7 +180,7 @@
                     if (!info.closed)
                         sendCloseAck(info);
                     synchronized (connectionTable) {
-                        connectionTable.remove(idObj);
+                        connectionTable.remove(id);
                         -- numConnections;
                     }
                     break;
@@ -199,9 +194,7 @@
                             "operation  CLOSEACK " + id);
                     }
 
-                    idObj = new Integer(id);
-                    info =
-                        (MultiplexConnectionInfo) connectionTable.get(idObj);
+                    info = connectionTable.get(id);
                     if (info == null)
                         throw new IOException(
                             "CLOSEACK: Invalid connection ID");
@@ -211,7 +204,7 @@
                     info.in.disconnect();
                     info.out.disconnect();
                     synchronized (connectionTable) {
-                        connectionTable.remove(idObj);
+                        connectionTable.remove(id);
                         -- numConnections;
                     }
                     break;
@@ -219,9 +212,7 @@
                 // remote endpoint declaring additional bytes receivable
                 case REQUEST:
                     id = dataIn.readUnsignedShort();
-                    idObj = new Integer(id);
-                    info =
-                        (MultiplexConnectionInfo) connectionTable.get(idObj);
+                    info = connectionTable.get(id);
                     if (info == null)
                         throw new IOException(
                             "REQUEST: Invalid connection ID");
@@ -238,9 +229,7 @@
                 // remote endpoint transmitting data packet
                 case TRANSMIT:
                     id = dataIn.readUnsignedShort();
-                    idObj = new Integer(id);
-                    info =
-                        (MultiplexConnectionInfo) connectionTable.get(idObj);
+                    info = connectionTable.get(id);
                     if (info == null)
                         throw new IOException("SEND: Invalid connection ID");
                     length = dataIn.readInt();
@@ -273,7 +262,6 @@
         // If all possible 32768 IDs are used,
         // this method will block searching for a new ID forever.
         int id;
-        Integer idObj;
         do {
             lastID = (++ lastID) & 0x7FFF;
             id = lastID;
@@ -283,8 +271,7 @@
             // two endpoints.
             if (orig)
                 id |= 0x8000;
-            idObj = new Integer(id);
-        } while (connectionTable.get(idObj) != null);
+        } while (connectionTable.get(id) != null);
 
         // create multiplexing streams and bookkeeping information
         MultiplexConnectionInfo info = new MultiplexConnectionInfo(id);
@@ -298,7 +285,7 @@
             if (numConnections >= maxConnections)
                 throw new IOException("Cannot exceed " + maxConnections +
                     " simultaneous multiplexed connections");
-            connectionTable.put(idObj, info);
+            connectionTable.put(id, info);
             ++ numConnections;
         }
 
@@ -331,10 +318,10 @@
                 return;
             alive = false;
 
-            Enumeration enum_ = connectionTable.elements();
+            Enumeration<MultiplexConnectionInfo> enum_ =
+                    connectionTable.elements();
             while (enum_.hasMoreElements()) {
-                MultiplexConnectionInfo info =
-                    (MultiplexConnectionInfo) enum_.nextElement();
+                MultiplexConnectionInfo info = enum_.nextElement();
                 info.in.disconnect();
                 info.out.disconnect();
             }
--- a/src/share/classes/sun/rmi/transport/tcp/TCPChannel.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/share/classes/sun/rmi/transport/tcp/TCPChannel.java	Wed Dec 26 19:03:36 2012 -0800
@@ -64,7 +64,7 @@
     private final TCPTransport tr;
     /** list of cached connections */
     private final List<TCPConnection> freeList =
-        new ArrayList<TCPConnection>();
+        new ArrayList<>();
     /** frees cached connections that have expired (guarded by freeList) */
     private Future<?> reaper = null;
 
@@ -480,7 +480,7 @@
     private TCPTransport transport;
 
     /** queue of connections to be accepted */
-    private List<Connection> queue = new ArrayList<Connection>();
+    private List<Connection> queue = new ArrayList<>();
 
     /** thread ID counter */
     private static int threadNum = 0;
--- a/src/share/classes/sun/rmi/transport/tcp/TCPEndpoint.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/share/classes/sun/rmi/transport/tcp/TCPEndpoint.java	Wed Dec 26 19:03:36 2012 -0800
@@ -148,7 +148,7 @@
     // TBD: should this be a weak hash table?
     private static final
         Map<TCPEndpoint,LinkedList<TCPEndpoint>> localEndpoints =
-        new HashMap<TCPEndpoint,LinkedList<TCPEndpoint>>();
+        new HashMap<>();
 
     /**
      * Create an endpoint for a specified host and port.
@@ -623,10 +623,9 @@
             try {
                 TCPEndpoint.shedConnectionCaches();
                 // REMIND: should we retry createSocket?
-            } catch (OutOfMemoryError mem) {
+            } catch (OutOfMemoryError | Exception mem) {
                 // don't quit if out of memory
-            } catch (Exception ex) {
-                // don't quit if shed fails non-catastrophically
+                // or shed fails non-catastrophically
             }
 
             throw new ConnectIOException("Exception creating connection to: " +
--- a/src/share/classes/sun/rmi/transport/tcp/TCPTransport.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/share/classes/sun/rmi/transport/tcp/TCPTransport.java	Wed Dec 26 19:03:36 2012 -0800
@@ -120,7 +120,7 @@
 
     /** client host for the current thread's connection */
     private static final ThreadLocal<ConnectionHandler>
-        threadConnectionHandler = new ThreadLocal<ConnectionHandler>();
+        threadConnectionHandler = new ThreadLocal<>();
 
     /** endpoints for this transport */
     private final LinkedList<TCPEndpoint> epList;
@@ -130,7 +130,7 @@
     private ServerSocket server = null;
     /** table mapping endpoints to channels */
     private final Map<TCPEndpoint,Reference<TCPChannel>> channelTable =
-        new WeakHashMap<TCPEndpoint,Reference<TCPChannel>>();
+        new WeakHashMap<>();
 
     static final RMISocketFactory defaultSocketFactory =
         RMISocketFactory.getDefaultSocketFactory();
--- a/src/share/classes/sun/security/provider/certpath/OCSPChecker.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/share/classes/sun/security/provider/certpath/OCSPChecker.java	Wed Dec 26 19:03:36 2012 -0800
@@ -257,18 +257,21 @@
                         }
                     }
 
-                    // Check that the key identifiers match
+                    // Check that the key identifiers match, if both are present
+                    byte[] anchorKeyId = null;
                     if (certIssuerKeyId != null &&
-                        !Arrays.equals(certIssuerKeyId, getKeyId(anchorCert))) {
+                        (anchorKeyId =
+                            OCSPChecker.getKeyId(anchorCert)) != null) {
+                        if (!Arrays.equals(certIssuerKeyId, anchorKeyId)) {
+                            continue; // try next cert
+                        }
 
-                        continue; // try next cert
-                    }
-
-                    if (DEBUG != null && certIssuerKeyId != null) {
-                        DEBUG.println("Issuer certificate key ID: " +
-                            String.format("0x%0" +
-                                (certIssuerKeyId.length * 2) + "x",
-                                    new BigInteger(1, certIssuerKeyId)));
+                        if (DEBUG != null) {
+                            DEBUG.println("Issuer certificate key ID: " +
+                                String.format("0x%0" +
+                                    (certIssuerKeyId.length * 2) + "x",
+                                        new BigInteger(1, certIssuerKeyId)));
+                        }
                     }
 
                     issuerCert = anchorCert;
--- a/src/share/classes/sun/security/provider/certpath/OCSPResponse.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/share/classes/sun/security/provider/certpath/OCSPResponse.java	Wed Dec 26 19:03:36 2012 -0800
@@ -264,6 +264,7 @@
                 DEBUG.println("OCSP Responder name: " + responderName);
             }
         } else if (tag == KEY_TAG) {
+            seq = seq.data.getDerValue(); // consume tag and length
             if (DEBUG != null) {
                 byte[] responderKeyId = seq.getOctetString();
                 DEBUG.println("OCSP Responder key ID: " +
@@ -293,7 +294,7 @@
         }
         for (int i = 0; i < singleResponseDer.length; i++) {
             SingleResponse singleResponse
-                = new SingleResponse(singleResponseDer[i]);
+                = new SingleResponse(singleResponseDer[i], dateCheckedAgainst);
             singleResponseMap.put(singleResponse.getCertId(), singleResponse);
         }
 
@@ -392,21 +393,29 @@
                     // Retrieve the issuer's key identifier
                     if (certIssuerKeyId == null) {
                         certIssuerKeyId = signerCert.getIssuerKeyIdentifier();
+                        if (certIssuerKeyId == null) {
+                            if (DEBUG != null) {
+                                DEBUG.println("No issuer key identifier (AKID) "
+                                    + "in the signer certificate");
+                            }
+                        }
                     }
 
-                    // Check that the key identifiers match
-                    if (certIssuerKeyId == null ||
-                        !Arrays.equals(certIssuerKeyId,
-                            OCSPChecker.getKeyId(responderCert))) {
+                    // Check that the key identifiers match, if both are present
+                    byte[] responderKeyId = null;
+                    if (certIssuerKeyId != null &&
+                        (responderKeyId =
+                            OCSPChecker.getKeyId(responderCert)) != null) {
+                        if (!Arrays.equals(certIssuerKeyId, responderKeyId)) {
+                            continue; // try next cert
+                        }
 
-                        continue; // try next cert
-                    }
-
-                    if (DEBUG != null) {
-                        DEBUG.println("Issuer certificate key ID: " +
-                            String.format("0x%0" +
-                                (certIssuerKeyId.length * 2) + "x",
-                                    new BigInteger(1, certIssuerKeyId)));
+                        if (DEBUG != null) {
+                            DEBUG.println("Issuer certificate key ID: " +
+                                String.format("0x%0" +
+                                    (certIssuerKeyId.length * 2) + "x",
+                                        new BigInteger(1, certIssuerKeyId)));
+                        }
                     }
 
                     // Check for the OCSPSigning key purpose
@@ -441,7 +450,7 @@
                     } catch (GeneralSecurityException e) {
                         if (DEBUG != null) {
                             DEBUG.println("Responder's certificate not within" +
-                            " the validity period" + e);
+                            " the validity period " + e);
                         }
                         continue; // try next cert
                     }
@@ -567,6 +576,11 @@
         private final Map<String, java.security.cert.Extension> singleExtensions;
 
         private SingleResponse(DerValue der) throws IOException {
+            this(der, null);
+        }
+
+        private SingleResponse(DerValue der, Date dateCheckedAgainst)
+            throws IOException {
             if (der.tag != DerValue.tag_Sequence) {
                 throw new IOException("Bad ASN.1 encoding in SingleResponse");
             }
@@ -664,7 +678,8 @@
                 singleExtensions = Collections.emptyMap();
             }
 
-            long now = System.currentTimeMillis();
+            long now = (dateCheckedAgainst == null) ?
+                System.currentTimeMillis() : dateCheckedAgainst.getTime();
             Date nowPlusSkew = new Date(now + MAX_CLOCK_SKEW);
             Date nowMinusSkew = new Date(now - MAX_CLOCK_SKEW);
             if (DEBUG != null) {
--- a/src/share/classes/sun/tools/jar/Main.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/share/classes/sun/tools/jar/Main.java	Wed Dec 26 19:03:36 2012 -0800
@@ -839,8 +839,8 @@
 
     void replaceFSC(String files[]) {
         if (files != null) {
-            for (String file : files) {
-                file = file.replace(File.separatorChar, '/');
+            for (int i = 0; i < files.length; i++) {
+                files[i] = files[i].replace(File.separatorChar, '/');
             }
         }
     }
--- a/src/solaris/native/sun/xawt/XlibWrapper.c	Wed Dec 19 15:49:39 2012 -0800
+++ b/src/solaris/native/sun/xawt/XlibWrapper.c	Wed Dec 26 19:03:36 2012 -0800
@@ -1260,13 +1260,15 @@
 
 JavaVM* jvm = NULL;
 static int ToolkitErrorHandler(Display * dpy, XErrorEvent * event) {
+    JNIEnv * env;
     if (jvm != NULL) {
-        JNIEnv * env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
-        return JNU_CallStaticMethodByName(env, NULL, "sun/awt/X11/XToolkit", "globalErrorHandler", "(JJ)I",
-                                          ptr_to_jlong(dpy), ptr_to_jlong(event)).i;
-    } else {
-        return 0;
+        env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
+        if (env) {
+            return JNU_CallStaticMethodByName(env, NULL, "sun/awt/X11/XToolkit", "globalErrorHandler", "(JJ)I",
+                                              ptr_to_jlong(dpy), ptr_to_jlong(event)).i;
+        }
     }
+    return 0;
 }
 
 /*
--- a/test/Makefile	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/Makefile	Wed Dec 26 19:03:36 2012 -0800
@@ -510,7 +510,7 @@
           demo/jvmti demo/zipfs \
           javax/naming com/sun/jndi \
           javax/script \
-          javax/sql \
+          java/sql javax/sql \
           javax/smartcardio \
           com/sun/xml \
           javax/xml/ws com/sun/internal/ws \
--- a/test/java/net/CookieHandler/B6791927.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/net/CookieHandler/B6791927.java	Wed Dec 26 19:03:36 2012 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2012, 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
@@ -35,7 +35,7 @@
     public static final void main( String[] aaParamters ) throws Exception{
         // Forces a non US locale
         Locale.setDefault(Locale.FRANCE);
-        List<HttpCookie> cookies = HttpCookie.parse("set-cookie: CUSTOMER=WILE_E_COYOTE; expires=Wednesday, 09-Nov-2019 23:12:40 GMT");
+        List<HttpCookie> cookies = HttpCookie.parse("set-cookie: CUSTOMER=WILE_E_COYOTE; expires=Sat, 09-Nov-2019 23:12:40 GMT");
         if (cookies == null || cookies.isEmpty()) {
             throw new RuntimeException("No cookie found");
         }
--- a/test/java/net/CookieHandler/CookieManagerTest.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/net/CookieHandler/CookieManagerTest.java	Wed Dec 26 19:03:36 2012 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2012, 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
@@ -126,7 +126,7 @@
         testPolicies[count] = CookiePolicy.ACCEPT_ORIGINAL_SERVER;
         testCases[count++] = new CookieTestCase[]{
                 new CookieTestCase("Set-Cookie",
-                "CUSTOMER=WILE:BOB; path=/; expires=Wednesday, 09-Nov-2030 23:12:40 GMT;" + "domain=." + localHostAddr,
+                "CUSTOMER=WILE:BOB; path=/; expires=Sat, 09-Nov-2030 23:12:40 GMT;" + "domain=." + localHostAddr,
                 "CUSTOMER=WILE:BOB",
                 "/"
                 ),
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/net/HttpCookie/ExpiredCookieTest.java	Wed Dec 26 19:03:36 2012 -0800
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2012, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8000525
+ */
+
+import java.net.*;
+import java.util.*;
+import java.io.*;
+import java.text.*;
+
+public class ExpiredCookieTest {
+    // lifted from HttpCookie.java
+    private final static String[] COOKIE_DATE_FORMATS = {
+        "EEE',' dd-MMM-yy HH:mm:ss 'GMT'",
+        "EEE',' dd MMM yy HH:mm:ss 'GMT'",
+        "EEE MMM dd yy HH:mm:ss 'GMT'Z",
+        "EEE',' dd-MMM-yyyy HH:mm:ss 'GMT'",
+        "EEE',' dd MMM yyyy HH:mm:ss 'GMT'",
+        "EEE MMM dd yyyy HH:mm:ss 'GMT'Z"
+    };
+    static final TimeZone GMT = TimeZone.getTimeZone("GMT");
+
+    public static void main(String[] args) throws Exception {
+        Calendar cal = Calendar.getInstance(GMT);
+
+        for (int i = 0; i < COOKIE_DATE_FORMATS.length; i++) {
+            SimpleDateFormat df = new SimpleDateFormat(COOKIE_DATE_FORMATS[i],
+                                                     Locale.US);
+            cal.set(1970, 0, 1, 0, 0, 0);
+            df.setTimeZone(GMT);
+            df.setLenient(false);
+            df.set2DigitYearStart(cal.getTime());
+            CookieManager cm = new CookieManager(
+                null, CookiePolicy.ACCEPT_ALL);
+            CookieHandler.setDefault(cm);
+            Map<String,List<String>> header = new HashMap<>();
+            List<String> values = new ArrayList<>();
+
+            cal.set(1970, 6, 9, 10, 10, 1);
+            StringBuilder datestring =
+                new StringBuilder(df.format(cal.getTime()));
+            values.add(
+                "TEST1=TEST1; Path=/; Expires=" + datestring.toString());
+
+            cal.set(1969, 6, 9, 10, 10, 2);
+            datestring = new StringBuilder(df.format(cal.getTime()));
+            values.add(
+                "TEST2=TEST2; Path=/; Expires=" + datestring.toString());
+
+            cal.set(2070, 6, 9, 10, 10, 3);
+            datestring = new StringBuilder(df.format(cal.getTime()));
+            values.add(
+                "TEST3=TEST3; Path=/; Expires=" + datestring.toString());
+
+            cal.set(2069, 6, 9, 10, 10, 4);
+            datestring = new StringBuilder(df.format(cal.getTime()));
+            values.add(
+                "TEST4=TEST4; Path=/; Expires=" + datestring.toString());
+
+            header.put("Set-Cookie", values);
+            cm.put(new URI("http://127.0.0.1/"), header);
+
+            CookieStore cookieJar =  cm.getCookieStore();
+            List <HttpCookie> cookies = cookieJar.getCookies();
+            if (COOKIE_DATE_FORMATS[i].contains("yyyy")) {
+                if (cookies.size() != 2)
+                    throw new RuntimeException(
+                        "Incorrectly parsing a bad date");
+            } else if (cookies.size() != 1) {
+                throw new RuntimeException(
+                    "Incorrectly parsing a bad date");
+            }
+        }
+    }
+}
--- a/test/java/rmi/MarshalledObject/compare/Compare.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/MarshalledObject/compare/Compare.java	Wed Dec 26 19:03:36 2012 -0800
@@ -29,7 +29,6 @@
  *          not involved in location should be compared.
  * @author Ken Arnold
  *
- * @build Compare
  * @run main Compare 11 annotatedRef
  */
 
--- a/test/java/rmi/MarshalledObject/compare/HashCode.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/MarshalledObject/compare/HashCode.java	Wed Dec 26 19:03:36 2012 -0800
@@ -27,7 +27,6 @@
  * @summary MarshalledObject with null throws NullPointerException
  * @author Ken Arnold
  *
- * @build HashCode
  * @run main HashCode 11 annotatedRef
  */
 
--- a/test/java/rmi/MarshalledObject/compare/NullReference.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/MarshalledObject/compare/NullReference.java	Wed Dec 26 19:03:36 2012 -0800
@@ -27,7 +27,6 @@
  * @summary MarshalledObject with null throws NullPointerException
  * @author Ken Arnold
  *
- * @build NullReference
  * @run main NullReference
  */
 
--- a/test/java/rmi/Naming/DefaultRegistryPort.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/Naming/DefaultRegistryPort.java	Wed Dec 26 19:03:36 2012 -0800
@@ -28,7 +28,6 @@
  * @author Dana Burns
  * @library ../testlibrary
  * @build TestLibrary
- * @build DefaultRegistryPort
  * @run main DefaultRegistryPort
  */
 
--- a/test/java/rmi/Naming/LookupIPv6.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/Naming/LookupIPv6.java	Wed Dec 26 19:03:36 2012 -0800
@@ -22,12 +22,11 @@
  */
 
 /* @test
+ * @summary Ensure that java.rmi.Naming.lookup can handle URLs containing
+ *          IPv6 addresses.
  * @bug 4402708
  *
  * @run main/othervm -Djava.net.preferIPv6Addresses=true LookupIPv6
- *
- * @summary Ensure that java.rmi.Naming.lookup can handle URLs containing
- *          IPv6 addresses.
  */
 
 import java.net.InetAddress;
--- a/test/java/rmi/Naming/RmiIsNoScheme.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/Naming/RmiIsNoScheme.java	Wed Dec 26 19:03:36 2012 -0800
@@ -30,7 +30,6 @@
  *
  * @library ../testlibrary
  * @build TestLibrary
- * @build RmiIsNoScheme
  * @run main/othervm RmiIsNoScheme
  */
 
--- a/test/java/rmi/Naming/UnderscoreHost.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/Naming/UnderscoreHost.java	Wed Dec 26 19:03:36 2012 -0800
@@ -29,8 +29,7 @@
   * @author Vinod Johnson
   *
   * @library ../testlibrary
-  * @build TestLibrary
-  * @build UnderscoreHost UnderscoreHost_Stub
+  * @build TestLibrary UnderscoreHost_Stub
   * @run main/othervm UnderscoreHost
  */
 
--- a/test/java/rmi/Naming/legalRegistryNames/LegalRegistryNames.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/Naming/legalRegistryNames/LegalRegistryNames.java	Wed Dec 26 19:03:36 2012 -0800
@@ -21,14 +21,13 @@
  * questions.
  */
 
-/**
+/*
  * @test
  * @bug 4254808
  * @summary Naming assumes '/' is present in relative URL; change in URL causes regression
  * @author Dana Burns
  * @library ../../testlibrary
- * @build TestLibrary
- * @build Legal LegalRegistryNames LegalRegistryNames_Stub
+ * @build TestLibrary Legal LegalRegistryNames_Stub
  * @run main LegalRegistryNames
  */
 
--- a/test/java/rmi/RMISecurityManager/checkPackageAccess/CheckPackageAccess.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/RMISecurityManager/checkPackageAccess/CheckPackageAccess.java	Wed Dec 26 19:03:36 2012 -0800
@@ -28,10 +28,9 @@
  * as when the default java.lang.SecurityManager is set, which with the
  * default "java.security" file in the JDK means that access to packages in
  * the sun.* package hierarchy is denied (without explicit runtime permission
- * "accessClassInPackge.*").
+ * "accessClassInPackage.*").
  * @author Peter Jones
  *
- * @build CheckPackageAccess
  * @run main/othervm CheckPackageAccess
  */
 
--- a/test/java/rmi/activation/Activatable/checkActivateRef/CheckActivateRef.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/activation/Activatable/checkActivateRef/CheckActivateRef.java	Wed Dec 26 19:03:36 2012 -0800
@@ -36,8 +36,7 @@
  *          functionality is in place
  *
  * @library ../../../testlibrary
- * @build TestLibrary RMID
- * @build ActivateMe CheckActivateRef_Stub CheckActivateRef
+ * @build TestLibrary RMID ActivateMe CheckActivateRef_Stub
  * @run main/othervm/policy=security.policy/timeout=240 -Djava.rmi.server.ignoreStubClasses=true CheckActivateRef
  * @run main/othervm/policy=security.policy/timeout=240 -Djava.rmi.server.ignoreStubClasses=false CheckActivateRef
  */
--- a/test/java/rmi/activation/Activatable/checkAnnotations/CheckAnnotations.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/activation/Activatable/checkAnnotations/CheckAnnotations.java	Wed Dec 26 19:03:36 2012 -0800
@@ -28,10 +28,7 @@
  * @author Laird Dornin; code borrowed from Ann Wollrath
  *
  * @library ../../../testlibrary
- * @build TestLibrary RMID JavaVM StreamPipe
- * @build MyRMI
- * @build CheckAnnotations
- * @build CheckAnnotations_Stub
+ * @build TestLibrary RMID MyRMI CheckAnnotations_Stub
  * @run main/othervm/policy=security.policy/timeout=480 CheckAnnotations
  */
 
--- a/test/java/rmi/activation/Activatable/checkImplClassLoader/CheckImplClassLoader.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/activation/Activatable/checkImplClassLoader/CheckImplClassLoader.java	Wed Dec 26 19:03:36 2012 -0800
@@ -24,14 +24,11 @@
 /* @test
  * @bug 4289544
  * @summary ActivationGroupImpl.newInstance does not set context classloader for impl
- *
  * @author Laird Dornin; code borrowed from Ann Wollrath
  *
  * @library ../../../testlibrary
- * @build TestLibrary RMID JavaVM StreamPipe
- * @build MyRMI
- * @build CheckImplClassLoader ActivatableImpl
- * @build ActivatableImpl ActivatableImpl_Stub
+ * @build TestLibrary RMID
+ *     MyRMI ActivatableImpl ActivatableImpl ActivatableImpl_Stub
  * @run main/othervm/policy=security.policy/timeout=150 CheckImplClassLoader
  */
 
--- a/test/java/rmi/activation/Activatable/checkRegisterInLog/CheckRegisterInLog.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/activation/Activatable/checkRegisterInLog/CheckRegisterInLog.java	Wed Dec 26 19:03:36 2012 -0800
@@ -27,8 +27,8 @@
  * @author Ann Wollrath
  *
  * @library ../../../testlibrary
- * @build RMID ActivationLibrary TestLibrary
- * @build ActivateMe CheckRegisterInLog CheckRegisterInLog_Stub
+ * @build TestLibrary RMID ActivationLibrary
+ *     ActivateMe CheckRegisterInLog_Stub
  * @run main/othervm/policy=security.policy/timeout=240 CheckRegisterInLog
  */
 
--- a/test/java/rmi/activation/Activatable/createPrivateActivable/CreatePrivateActivatable.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/activation/Activatable/createPrivateActivable/CreatePrivateActivatable.java	Wed Dec 26 19:03:36 2012 -0800
@@ -22,14 +22,12 @@
  */
 
 /* @test
- * @author Laird Dornin
  * @bug 4164971
  * @summary allow non-public activatable class and/or constructor
+ * @author Laird Dornin
  *
  * @library ../../../testlibrary
- * @build TestLibrary RMID
- * @build ActivateMe
- * @build CreatePrivateActivatable
+ * @build TestLibrary RMID ActivateMe
  * @run main/othervm/policy=security.policy/timeout=240 CreatePrivateActivatable
  */
 
--- a/test/java/rmi/activation/Activatable/downloadParameterClass/DownloadParameterClass.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/activation/Activatable/downloadParameterClass/DownloadParameterClass.java	Wed Dec 26 19:03:36 2012 -0800
@@ -32,11 +32,7 @@
  *
  * @library ../../../testlibrary
  * @build TestLibrary RMID ActivationLibrary
- * @build DownloadParameterClass
- * @build Foo
- * @build FooReceiverImpl
- * @build FooReceiverImpl_Stub
- * @build Bar
+ *     Foo FooReceiverImpl FooReceiverImpl_Stub Bar
  * @run main/othervm/policy=security.policy/timeout=240 DownloadParameterClass
  */
 
--- a/test/java/rmi/activation/Activatable/elucidateNoSuchMethod/ElucidateNoSuchMethod.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/activation/Activatable/elucidateNoSuchMethod/ElucidateNoSuchMethod.java	Wed Dec 26 19:03:36 2012 -0800
@@ -23,14 +23,11 @@
 
 /* @test
  * @bug 4128620
- *
  * @summary synopsis: NoSuchMethodError should be elucidated
- *
  * @author Laird Dornin
  *
  * @library ../../../testlibrary
- * @build TestLibrary RMID
- * @build ActivateMe ElucidateNoSuchMethod ElucidateNoSuchMethod_Stub
+ * @build TestLibrary RMID ActivateMe ElucidateNoSuchMethod_Stub
  * @run main/othervm/policy=security.policy/timeout=240 ElucidateNoSuchMethod
  */
 
--- a/test/java/rmi/activation/Activatable/extLoadedImpl/ext.sh	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/activation/Activatable/extLoadedImpl/ext.sh	Wed Dec 26 19:03:36 2012 -0800
@@ -28,7 +28,7 @@
 # set to the impl's class loader) when the impl is activated.
 # @library ../../../testlibrary
 # @build TestLibrary RMID ActivationLibrary
-# @build ExtLoadedImplTest ExtLoadedImpl ExtLoadedImpl_Stub CheckLoader
+#     ExtLoadedImplTest ExtLoadedImpl ExtLoadedImpl_Stub CheckLoader
 # @run shell ext.sh
 
 OS=`uname -s`
--- a/test/java/rmi/activation/Activatable/forceLogSnapshot/ForceLogSnapshot.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/activation/Activatable/forceLogSnapshot/ForceLogSnapshot.java	Wed Dec 26 19:03:36 2012 -0800
@@ -27,9 +27,8 @@
  * @author Laird Dornin
  *
  * @library ../../../testlibrary
- * @build ActivateMe
- * @build ForceLogSnapshot
- * @build ForceLogSnapshot_Stub
+ * @build TestLibrary RMID ActivationLibrary
+ *     ActivateMe ForceLogSnapshot_Stub
  * @run main/othervm/policy=security.policy/timeout=640 ForceLogSnapshot
  */
 
--- a/test/java/rmi/activation/Activatable/inactiveGroup/InactiveGroup.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/activation/Activatable/inactiveGroup/InactiveGroup.java	Wed Dec 26 19:03:36 2012 -0800
@@ -29,10 +29,7 @@
  * @author Ann Wollrath
  *
  * @library ../../../testlibrary
- * @build TestLibrary RMID ActivationLibrary
- * @build ActivateMe
- * @build InactiveGroup
- * @build InactiveGroup_Stub
+ * @build TestLibrary RMID ActivationLibrary ActivateMe InactiveGroup_Stub
  * @run main/othervm/policy=security.policy/timeout=240 InactiveGroup
  */
 
--- a/test/java/rmi/activation/Activatable/lookupActivationSystem/LookupActivationSystem.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/activation/Activatable/lookupActivationSystem/LookupActivationSystem.java	Wed Dec 26 19:03:36 2012 -0800
@@ -24,14 +24,12 @@
 /*
  * @test
  * @bug 6245733
- *
  * @summary synopsis: rmid's registry's list operation doesn't include
  * activation system
  * @author Ann Wollrath
  *
  * @library ../../../testlibrary
  * @build TestLibrary RMID ActivationLibrary
- * @build LookupActivationSystem
  * @run main/othervm/timeout=240 LookupActivationSystem
  */
 
--- a/test/java/rmi/activation/Activatable/nestedActivate/NestedActivate.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/activation/Activatable/nestedActivate/NestedActivate.java	Wed Dec 26 19:03:36 2012 -0800
@@ -23,15 +23,11 @@
 
 /* @test
  * @bug 4138056
- *
  * @summary synopsis: Activating objects from an Activatable constructor causes deadlock
  * @author Ann Wollrath
  *
  * @library ../../../testlibrary
- * @build TestLibrary RMID ActivationLibrary
- * @build ActivateMe
- * @build NestedActivate
- * @build NestedActivate_Stub
+ * @build TestLibrary RMID ActivationLibrary ActivateMe NestedActivate_Stub
  * @run main/othervm/policy=security.policy/timeout=240 NestedActivate
  */
 
--- a/test/java/rmi/activation/Activatable/nonExistentActivatable/NonExistentActivatable.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/activation/Activatable/nonExistentActivatable/NonExistentActivatable.java	Wed Dec 26 19:03:36 2012 -0800
@@ -23,16 +23,13 @@
 
 /* @test
  * @bug 4115296
- *
  * @summary synopsis: NoSuchObjectException not thrown for non-existent
  * activatable objects
  * @author Ann Wollrath
  *
  * @library ../../../testlibrary
  * @build TestLibrary RMID ActivationLibrary
- * @build ActivateMe
- * @build NonExistentActivatable
- * @build NonExistentActivatable_Stub
+ *     ActivateMe NonExistentActivatable_Stub
  * @run main/othervm/policy=security.policy/timeout=240 NonExistentActivatable
  */
 
--- a/test/java/rmi/activation/Activatable/restartCrashedService/RestartCrashedService.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/activation/Activatable/restartCrashedService/RestartCrashedService.java	Wed Dec 26 19:03:36 2012 -0800
@@ -28,10 +28,7 @@
  * @author Ann Wollrath
  *
  * @library ../../../testlibrary
- * @build TestLibrary RMID JavaVM StreamPipe
- * @build ActivateMe
- * @build RestartCrashedService
- * @build RestartCrashedService_Stub
+ * @build TestLibrary RMID ActivateMe RestartCrashedService_Stub
  * @run main/othervm/policy=security.policy/timeout=240 RestartCrashedService
  */
 
--- a/test/java/rmi/activation/Activatable/restartLatecomer/RestartLatecomer.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/activation/Activatable/restartLatecomer/RestartLatecomer.java	Wed Dec 26 19:03:36 2012 -0800
@@ -28,8 +28,7 @@
  *
  * @library ../../../testlibrary
  * @build TestLibrary RMID ActivationLibrary
- * @build RestartLatecomer
- * @build RestartLatecomer_Stub
+ *     RestartLatecomer RestartLatecomer_Stub
  * @run main/othervm/policy=security.policy/timeout=240 RestartLatecomer
  */
 
--- a/test/java/rmi/activation/Activatable/restartService/RestartService.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/activation/Activatable/restartService/RestartService.java	Wed Dec 26 19:03:36 2012 -0800
@@ -23,15 +23,11 @@
 
 /* @test
  * @bug 4095165 4321151
-
  * @summary synopsis: activator should restart daemon services
  * @author Ann Wollrath
  *
  * @library ../../../testlibrary
- * @build TestLibrary RMID ActivationLibrary
- * @build ActivateMe
- * @build RestartService
- * @build RestartService_Stub
+ * @build TestLibrary RMID ActivationLibrary ActivateMe RestartService_Stub
  * @run main/othervm/policy=security.policy/timeout=240 RestartService
  */
 
--- a/test/java/rmi/activation/Activatable/shutdownGracefully/ShutdownGracefully.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/activation/Activatable/shutdownGracefully/ShutdownGracefully.java	Wed Dec 26 19:03:36 2012 -0800
@@ -28,11 +28,8 @@
  * @author Laird Dornin; code borrowed from Ann Wollrath
  *
  * @library ../../../testlibrary
- * @build TestLibrary RMID JavaVM StreamPipe
- * @build TestSecurityManager
- * @build RegisteringActivatable
- * @build ShutdownGracefully
- * @build ShutdownGracefully_Stub
+ * @build TestLibrary RMID
+ *     TestSecurityManager RegisteringActivatable ShutdownGracefully_Stub
  * @run main/othervm/policy=security.policy/timeout=700 ShutdownGracefully
  */
 
--- a/test/java/rmi/activation/Activatable/unregisterInactive/UnregisterInactive.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/activation/Activatable/unregisterInactive/UnregisterInactive.java	Wed Dec 26 19:03:36 2012 -0800
@@ -23,16 +23,12 @@
 
 /* @test
  * @bug 4115331
-
  * @summary synopsis: activatable object fails to go inactive after
  * unregister/inactive sequence.
  * @author Ann Wollrath
  *
  * @library ../../../testlibrary
- * @build TestLibrary RMID ActivationLibrary
- * @build ActivateMe
- * @build UnregisterInactive
- * @build UnregisterInactive_Stub
+ * @build TestLibrary RMID ActivationLibrary ActivateMe UnregisterInactive_Stub
  * @run main/othervm/policy=security.policy/timeout=240 UnregisterInactive
  */
 
--- a/test/java/rmi/activation/ActivateFailedException/activateFails/ActivateFails.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/activation/ActivateFailedException/activateFails/ActivateFails.java	Wed Dec 26 19:03:36 2012 -0800
@@ -31,11 +31,8 @@
  * @author Ann Wollrath
  *
  * @library ../../../testlibrary
- * @build TestLibrary RMID JavaVM StreamPipe
- * @build ActivateMe
- * @build ActivateFails
- * @build ActivateFails_Stub
- * @build ShutdownThread
+ * @build TestLibrary RMID ActivationLibrary
+ *     ActivateMe ActivateFails_Stub ShutdownThread
  * @run main/othervm/policy=security.policy/timeout=240 ActivateFails
  */
 
--- a/test/java/rmi/activation/ActivationGroup/downloadActivationGroup/DownloadActivationGroup.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/activation/ActivationGroup/downloadActivationGroup/DownloadActivationGroup.java	Wed Dec 26 19:03:36 2012 -0800
@@ -33,9 +33,7 @@
  *
  * @library ../../../testlibrary
  * @build TestLibrary RMID ActivationLibrary
- * @build MyActivationGroupImpl
- * @build DownloadActivationGroup
- * @build DownloadActivationGroup_Stub
+ *     DownloadActivationGroup MyActivationGroupImpl DownloadActivationGroup_Stub
  * @run main/othervm/policy=security.policy/timeout=240 DownloadActivationGroup
  */
 
--- a/test/java/rmi/activation/ActivationGroupDesc/checkDefaultGroupName/CheckDefaultGroupName.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/activation/ActivationGroupDesc/checkDefaultGroupName/CheckDefaultGroupName.java	Wed Dec 26 19:03:36 2012 -0800
@@ -21,16 +21,15 @@
  * questions.
  */
 
-/**
+/*
  * @test
  * @bug 4252236
  * @summary ActivationGroupDesc should not do early binding of default classname
+ * @author Laird Dornin
+ *
  * @library ../../../testlibrary
- *
- * @build CheckDefaultGroupName
- *
+ * @build TestLibrary
  * @run main CheckDefaultGroupName
- * @author Laird Dornin
  */
 
 import java.rmi.activation.*;
--- a/test/java/rmi/activation/ActivationSystem/activeGroup/IdempotentActiveGroup.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/activation/ActivationSystem/activeGroup/IdempotentActiveGroup.java	Wed Dec 26 19:03:36 2012 -0800
@@ -23,15 +23,13 @@
 
 /* @test
  * @bug 4720528
- *
  * @summary synopsis: (spec) ActivationSystem.activeGroup spec should be
  * relaxed (duplicate call to activeGroup with same instantiator and
  * incarnation should not throw ActivationException; it should succeed)
  * @author Ann Wollrath
  *
  * @library ../../../testlibrary
- * @build TestLibrary RMID
- * @build IdempotentActiveGroup
+ * @build TestLibrary RMID ActivationLibrary
  * @run main/othervm/policy=security.policy/timeout=480 IdempotentActiveGroup
  */
 
--- a/test/java/rmi/activation/ActivationSystem/modifyDescriptor/ModifyDescriptor.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/activation/ActivationSystem/modifyDescriptor/ModifyDescriptor.java	Wed Dec 26 19:03:36 2012 -0800
@@ -29,9 +29,8 @@
  * @author Ann Wollrath
  *
  * @library ../../../testlibrary
- * @build ActivateMe
- * @build ModifyDescriptor
- * @build ModifyDescriptor_Stub
+ * @build TestLibrary RMID ActivationLibrary
+ *     ActivateMe ModifyDescriptor_Stub
  * @run main/othervm/policy=security.policy/timeout=240 ModifyDescriptor
  */
 
--- a/test/java/rmi/activation/ActivationSystem/stubClassesPermitted/StubClassesPermitted.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/activation/ActivationSystem/stubClassesPermitted/StubClassesPermitted.java	Wed Dec 26 19:03:36 2012 -0800
@@ -24,14 +24,11 @@
 /* @test
  * @bug 4179055
  * @summary Some java apps need to have access to read "accessClassInPackage.sun.rmi.server"
- *
  * @author Laird Dornin
  *
  * @library ../../../testlibrary
- * @build TestLibrary RMID JavaVM StreamPipe ActivationLibrary
- * @build CanCreateStubs
- * @build StubClassesPermitted
- * @build StubClassesPermitted_Stub
+ * @build TestLibrary RMID ActivationLibrary
+ *     CanCreateStubs StubClassesPermitted_Stub
  * @run main/othervm/policy=security.policy/secure=java.lang.SecurityManager/timeout=240 StubClassesPermitted
  */
 
--- a/test/java/rmi/activation/ActivationSystem/unregisterGroup/UnregisterGroup.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/activation/ActivationSystem/unregisterGroup/UnregisterGroup.java	Wed Dec 26 19:03:36 2012 -0800
@@ -24,16 +24,12 @@
 /* @test
  * @bug 4134233
  * @bug 4213186
- *
  * @summary synopsis: ActivationSystem.unregisterGroup should unregister objects in group
  * @author Ann Wollrath
  *
  * @library ../../../testlibrary
- * @build TestLibrary RMID JavaVM StreamPipe
- * @build ActivateMe CallbackInterface
- * @build UnregisterGroup
- * @build UnregisterGroup_Stub
- * @build Callback_Stub
+ * @build TestLibrary RMID ActivationLibrary
+ *     ActivateMe CallbackInterface UnregisterGroup_Stub Callback_Stub
  * @run main/othervm/policy=security.policy/timeout=480 UnregisterGroup
  */
 
--- a/test/java/rmi/activation/CommandEnvironment/NullOptions.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/activation/CommandEnvironment/NullOptions.java	Wed Dec 26 19:03:36 2012 -0800
@@ -27,7 +27,6 @@
  * ActivationGroupDesc.CommandEnvironment
  * @author  Ann Wollrath
  *
- * @build NullOptions
  * @run main/othervm/timeout=240 NullOptions
  */
 
--- a/test/java/rmi/activation/CommandEnvironment/SetChildEnv.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/activation/CommandEnvironment/SetChildEnv.java	Wed Dec 26 19:03:36 2012 -0800
@@ -35,9 +35,10 @@
  * @author Adrian Colley
  *
  * @library ../../testlibrary
- * @build TestLibrary RMID JavaVM StreamPipe
- * @build Eliza Retireable Doctor Doctor_Stub SetChildEnv
- * @run main/othervm/timeout=240/policy=security.policy -Djava.compiler=NONE  SetChildEnv
+ * @build TestLibrary RMID ActivationLibrary
+ *     Eliza Retireable Doctor Doctor_Stub
+ * @run main/othervm/timeout=240/policy=security.policy
+ *     -Djava.compiler=NONE SetChildEnv
  */
 import java.rmi.*;
 import java.util.Properties;
--- a/test/java/rmi/activation/checkusage/CheckUsage.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/activation/checkusage/CheckUsage.java	Wed Dec 26 19:03:36 2012 -0800
@@ -25,7 +25,7 @@
  * @bug 4259564
  *
  * @library ../../testlibrary
- * @build TestLibrary JavaVM CheckUsage
+ * @build TestLibrary JavaVM
  * @run main/othervm CheckUsage
  */
 
--- a/test/java/rmi/activation/log/LogTest.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/activation/log/LogTest.java	Wed Dec 26 19:03:36 2012 -0800
@@ -29,7 +29,6 @@
  * boundaries
  * @author Ann Wollrath
  *
- * @build LogTest
  * @run main/othervm/timeout=240 LogTest
  */
 
--- a/test/java/rmi/activation/rmidViaInheritedChannel/InheritedChannelNotServerSocket.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/activation/rmidViaInheritedChannel/InheritedChannelNotServerSocket.java	Wed Dec 26 19:03:36 2012 -0800
@@ -29,8 +29,7 @@
  * @author Peter Jones
  *
  * @library ../../testlibrary
- * @build RMID ActivationLibrary
- * @build InheritedChannelNotServerSocket
+ * @build TestLibrary RMID ActivationLibrary
  * @run main/othervm/timeout=240 InheritedChannelNotServerSocket
  */
 
--- a/test/java/rmi/activation/rmidViaInheritedChannel/RmidViaInheritedChannel.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/activation/rmidViaInheritedChannel/RmidViaInheritedChannel.java	Wed Dec 26 19:03:36 2012 -0800
@@ -27,9 +27,7 @@
  * @author Ann Wollrath
  *
  * @library ../../testlibrary
- * @build RMID ActivationLibrary
- * @build RmidViaInheritedChannel
- * @build TestLibrary
+ * @build TestLibrary RMID ActivationLibrary
  * @run main/othervm/timeout=240 RmidViaInheritedChannel
  */
 
--- a/test/java/rmi/dgc/VMID/CheckVMID.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/dgc/VMID/CheckVMID.java	Wed Dec 26 19:03:36 2012 -0800
@@ -30,7 +30,7 @@
  * @author Ann Wollrath
  *
  * @library ../../testlibrary
- * @build CheckVMID
+ * @build TestLibrary
  * @run main/othervm/policy=security.policy CheckVMID
  */
 
--- a/test/java/rmi/dgc/dgcAckFailure/DGCAckFailure.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/dgc/dgcAckFailure/DGCAckFailure.java	Wed Dec 26 19:03:36 2012 -0800
@@ -30,8 +30,7 @@
  * rather than pinning it indefinitely.
  * @author Peter Jones
  *
- * @build DGCAckFailure
- * @build DGCAckFailure_Stub
+ * @build DGCAckFailure DGCAckFailure_Stub
  * @run main/othervm DGCAckFailure
  */
 
--- a/test/java/rmi/dgc/dgcImplInsulation/DGCImplInsulation.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/dgc/dgcImplInsulation/DGCImplInsulation.java	Wed Dec 26 19:03:36 2012 -0800
@@ -31,9 +31,7 @@
  * @author Peter Jones
  *
  * @library ../../testlibrary
- * @build TestLibrary
- * @build DGCImplInsulation
- * @build DGCImplInsulation_Stub
+ * @build TestLibrary DGCImplInsulation_Stub
  * @run main/othervm/policy=security.policy DGCImplInsulation
  */
 
--- a/test/java/rmi/dgc/retryDirtyCalls/RetryDirtyCalls.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/dgc/retryDirtyCalls/RetryDirtyCalls.java	Wed Dec 26 19:03:36 2012 -0800
@@ -29,8 +29,7 @@
  * renewing that lease at all after the first failure.
  * @author Peter Jones (inspired by Adrian Colley's test case in 4268258)
  *
- * @build RetryDirtyCalls
- * @build RetryDirtyCalls_Stub
+ * @build RetryDirtyCalls RetryDirtyCalls_Stub
  * @run main/othervm RetryDirtyCalls
  */
 
--- a/test/java/rmi/invalidName/InvalidName.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/invalidName/InvalidName.java	Wed Dec 26 19:03:36 2012 -0800
@@ -32,7 +32,7 @@
  * @author Laird Dornin
  *
  * @library ../testlibrary
- * @build InvalidName
+ * @build TestLibrary
  * @run main/othervm InvalidName
  */
 
--- a/test/java/rmi/registry/altSecurityManager/AltSecurityManager.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/registry/altSecurityManager/AltSecurityManager.java	Wed Dec 26 19:03:36 2012 -0800
@@ -27,8 +27,7 @@
  * @author Laird Dornin
  *
  * @library ../../testlibrary
- * @build StreamPipe TestParams TestLibrary JavaVM RMID
- * @build AltSecurityManager TestSecurityManager
+ * @build TestLibrary JavaVM RMID TestSecurityManager
  * @run main/othervm AltSecurityManager
  */
 
--- a/test/java/rmi/registry/checkusage/CheckUsage.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/registry/checkusage/CheckUsage.java	Wed Dec 26 19:03:36 2012 -0800
@@ -27,7 +27,7 @@
  * @author Laird Dornin
  *
  * @library ../../testlibrary
- * @build TestLibrary JavaVM CheckUsage
+ * @build TestLibrary JavaVM
  * @run main/othervm CheckUsage
  */
 
--- a/test/java/rmi/registry/classPathCodebase/ClassPathCodebase.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/registry/classPathCodebase/ClassPathCodebase.java	Wed Dec 26 19:03:36 2012 -0800
@@ -30,7 +30,7 @@
  * @author Peter Jones
  *
  * @library ../../testlibrary
- * @build ClassPathCodebase Dummy TestLibrary
+ * @build TestLibrary Dummy
  * @run main/othervm/policy=security.policy ClassPathCodebase
  */
 
--- a/test/java/rmi/registry/interfaceHash/InterfaceHash.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/registry/interfaceHash/InterfaceHash.java	Wed Dec 26 19:03:36 2012 -0800
@@ -36,9 +36,7 @@
  *
  * @author Peter Jones
  * @library ../../testlibrary
- * @build InterfaceHash
- * @build ReferenceRegistryStub
- * @build TestLibrary
+ * @build TestLibrary ReferenceRegistryStub
  * @run main/othervm InterfaceHash
  */
 
--- a/test/java/rmi/registry/multipleRegistries/MultipleRegistries.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/registry/multipleRegistries/MultipleRegistries.java	Wed Dec 26 19:03:36 2012 -0800
@@ -28,7 +28,6 @@
  *
  * @library ../../testlibrary
  * @build TestLibrary
- * @build MultipleRegistries
  * @run main/othervm/timeout=240 MultipleRegistries
  */
 
--- a/test/java/rmi/registry/readTest/readTest.sh	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/registry/readTest/readTest.sh	Wed Dec 26 19:03:36 2012 -0800
@@ -25,7 +25,7 @@
 # @bug 7102369 7094468 7100592
 # @library ../../testlibrary
 # @build TestLibrary
-# @summary remove java.rmi.server.codebase property parsing from registyimpl
+# @summary remove java.rmi.server.codebase property parsing from RegistryImpl
 # @run shell readTest.sh
 
 OS=`uname -s`
--- a/test/java/rmi/registry/reexport/Reexport.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/registry/reexport/Reexport.java	Wed Dec 26 19:03:36 2012 -0800
@@ -25,9 +25,7 @@
  * @bug 4120329
  * @summary RMI registry creation is impossible if first attempt fails.
  * @library ../../testlibrary
- * @build StreamPipe TestParams TestLibrary JavaVM
- * @build RegistryRunner RegistryRunner_Stub
- * @build Reexport
+ * @build TestLibrary JavaVM RegistryRunner RegistryRunner_Stub
  * @run main/othervm Reexport
  */
 
--- a/test/java/rmi/reliability/benchmark/runRmiBench.sh	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/reliability/benchmark/runRmiBench.sh	Wed Dec 26 19:03:36 2012 -0800
@@ -27,20 +27,20 @@
 #          used to run the test under JTREG.
 #
 # @build bench.BenchInfo bench.HtmlReporter bench.Util bench.Benchmark 
-# @build bench.Reporter bench.XmlReporter bench.ConfigFormatException 
-# @build bench.Harness bench.TextReporter bench.rmi.BenchServer 
-# @build bench.rmi.DoubleArrayCalls bench.rmi.LongCalls bench.rmi.ShortCalls
-# @build bench.rmi.BenchServerImpl bench.rmi.DoubleCalls 
-# @build bench.rmi.Main bench.rmi.SmallObjTreeCalls
-# @build bench.rmi.BooleanArrayCalls bench.rmi.ExceptionCalls 
-# @build bench.rmi.NullCalls bench.rmi.BooleanCalls bench.rmi.ExportObjs 
-# @build bench.rmi.ObjArrayCalls bench.rmi.ByteArrayCalls 
-# @build bench.rmi.FloatArrayCalls bench.rmi.ObjTreeCalls
-# @build bench.rmi.ByteCalls bench.rmi.FloatCalls bench.rmi.ProxyArrayCalls
-# @build bench.rmi.CharArrayCalls bench.rmi.IntArrayCalls 
-# @build bench.rmi.RemoteObjArrayCalls bench.rmi.CharCalls bench.rmi.IntCalls
-# @build bench.rmi.ClassLoading bench.rmi.LongArrayCalls 
-# @build bench.rmi.ShortArrayCalls bench.rmi.altroot.Node
+#     bench.Reporter bench.XmlReporter bench.ConfigFormatException 
+#     bench.Harness bench.TextReporter bench.rmi.BenchServer 
+#     bench.rmi.DoubleArrayCalls bench.rmi.LongCalls bench.rmi.ShortCalls
+#     bench.rmi.BenchServerImpl bench.rmi.DoubleCalls 
+#     bench.rmi.Main bench.rmi.SmallObjTreeCalls
+#     bench.rmi.BooleanArrayCalls bench.rmi.ExceptionCalls 
+#     bench.rmi.NullCalls bench.rmi.BooleanCalls bench.rmi.ExportObjs 
+#     bench.rmi.ObjArrayCalls bench.rmi.ByteArrayCalls 
+#     bench.rmi.FloatArrayCalls bench.rmi.ObjTreeCalls
+#     bench.rmi.ByteCalls bench.rmi.FloatCalls bench.rmi.ProxyArrayCalls
+#     bench.rmi.CharArrayCalls bench.rmi.IntArrayCalls 
+#     bench.rmi.RemoteObjArrayCalls bench.rmi.CharCalls bench.rmi.IntCalls
+#     bench.rmi.ClassLoading bench.rmi.LongArrayCalls 
+#     bench.rmi.ShortArrayCalls bench.rmi.altroot.Node
 #
 # @run shell/timeout=1800 runRmiBench.sh
 #
--- a/test/java/rmi/reliability/benchmark/runSerialBench.sh	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/reliability/benchmark/runSerialBench.sh	Wed Dec 26 19:03:36 2012 -0800
@@ -27,22 +27,22 @@
 #          used to run the test under JTREG.
 #
 # @build bench.BenchInfo bench.HtmlReporter bench.Util bench.Benchmark 
-# @build bench.Reporter bench.XmlReporter bench.ConfigFormatException 
-# @build bench.Harness bench.TextReporter
-# @build bench.serial.BooleanArrays bench.serial.Booleans
-# @build bench.serial.ByteArrays bench.serial.Bytes bench.serial.CharArrays
-# @build bench.serial.Chars bench.serial.ClassDesc bench.serial.Cons
-# @build bench.serial.CustomDefaultObjTrees bench.serial.CustomObjTrees
-# @build bench.serial.DoubleArrays bench.serial.Doubles
-# @build bench.serial.ExternObjTrees bench.serial.FloatArrays
-# @build bench.serial.Floats bench.serial.GetPutFieldTrees
-# @build bench.serial.IntArrays bench.serial.Ints bench.serial.LongArrays
-# @build bench.serial.Longs bench.serial.Main bench.serial.ObjArrays
-# @build bench.serial.ObjTrees bench.serial.ProxyArrays
-# @build bench.serial.ProxyClassDesc bench.serial.RepeatObjs
-# @build bench.serial.ReplaceTrees bench.serial.ShortArrays
-# @build bench.serial.Shorts bench.serial.SmallObjTrees
-# @build bench.serial.StreamBuffer bench.serial.Strings
+#     bench.Reporter bench.XmlReporter bench.ConfigFormatException 
+#     bench.Harness bench.TextReporter
+#     bench.serial.BooleanArrays bench.serial.Booleans
+#     bench.serial.ByteArrays bench.serial.Bytes bench.serial.CharArrays
+#     bench.serial.Chars bench.serial.ClassDesc bench.serial.Cons
+#     bench.serial.CustomDefaultObjTrees bench.serial.CustomObjTrees
+#     bench.serial.DoubleArrays bench.serial.Doubles
+#     bench.serial.ExternObjTrees bench.serial.FloatArrays
+#     bench.serial.Floats bench.serial.GetPutFieldTrees
+#     bench.serial.IntArrays bench.serial.Ints bench.serial.LongArrays
+#     bench.serial.Longs bench.serial.Main bench.serial.ObjArrays
+#     bench.serial.ObjTrees bench.serial.ProxyArrays
+#     bench.serial.ProxyClassDesc bench.serial.RepeatObjs
+#     bench.serial.ReplaceTrees bench.serial.ShortArrays
+#     bench.serial.Shorts bench.serial.SmallObjTrees
+#     bench.serial.StreamBuffer bench.serial.Strings
 #
 # @run shell/timeout=1800 runSerialBench.sh
 #
--- a/test/java/rmi/reliability/juicer/AppleUserImpl.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/reliability/juicer/AppleUserImpl.java	Wed Dec 26 19:03:36 2012 -0800
@@ -55,11 +55,10 @@
  * has been reached.
  *
  * @library ../../testlibrary
- *
- * @build Apple AppleEvent AppleImpl AppleUserImpl
- * @build Orange OrangeEcho OrangeEchoImpl OrangeImpl
- * @build ApplicationServer
  * @build TestLibrary
+ *     Apple AppleEvent AppleImpl
+ *     Orange OrangeEcho OrangeEchoImpl OrangeImpl
+ *     ApplicationServer
  *
  * @run main/othervm/policy=security.policy AppleUserImpl -seconds 30
  *
--- a/test/java/rmi/server/ObjID/randomIDs/RandomIDs.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/server/ObjID/randomIDs/RandomIDs.java	Wed Dec 26 19:03:36 2012 -0800
@@ -30,7 +30,6 @@
  * ObjID() should still generate sequential object numbers.
  * @author Peter Jones
  *
- * @build RandomIDs
  * @run main/othervm RandomIDs random
  * @run main/othervm -Djava.rmi.server.randomIDs=true RandomIDs random
  * @run main/othervm -Djava.rmi.server.randomIDs=false RandomIDs sequential
--- a/test/java/rmi/server/RMIClassLoader/delegateBeforePermissionCheck/DelegateBeforePermissionCheck.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/server/RMIClassLoader/delegateBeforePermissionCheck/DelegateBeforePermissionCheck.java	Wed Dec 26 19:03:36 2012 -0800
@@ -33,9 +33,7 @@
  * @author Peter Jones
  *
  * @library ../../../testlibrary
- * @build TestLibrary
- * @build DelegateBeforePermissionCheck
- * @build Foo
+ * @build TestLibrary Foo
  * @run main/othervm DelegateBeforePermissionCheck
  */
 
--- a/test/java/rmi/server/RMIClassLoader/delegateToContextLoader/DelegateToContextLoader.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/server/RMIClassLoader/delegateToContextLoader/DelegateToContextLoader.java	Wed Dec 26 19:03:36 2012 -0800
@@ -29,7 +29,7 @@
  * @author Peter Jones
  *
  * @library ../../../testlibrary
- * @build DelegateToContextLoader Dummy
+ * @build TestLibrary Dummy
  * @run main/othervm/policy=security.policy/timeout=120 DelegateToContextLoader
  */
 
--- a/test/java/rmi/server/RMIClassLoader/downloadArrayClass/DownloadArrayClass.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/server/RMIClassLoader/downloadArrayClass/DownloadArrayClass.java	Wed Dec 26 19:03:36 2012 -0800
@@ -31,11 +31,7 @@
  * @author Peter Jones
  *
  * @library ../../../testlibrary
- * @build TestLibrary
- * @build Receiver
- * @build DownloadArrayClass
- * @build DownloadArrayClass_Stub
- * @build Foo
+ * @build TestLibrary Receiver DownloadArrayClass_Stub Foo
  * @run main/othervm/policy=security.policy DownloadArrayClass
  */
 
--- a/test/java/rmi/server/RMIClassLoader/getClassAnnotation/NullClass.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/server/RMIClassLoader/getClassAnnotation/NullClass.java	Wed Dec 26 19:03:36 2012 -0800
@@ -29,7 +29,6 @@
  *
  * @library ../../../testlibrary
  * @build TestLibrary
- * @build NullClass
  * @run main/othervm NullClass
  */
 
--- a/test/java/rmi/server/RMIClassLoader/getClassLoader/GetClassLoader.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/server/RMIClassLoader/getClassLoader/GetClassLoader.java	Wed Dec 26 19:03:36 2012 -0800
@@ -29,9 +29,7 @@
  * @author Ann Wollrath
  *
  * @library ../../../testlibrary
- * @build TestLibrary
- * @build GetClassLoader
- * @build Foo
+ * @build TestLibrary Foo
  * @run main/othervm/policy=security.policy GetClassLoader
  */
 
--- a/test/java/rmi/server/RMIClassLoader/loadProxyClasses/LoadProxyClasses.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/server/RMIClassLoader/loadProxyClasses/LoadProxyClasses.java	Wed Dec 26 19:03:36 2012 -0800
@@ -30,8 +30,8 @@
  * @author Laird Dornin
  *
  * @library ../../../testlibrary
- * @build TestLibrary FnnClass FnnUnmarshal LoadProxyClasses NonpublicInterface
- * @build NonpublicInterface1 PublicInterface PublicInterface1
+ * @build TestLibrary FnnClass FnnUnmarshal NonpublicInterface
+ *     NonpublicInterface1 PublicInterface PublicInterface1
  * @run main/othervm/policy=security.policy LoadProxyClasses
  */
 
--- a/test/java/rmi/server/RMIClassLoader/noSecurityManager/NoSecurityManager.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/server/RMIClassLoader/noSecurityManager/NoSecurityManager.java	Wed Dec 26 19:03:36 2012 -0800
@@ -30,7 +30,7 @@
  * been used for the RMI class loader instance.
  * @author Peter Jones
  *
- * @build NoSecurityManager Dummy LocalDummy
+ * @build Dummy LocalDummy
  * @run main/othervm/timeout=120 NoSecurityManager
  */
 
--- a/test/java/rmi/server/RMIClassLoader/spi/ContextInsulation.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/server/RMIClassLoader/spi/ContextInsulation.java	Wed Dec 26 19:03:36 2012 -0800
@@ -30,11 +30,7 @@
  * @author Peter Jones
  *
  * @library ../../../testlibrary
- * @build TestLibrary
- * @build ContextInsulation
- * @build ServiceConfiguration
- * @build TestProvider
- * @build TestProvider2
+ * @build TestLibrary ServiceConfiguration TestProvider TestProvider2
  * @run main/othervm/policy=security.policy ContextInsulation
  */
 
--- a/test/java/rmi/server/RMIClassLoader/spi/DefaultProperty.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/server/RMIClassLoader/spi/DefaultProperty.java	Wed Dec 26 19:03:36 2012 -0800
@@ -29,10 +29,7 @@
  * @author Peter Jones
  *
  * @library ../../../testlibrary
- * @build TestLibrary
- * @build DefaultProperty
- * @build ServiceConfiguration
- * @build Foo
+ * @build TestLibrary ServiceConfiguration Foo
  * @run main/othervm/policy=security.policy DefaultProperty
  */
 
--- a/test/java/rmi/server/RMIClassLoader/spi/Installed.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/server/RMIClassLoader/spi/Installed.java	Wed Dec 26 19:03:36 2012 -0800
@@ -29,11 +29,7 @@
  * @author Peter Jones
  *
  * @library ../../../testlibrary
- * @build TestLibrary
- * @build Installed
- * @build ServiceConfiguration
- * @build TestProvider
- * @build TestProvider2
+ * @build TestLibrary ServiceConfiguration TestProvider TestProvider2
  * @run main/othervm/policy=security.policy Installed
  */
 
--- a/test/java/rmi/server/RMIClassLoader/spi/InvalidProperty.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/server/RMIClassLoader/spi/InvalidProperty.java	Wed Dec 26 19:03:36 2012 -0800
@@ -29,9 +29,7 @@
  * @author Peter Jones
  *
  * @library ../../../testlibrary
- * @build TestLibrary
- * @build InvalidProperty
- * @build ServiceConfiguration
+ * @build TestLibrary ServiceConfiguration
  * @run main/othervm/policy=security.policy InvalidProperty
  */
 
--- a/test/java/rmi/server/RMIClassLoader/spi/Property.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/server/RMIClassLoader/spi/Property.java	Wed Dec 26 19:03:36 2012 -0800
@@ -29,10 +29,7 @@
  * @author Peter Jones
  *
  * @library ../../../testlibrary
- * @build TestLibrary
- * @build Property
- * @build ServiceConfiguration
- * @build TestProvider
+ * @build TestLibrary ServiceConfiguration TestProvider
  * @run main/othervm/policy=security.policy Property
  */
 
--- a/test/java/rmi/server/RMIClassLoader/useCodebaseOnly/UseCodebaseOnly.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/server/RMIClassLoader/useCodebaseOnly/UseCodebaseOnly.java	Wed Dec 26 19:03:36 2012 -0800
@@ -31,12 +31,7 @@
  * @author Peter Jones
  *
  * @library ../../../testlibrary
- * @build TestLibrary
- * @build Receiver
- * @build UseCodebaseOnly
- * @build UseCodebaseOnly_Stub
- * @build Foo
- * @build Bar
+ * @build TestLibrary Receiver UseCodebaseOnly_Stub Foo Bar
  * @run main/othervm/policy=security.policy UseCodebaseOnly
  */
 
--- a/test/java/rmi/server/RMIClassLoader/useGetURLs/UseGetURLs.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/server/RMIClassLoader/useGetURLs/UseGetURLs.java	Wed Dec 26 19:03:36 2012 -0800
@@ -30,8 +30,7 @@
  * @author Peter Jones
  *
  * @library ../../../testlibrary
- * @build TestLibrary
- * @build UseGetURLs Dummy
+ * @build TestLibrary Dummy
  * @run main/othervm/policy=security.policy/timeout=120 UseGetURLs
  */
 
--- a/test/java/rmi/server/RMISocketFactory/useSocketFactory/activatable/UseCustomSocketFactory.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/server/RMISocketFactory/useSocketFactory/activatable/UseCustomSocketFactory.java	Wed Dec 26 19:03:36 2012 -0800
@@ -28,11 +28,7 @@
  * @author Ann Wollrath
  *
  * @library ../../../../testlibrary
- * @build Echo
- * @build EchoImpl
- * @build EchoImpl_Stub
- * @build UseCustomSocketFactory
- * @build TestLibrary
+ * @build TestLibrary Echo EchoImpl EchoImpl_Stub
  * @run main/othervm/policy=security.policy/timeout=360 UseCustomSocketFactory
  */
 
--- a/test/java/rmi/server/RMISocketFactory/useSocketFactory/registry/UseCustomSocketFactory.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/server/RMISocketFactory/useSocketFactory/registry/UseCustomSocketFactory.java	Wed Dec 26 19:03:36 2012 -0800
@@ -29,12 +29,7 @@
  * @author Laird Dornin; code borrowed from Ann Wollrath
  *
  * @library ../../../../testlibrary
- * @build Hello
- * @build HelloImpl
- * @build HelloImpl_Stub
- * @build TestLibrary
- * @build UseCustomSocketFactory
- * @build Compress
+ * @build TestLibrary Compress Hello HelloImpl HelloImpl_Stub
  * @run main/othervm/policy=security.policy/timeout=240 UseCustomSocketFactory
  */
 
--- a/test/java/rmi/server/RMISocketFactory/useSocketFactory/unicast/UseCustomSocketFactory.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/server/RMISocketFactory/useSocketFactory/unicast/UseCustomSocketFactory.java	Wed Dec 26 19:03:36 2012 -0800
@@ -29,11 +29,7 @@
  * @author Ann Wollrath
  *
  * @library ../../../../testlibrary
- * @build TestLibrary RMID JavaVM StreamPipe
- * @build Echo
- * @build EchoImpl
- * @build EchoImpl_Stub
- * @build UseCustomSocketFactory
+ * @build TestLibrary RMID JavaVM Echo EchoImpl EchoImpl_Stub
  * @run main/othervm/policy=security.policy/timeout=120 UseCustomSocketFactory
  */
 
--- a/test/java/rmi/server/RemoteObject/notExtending/NotExtending.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/server/RemoteObject/notExtending/NotExtending.java	Wed Dec 26 19:03:36 2012 -0800
@@ -29,9 +29,7 @@
  *          (specifically: stubs) that contain the instance's RemoteRef.
  * @author Peter Jones
  *
- * @build NotExtending
- * @build NotExtending_Stub
- * @build NotExtending_Skel
+ * @build NotExtending_Stub NotExtending_Skel
  * @run main/othervm/timeout=240 NotExtending
  */
 
--- a/test/java/rmi/server/RemoteObject/verifyRemoteEquals/VerifyRemoteEquals.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/server/RemoteObject/verifyRemoteEquals/VerifyRemoteEquals.java	Wed Dec 26 19:03:36 2012 -0800
@@ -21,16 +21,16 @@
  * questions.
  */
 
-/**
+/*
  * @test
  * @bug 4251010
  * @summary equals does not works on stub objects created with
  *           custom socket AndFactory
+ * @author Laird Dornin
+ *
  * @library ../../../testlibrary
- *
- * @build VerifyRemoteEquals
+ * @build TestLibrary
  * @run main/othervm/timeout=40 VerifyRemoteEquals
- * @author Laird Dornin
  */
 
 import java.io.*;
--- a/test/java/rmi/server/RemoteServer/AddrInUse.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/server/RemoteServer/AddrInUse.java	Wed Dec 26 19:03:36 2012 -0800
@@ -26,8 +26,6 @@
  * @summary retryServerSocket should not retry on BindException
  * @author Ann Wollrath
  *
- * @library ../../testlibrary
- * @build AddrInUse
  * @run main/othervm AddrInUse
  */
 
--- a/test/java/rmi/server/UnicastRemoteObject/changeHostName/ChangeHostName.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/server/UnicastRemoteObject/changeHostName/ChangeHostName.java	Wed Dec 26 19:03:36 2012 -0800
@@ -31,8 +31,7 @@
  *
  * @author Ann Wollrath
  *
- * @build ChangeHostName
- * @build ChangeHostName_Stub
+ * @build ChangeHostName ChangeHostName_Stub
  * @run main/othervm ChangeHostName
  */
 
--- a/test/java/rmi/server/UnicastRemoteObject/exportObject/GcDuringExport.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/server/UnicastRemoteObject/exportObject/GcDuringExport.java	Wed Dec 26 19:03:36 2012 -0800
@@ -30,6 +30,7 @@
  * @bug 6597112
  * @summary GC'ing objects whilst being exported to RMI should not cause exceptions
  * @author Neil Richards <neil.richards@ngmr.net>, <neil_richards@uk.ibm.com>
+ * @run main GcDuringExport
  */
 
 import java.rmi.Remote;
--- a/test/java/rmi/server/UnicastRemoteObject/keepAliveDuringCall/KeepAliveDuringCall.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/server/UnicastRemoteObject/keepAliveDuringCall/KeepAliveDuringCall.java	Wed Dec 26 19:03:36 2012 -0800
@@ -32,14 +32,8 @@
  * @author Peter Jones
  *
  * @library ../../../testlibrary
- * @build TestLibrary
- * @build JavaVM
- * @build KeepAliveDuringCall
- * @build KeepAliveDuringCall_Stub
- * @build ShutdownMonitor
- * @build Shutdown
- * @build ShutdownImpl
- * @build ShutdownImpl_Stub
+ * @build TestLibrary JavaVM KeepAliveDuringCall_Stub
+ *     ShutdownMonitor Shutdown ShutdownImpl ShutdownImpl_Stub
  * @run main/othervm KeepAliveDuringCall
  */
 
--- a/test/java/rmi/server/UnicastRemoteObject/marshalAfterUnexport/MarshalAfterUnexport.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/server/UnicastRemoteObject/marshalAfterUnexport/MarshalAfterUnexport.java	Wed Dec 26 19:03:36 2012 -0800
@@ -31,8 +31,7 @@
  * IOException (see fix for bugid 4017232).
  * @author Peter Jones
  *
- * @build MarshalAfterUnexport
- * @build MarshalAfterUnexport_Stub
+ * @build MarshalAfterUnexport MarshalAfterUnexport_Stub
  * @run main/othervm MarshalAfterUnexport
  */
 
--- a/test/java/rmi/server/UnicastRemoteObject/marshalAfterUnexport/MarshalAfterUnexport2.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/server/UnicastRemoteObject/marshalAfterUnexport/MarshalAfterUnexport2.java	Wed Dec 26 19:03:36 2012 -0800
@@ -33,8 +33,7 @@
  * @author Peter Jones
  * @author Ann Wollrath
  *
- * @build MarshalAfterUnexport2
- * @build MarshalAfterUnexport2_Stub
+ * @build MarshalAfterUnexport2 MarshalAfterUnexport2_Stub
  * @run main/othervm MarshalAfterUnexport2
  */
 
--- a/test/java/rmi/server/UnicastRemoteObject/unexportObject/UnexportLeak.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/server/UnicastRemoteObject/unexportObject/UnexportLeak.java	Wed Dec 26 19:03:36 2012 -0800
@@ -29,10 +29,7 @@
  * @author Ann Wollrath
  *
  * @library ../../../testlibrary
- * @build UnexportLeak
- * @build UnexportLeak_Stub
- * @build TestLibrary
- * @build Ping
+ * @build TestLibrary UnexportLeak_Stub Ping
  * @run main/othervm UnexportLeak
  */
 
--- a/test/java/rmi/server/Unmarshal/PrimitiveClasses.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/server/Unmarshal/PrimitiveClasses.java	Wed Dec 26 19:03:36 2012 -0800
@@ -25,6 +25,7 @@
  * @bug 4442373
  * @summary Verify that RMI can successfully unmarshal Class objects for
  *          primitive types.
+ * @run main PrimitiveClasses
  */
 
 import java.rmi.MarshalledObject;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/rmi/server/Unmarshal/checkUnmarshalOnStopThread/CheckUnmarshal.java	Wed Dec 26 19:03:36 2012 -0800
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 1999, 2008, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ *
+ */
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+    /*
+     * Interface with methods to exercise RMI parameter marshalling
+     * and unmarshalling.
+     */
+    interface CheckUnmarshal extends java.rmi.Remote {
+        public PoisonPill getPoisonPill() throws RemoteException;
+        public Object ping() throws RemoteException;
+        public void passRuntimeExceptionParameter(
+            RuntimeExceptionParameter rep)
+        throws RemoteException;
+    }
--- a/test/java/rmi/server/Unmarshal/checkUnmarshalOnStopThread/CheckUnmarshalOnStopThread.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/server/Unmarshal/checkUnmarshalOnStopThread/CheckUnmarshalOnStopThread.java	Wed Dec 26 19:03:36 2012 -0800
@@ -31,10 +31,8 @@
  * @author Laird Dornin
  *
  * @library ../../../testlibrary
- * @build TestLibrary RMID JavaVM StreamPipe
- * @build CheckUnmarshall PoisonPill RuntimeExceptionParameter
- * @build CheckUnmarshalOnStopThread
- * @build CheckUnmarshalOnStopThread_Stub
+ * @build TestLibrary CheckUnmarshal CheckUnmarshalOnStopThread_Stub
+ *     PoisonPill RuntimeExceptionParameter
  * @run main/othervm/timeout=480 CheckUnmarshalOnStopThread
  */
 
--- a/test/java/rmi/server/Unmarshal/checkUnmarshalOnStopThread/CheckUnmarshall.java	Wed Dec 19 15:49:39 2012 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 1999, 2008, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- *
- */
-import java.rmi.Remote;
-import java.rmi.RemoteException;
-    /*
-     * Interface with methods to exercise RMI parameter marshalling
-     * and unmarshalling.
-     */
-    interface CheckUnmarshal extends java.rmi.Remote {
-        public PoisonPill getPoisonPill() throws RemoteException;
-        public Object ping() throws RemoteException;
-        public void passRuntimeExceptionParameter(
-            RuntimeExceptionParameter rep)
-        throws RemoteException;
-    }
--- a/test/java/rmi/server/Unreferenced/finiteGCLatency/FiniteGCLatency.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/server/Unreferenced/finiteGCLatency/FiniteGCLatency.java	Wed Dec 26 19:03:36 2012 -0800
@@ -35,9 +35,7 @@
  * @author Peter Jones
  *
  * @library ../../../testlibrary
- * @build FiniteGCLatency
- * @build FiniteGCLatency_Stub
- * @build TestLibrary
+ * @build TestLibrary FiniteGCLatency_Stub
  * @run main/othervm/timeout=120 FiniteGCLatency
  */
 
--- a/test/java/rmi/server/Unreferenced/leaseCheckInterval/LeaseCheckInterval.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/server/Unreferenced/leaseCheckInterval/LeaseCheckInterval.java	Wed Dec 26 19:03:36 2012 -0800
@@ -37,11 +37,7 @@
  * @author Peter Jones
  *
  * @library ../../../testlibrary
- * @build TestLibrary
- * @build JavaVM
- * @build LeaseCheckInterval
- * @build LeaseCheckInterval_Stub
- * @build SelfTerminator
+ * @build TestLibrary JavaVM LeaseCheckInterval_Stub SelfTerminator
  * @run main/othervm LeaseCheckInterval
  */
 
--- a/test/java/rmi/server/Unreferenced/marshalledObjectGet/MarshalledObjectGet.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/server/Unreferenced/marshalledObjectGet/MarshalledObjectGet.java	Wed Dec 26 19:03:36 2012 -0800
@@ -30,8 +30,6 @@
  * invoked.
  * @author Peter Jones
  *
- * @library ../../../testlibrary
- * @build MarshalledObjectGet
  * @build MarshalledObjectGet_Stub
  * @run main/othervm/timeout=120 MarshalledObjectGet
  */
--- a/test/java/rmi/server/Unreferenced/unreferencedContext/UnreferencedContext.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/server/Unreferenced/unreferencedContext/UnreferencedContext.java	Wed Dec 26 19:03:36 2012 -0800
@@ -39,9 +39,7 @@
  * @author Laird Dornin
  *
  * @library ../../../testlibrary
- * @build UnreferencedContext
- * @build UnreferencedContext_Stub
- * @build TestLibrary
+ * @build TestLibrary UnreferencedContext_Stub
  * @run main/othervm/timeout=120 UnreferencedContext
  */
 
--- a/test/java/rmi/server/clientStackTrace/ClientStackTrace.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/server/clientStackTrace/ClientStackTrace.java	Wed Dec 26 19:03:36 2012 -0800
@@ -28,7 +28,7 @@
  * @author Laird Dornin
  *
  * @library ../../testlibrary
- * @build ClientStackTrace MyRemoteObject_Stub TestLibrary TestParams
+ * @build TestLibrary ClientStackTrace MyRemoteObject_Stub
  * @run main/othervm/policy=security.policy/timeout=120 ClientStackTrace
  */
 
--- a/test/java/rmi/server/getRemoteClass/GetRemoteClass.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/server/getRemoteClass/GetRemoteClass.java	Wed Dec 26 19:03:36 2012 -0800
@@ -28,7 +28,7 @@
  * @author Laird Dornin
  *
  * @library ../../testlibrary
- * @build GetRemoteClass TestLibrary TestParams
+ * @build TestLibrary
  * @run main/othervm GetRemoteClass
  */
 
--- a/test/java/rmi/server/serverStackTrace/ServerStackTrace.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/server/serverStackTrace/ServerStackTrace.java	Wed Dec 26 19:03:36 2012 -0800
@@ -29,8 +29,7 @@
  * serialized with the Throwable from the server.
  * @author Peter Jones
  *
- * @build ServerStackTrace
- * @build ServerStackTrace_Stub
+ * @build ServerStackTrace ServerStackTrace_Stub
  * @run main/othervm ServerStackTrace
  */
 
--- a/test/java/rmi/server/serverStackTrace/SuppressStackTraces.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/server/serverStackTrace/SuppressStackTraces.java	Wed Dec 26 19:03:36 2012 -0800
@@ -36,10 +36,7 @@
  * for reasons of performance or confidentiality requirements.
  * @author Peter Jones
  *
- * @build SuppressStackTraces
- * @build Impl2_Stub
- * @build Impl1_Stub
- * @build Impl1_Skel
+ * @build SuppressStackTraces Impl2_Stub Impl1_Stub Impl1_Skel
  * @run main/othervm SuppressStackTraces
  */
 
--- a/test/java/rmi/server/useCustomRef/UseCustomRef.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/server/useCustomRef/UseCustomRef.java	Wed Dec 26 19:03:36 2012 -0800
@@ -31,11 +31,7 @@
  * 4180392
  *
  * @library ../../testlibrary
- * @build UseCustomRef
- * @build Ping
- * @build UseCustomRef_Stub
- * @build UseCustomRef_Skel
- * @build TestLibrary
+ * @build TestLibrary Ping UseCustomRef_Stub UseCustomRef_Skel
  * @run main/othervm/policy=security.policy/secure=java.rmi.RMISecurityManager/timeout=120 UseCustomRef
  *
  * This test was failing to run because the synthetic access
--- a/test/java/rmi/transport/acceptLoop/CloseServerSocketOnTermination.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/transport/acceptLoop/CloseServerSocketOnTermination.java	Wed Dec 26 19:03:36 2012 -0800
@@ -31,7 +31,6 @@
  * exception for which it doesn't even consult the RMIFailureHandler.
  * @author Peter Jones
  *
- * @build CloseServerSocketOnTermination
  * @run main/othervm CloseServerSocketOnTermination
  */
 
--- a/test/java/rmi/transport/checkFQDN/CheckFQDN.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/transport/checkFQDN/CheckFQDN.java	Wed Dec 26 19:03:36 2012 -0800
@@ -33,8 +33,7 @@
  * @author Laird Dornin
  *
  * @library ../../testlibrary
- * @build CheckFQDN CheckFQDNClient CheckFQDN_Stub TellServerName
- * @build TestLibrary
+ * @build TestLibrary CheckFQDNClient CheckFQDN_Stub TellServerName
  * @run main/othervm/timeout=120 CheckFQDN
  */
 
--- a/test/java/rmi/transport/checkLeaseInfoLeak/CheckLeaseLeak.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/transport/checkLeaseInfoLeak/CheckLeaseLeak.java	Wed Dec 26 19:03:36 2012 -0800
@@ -28,8 +28,7 @@
  * @author Laird Dornin
  *
  * @library ../../testlibrary
- * @build CheckLeaseLeak CheckLeaseLeak_Stub LeaseLeakClient LeaseLeak
- * @build TestLibrary
+ * @build TestLibrary CheckLeaseLeak_Stub LeaseLeakClient LeaseLeak
  * @run main/othervm/timeout=240 CheckLeaseLeak
  *
  */
--- a/test/java/rmi/transport/closeServerSocket/CloseServerSocket.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/transport/closeServerSocket/CloseServerSocket.java	Wed Dec 26 19:03:36 2012 -0800
@@ -31,7 +31,7 @@
  * @author Peter Jones
  *
  * @library ../../testlibrary
- * @build CloseServerSocket TestLibrary
+ * @build TestLibrary
  * @run main/othervm CloseServerSocket
  */
 
--- a/test/java/rmi/transport/dgcDeadLock/DGCDeadLock.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/transport/dgcDeadLock/DGCDeadLock.java	Wed Dec 26 19:03:36 2012 -0800
@@ -28,11 +28,7 @@
  * @author Laird Dornin
  *
  * @library ../../testlibrary
- * @build DGCDeadLock
- * @build Test
- * @build TestImpl
- * @build TestImpl_Stub
- * @build TestLibrary
+ * @build TestLibrary Test TestImpl TestImpl_Stub
  * @run main/othervm/policy=security.policy/timeout=360 DGCDeadLock
  */
 
--- a/test/java/rmi/transport/handshakeFailure/HandshakeFailure.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/transport/handshakeFailure/HandshakeFailure.java	Wed Dec 26 19:03:36 2012 -0800
@@ -31,7 +31,7 @@
  * @author Peter Jones
  *
  * @library ../../testlibrary
- * @build HandshakeFailure TestLibrary
+ * @build TestLibrary
  * @run main/othervm HandshakeFailure
  */
 
--- a/test/java/rmi/transport/handshakeTimeout/HandshakeTimeout.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/transport/handshakeTimeout/HandshakeTimeout.java	Wed Dec 26 19:03:36 2012 -0800
@@ -34,7 +34,7 @@
  * @author Peter Jones
  *
  * @library ../../testlibrary
- * @build HandshakeTimeout TestLibrary
+ * @build TestLibrary
  * @run main/othervm HandshakeTimeout
  */
 
--- a/test/java/rmi/transport/httpSocket/HttpSocketTest.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/transport/httpSocket/HttpSocketTest.java	Wed Dec 26 19:03:36 2012 -0800
@@ -27,7 +27,7 @@
  * @author Dana Burns
  *
  * @library ../../testlibrary
- * @build HttpSocketTest HttpSocketTest_Stub TestLibrary
+ * @build TestLibrary HttpSocketTest HttpSocketTest_Stub
  * @run main/othervm/policy=security.policy HttpSocketTest
  */
 
--- a/test/java/rmi/transport/rapidExportUnexport/RapidExportUnexport.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/transport/rapidExportUnexport/RapidExportUnexport.java	Wed Dec 26 19:03:36 2012 -0800
@@ -32,7 +32,7 @@
  * @author Peter Jones
  *
  * @library ../../testlibrary
- * @build TestLibrary RapidExportUnexport
+ * @build TestLibrary
  * @run main/othervm RapidExportUnexport
  */
 
--- a/test/java/rmi/transport/readTimeout/ReadTimeoutTest.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/transport/readTimeout/ReadTimeoutTest.java	Wed Dec 26 19:03:36 2012 -0800
@@ -27,12 +27,9 @@
  * @summary Incoming connections should be subject to timeout
  * @author Adrian Colley
  *
- * @library ../../testlibrary
- * @build TestIface
- * @build TestImpl
- * @build TestImpl_Stub
- * @build ReadTimeoutTest
- * @run main/othervm/policy=security.policy/timeout=60 -Dsun.rmi.transport.tcp.readTimeout=5000 ReadTimeoutTest
+ * @build TestIface TestImpl TestImpl_Stub
+ * @run main/othervm/policy=security.policy/timeout=60
+ *     -Dsun.rmi.transport.tcp.readTimeout=5000 ReadTimeoutTest
  */
 
 /* This test sets a very short read timeout, exports an object, and then
--- a/test/java/rmi/transport/reuseDefaultPort/ReuseDefaultPort.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/transport/reuseDefaultPort/ReuseDefaultPort.java	Wed Dec 26 19:03:36 2012 -0800
@@ -34,7 +34,7 @@
  * @author Peter Jones
  *
  * @library ../../testlibrary
- * @build ReuseDefaultPort TestLibrary
+ * @build TestLibrary
  * @run main/othervm ReuseDefaultPort
  */
 
--- a/test/java/rmi/transport/runtimeThreadInheritanceLeak/RuntimeThreadInheritanceLeak.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/rmi/transport/runtimeThreadInheritanceLeak/RuntimeThreadInheritanceLeak.java	Wed Dec 26 19:03:36 2012 -0800
@@ -38,7 +38,6 @@
  * subsystems also not holding on to the loader in their daemon threads.]
  * @author Peter Jones
  *
- * @build RuntimeThreadInheritanceLeak
  * @build RuntimeThreadInheritanceLeak_Stub
  * @run main/othervm RuntimeThreadInheritanceLeak
  */
--- a/test/java/util/concurrent/Executors/AutoShutdown.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/java/util/concurrent/Executors/AutoShutdown.java	Wed Dec 26 19:03:36 2012 -0800
@@ -67,6 +67,11 @@
         e1 = e2 = null;
         for (int i = 0; i < 10 && Thread.activeCount() > count0; i++)
             tryWaitForFinalizersToRun();
+        for (int i = 0; i < 10; ++i) { // give JVM a chance to settle.
+            if (Thread.activeCount() == count0)
+                return;
+            Thread.sleep(1000);
+        }
         equal(Thread.activeCount(), count0);
     }
 
--- a/test/javax/rmi/ssl/SocketFactoryTest.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/javax/rmi/ssl/SocketFactoryTest.java	Wed Dec 26 19:03:36 2012 -0800
@@ -26,8 +26,7 @@
  * @bug 4932837 6582235
  * @summary Test SslRMI[Client|Server]SocketFactory equals() and hashCode().
  * @author Daniel Fuchs
- * @run clean SocketFactoryTest
- * @run build SocketFactoryTest
+ *
  * @run main SocketFactoryTest
  */
 
--- a/test/javax/swing/AncestorNotifier/7193219/bug7193219.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/javax/swing/AncestorNotifier/7193219/bug7193219.java	Wed Dec 26 19:03:36 2012 -0800
@@ -30,6 +30,7 @@
 import java.io.*;
 
 import javax.swing.*;
+import javax.swing.plaf.metal.*;
 
 public class bug7193219 {
     private static byte[] serializeGUI() {
@@ -73,6 +74,7 @@
     }
 
     public static void main(String[] args) throws Exception {
+        UIManager.setLookAndFeel(new MetalLookAndFeel());
         SwingUtilities.invokeAndWait(new Runnable() {
             @Override
             public void run() {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/swing/JMenuItem/ActionListenerCalledTwice/ActionListenerCalledTwiceTest.java	Wed Dec 26 19:03:36 2012 -0800
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2012, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 7160951
+ * @summary [macosx] ActionListener called twice for JMenuItem using ScreenMenuBar
+ * @author vera.akulova@oracle.com
+ * @run main ActionListenerCalledTwiceTest
+ */
+
+import sun.awt.*;
+import java.awt.*;
+import java.awt.event.*;
+import javax.swing.*;
+
+public class ActionListenerCalledTwiceTest {
+    static volatile int listenerCallCounter = 0;
+    public static void main(String[] args) throws Exception {
+        if (sun.awt.OSInfo.getOSType() != sun.awt.OSInfo.OSType.MACOSX) {
+            System.out.println("This test is for MacOS only. Automatically passed on other platforms.");
+            return;
+        }
+        System.setProperty("apple.laf.useScreenMenuBar", "true");
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                createAndShowGUI();
+            }
+        });
+        SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+        Robot robot = new Robot();
+        robot.setAutoDelay(100);
+        robot.keyPress(KeyEvent.VK_META);
+        robot.keyPress(KeyEvent.VK_E);
+        robot.keyRelease(KeyEvent.VK_E);
+        robot.keyRelease(KeyEvent.VK_META);
+        toolkit.realSync();
+        if (listenerCallCounter != 1) {
+            throw new Exception("Test failed: ActionListener called " + listenerCallCounter + " times instead of 1!");
+        }
+    }
+
+    private static void createAndShowGUI() {
+        JMenuItem newItem = new JMenuItem("Exit");
+        newItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_E, InputEvent.META_MASK));
+        newItem.addActionListener(
+            new ActionListener(){
+                public void actionPerformed(ActionEvent e) {
+                    listenerCallCounter++;
+                }
+            }
+        );
+        JMenu menu = new JMenu("Menu");
+        menu.add(newItem);
+        JMenuBar bar = new JMenuBar();
+        bar.add(menu);
+        JFrame frame = new JFrame("Test");
+        frame.setJMenuBar(bar);
+        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+        frame.pack();
+        frame.setVisible(true);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/swing/JMenuItem/ShortcutNotDiplayed/ShortcutNotDisplayedTest.java	Wed Dec 26 19:03:36 2012 -0800
@@ -0,0 +1,105 @@
+/*
+ * Copyright (c) 2012, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 7186371
+ * @summary [macosx] Main menu shortcuts not displayed
+ * @author vera.akulova@oracle.com
+ * @run main/manual ShortcutNotDisplayedTest
+ */
+
+import java.awt.*;
+import java.awt.event.*;
+import javax.swing.*;
+
+public class ShortcutNotDisplayedTest {
+    static volatile boolean done = false;
+    static volatile boolean pass = false;
+    static final String PASS_COMMAND = "pass";
+
+    public static void main(String[] args) throws Exception {
+        if (sun.awt.OSInfo.getOSType() != sun.awt.OSInfo.OSType.MACOSX) {
+            System.out.println("This test is for MacOS only. Automatically passed on other platforms.");
+            return;
+        }
+        System.setProperty("apple.laf.useScreenMenuBar", "true");
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                createAndShowGUI();
+            }
+        });
+
+        do { try { Thread.sleep(300); } catch (Exception e) {} } while (!done) ;
+        if (!pass) {
+            throw new Exception("Shortcuts not displayed as expected in the screen menu bar.");
+        }
+    }
+
+    private static void createAndShowGUI() {
+        JMenuItem newItem = new JMenuItem("Exit");
+        newItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_E, java.awt.event.InputEvent.META_MASK));
+
+        JMenu menu = new JMenu("Test Frame Window Menu");
+        menu.setMnemonic(KeyEvent.VK_M);
+        menu.add(newItem);
+
+        JMenuBar bar = new JMenuBar();
+        bar.add(menu);
+        JTextArea text = new JTextArea(
+            "  Please follow instructions:\n" +
+            "  1. You should see \"Test Frame Window Menu\" menu on the screen menu bar.\n" +
+            "  2. Open \"Test Frame Window Menu\" menu. \n" +
+            "     Check that menu item \"Exit\" has a shortcut with image for Command Key and symbol \"E\". \n" +
+            "     If you see the shortcut press \"Passed\". Otherwise press \"Failed\".\n"
+        );
+        text.setEditable(false);
+
+        JScrollPane sp = new JScrollPane(text);
+        sp.setSize(300,200);
+
+        JButton passBtn = new JButton("Pass");
+        passBtn.setActionCommand(PASS_COMMAND);
+        JButton failBtn = new JButton("Fail");
+        ActionListener listener = new ActionListener() {
+            public void actionPerformed(ActionEvent e) {
+                if (e.getActionCommand().equals(PASS_COMMAND)) {
+                    pass = true;
+                }
+                done = true;
+            }
+        };
+
+        JFrame testFrame = new JFrame("Test Frame Window");
+        testFrame.setLayout(new FlowLayout());
+        testFrame.setBounds(100, 100, 600, 180);
+        testFrame.setJMenuBar(bar);
+        testFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+        passBtn.addActionListener(listener);
+        failBtn.addActionListener(listener);
+        testFrame.getContentPane().add(sp);
+        testFrame.getContentPane().add(passBtn);
+        testFrame.getContentPane().add(failBtn);
+        testFrame.setVisible(true);
+    }
+}
--- a/test/javax/swing/text/CSSBorder/6796710/bug6796710.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/javax/swing/text/CSSBorder/6796710/bug6796710.java	Wed Dec 26 19:03:36 2012 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2012, 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
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 6796710
+ * @bug 6796710 7124242
  * @summary Html content in JEditorPane is overlapping on swing components while resizing the application.
  * @library ../../../regtesthelpers
  * @build Util
@@ -31,11 +31,10 @@
    @run main bug6796710
  */
 
-import sun.awt.SunToolkit;
-
-import javax.swing.*;
 import java.awt.*;
 import java.awt.image.BufferedImage;
+import javax.swing.*;
+import sun.awt.SunToolkit;
 
 public class bug6796710 {
     // The page is inlined because we want to be sure that the JEditorPane filled synchronously
@@ -68,9 +67,12 @@
         robot = new Robot();
 
         SwingUtilities.invokeAndWait(new Runnable() {
+            @Override
             public void run() {
                 frame = new JFrame();
 
+                frame.setUndecorated(true);
+
                 pnBottom = new JPanel();
                 pnBottom.add(new JLabel("Some label"));
                 pnBottom.add(new JButton("A button"));
@@ -95,9 +97,13 @@
 
         ((SunToolkit) SunToolkit.getDefaultToolkit()).realSync();
 
+        // This delay should be added for MacOSX, realSync is not enough
+        Thread.sleep(1000);
+
         BufferedImage bufferedImage = getPnBottomImage();
 
         SwingUtilities.invokeAndWait(new Runnable() {
+            @Override
             public void run() {
                 frame.setSize(400, 150);
             }
--- a/test/sun/rmi/log/ReliableLog/LogAlignmentTest.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/sun/rmi/log/ReliableLog/LogAlignmentTest.java	Wed Dec 26 19:03:36 2012 -0800
@@ -22,8 +22,10 @@
  */
 
 /* @test
-   @bug 4094889
-   @summary rmid can have a corrupted log
+ * @bug 4094889
+ * @summary rmid can have a corrupted log
+ *
+ * @run main LogAlignmentTest
  */
 
 /* Fault: ReliableLog used RandomAccessFile.skipBytes() to seek past the end
--- a/test/sun/rmi/log/ReliableLog/SnapshotSize.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/sun/rmi/log/ReliableLog/SnapshotSize.java	Wed Dec 26 19:03:36 2012 -0800
@@ -25,6 +25,8 @@
  * @bug 4319866
  * @summary Verify that ReliableLog.snapshotSize() returns correct snapshot
  *          file size even if LogHandler doesn't flush.
+ *
+ * @run main SnapshotSize
  */
 
 import java.io.ByteArrayOutputStream;
--- a/test/sun/rmi/rmic/RMIGenerator/RmicDefault.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/sun/rmi/rmic/RMIGenerator/RmicDefault.java	Wed Dec 26 19:03:36 2012 -0800
@@ -28,7 +28,6 @@
  * @library ../../../../java/rmi/testlibrary
  *
  * @build StreamPipe
- * @build RmicDefault
  * @run main RmicDefault
  */
 
--- a/test/sun/rmi/rmic/newrmic/equivalence/run.sh	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/sun/rmi/rmic/newrmic/equivalence/run.sh	Wed Dec 26 19:03:36 2012 -0800
@@ -26,22 +26,24 @@
 # @summary This test verifies that the new implementation of rmic
 # generates equivalent classes as the old implementation, for a set
 # of sample input classes.
-# @library ../../../../../java/rmi/testlibrary
-# @build TestLibrary
 # @author Peter Jones
 #
-# @build AgentServerImpl
-# @build AppleImpl
-# @build AppleUserImpl
-# @build ComputeServerImpl
-# @build CountServerImpl
-# @build DayTimeServerImpl
-# @build G1Impl
-# @build MyObjectImpl
-# @build NotActivatableServerImpl
-# @build OrangeEchoImpl
-# @build OrangeImpl
-# @build ServerImpl
+# @library ../../../../../java/rmi/testlibrary
+#
+# @build TestLibrary
+#     AgentServerImpl
+#     AppleImpl
+#     AppleUserImpl
+#     ComputeServerImpl
+#     CountServerImpl
+#     DayTimeServerImpl
+#     G1Impl
+#     MyObjectImpl
+#     NotActivatableServerImpl
+#     OrangeEchoImpl
+#     OrangeImpl
+#     ServerImpl
+#
 # @run shell run.sh
 
 if [ "${TESTJAVA}" = "" ]
--- a/test/sun/rmi/runtime/Log/6409194/NoConsoleOutput.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/sun/rmi/runtime/Log/6409194/NoConsoleOutput.java	Wed Dec 26 19:03:36 2012 -0800
@@ -31,8 +31,7 @@
  * @author Peter Jones
  *
  * @library ../../../../../java/rmi/testlibrary
- * @build JavaVM
- * @build NoConsoleOutput
+ * @build TestLibrary JavaVM
  * @run main/othervm NoConsoleOutput
  */
 
--- a/test/sun/rmi/runtime/Log/checkLogging/CheckLogStreams.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/sun/rmi/runtime/Log/checkLogging/CheckLogStreams.java	Wed Dec 26 19:03:36 2012 -0800
@@ -28,11 +28,7 @@
  * @author Laird Dornin
  *
  * @library ../../../../../java/rmi/testlibrary
- * @build TestLibrary
- * @build TestParams
- * @build TestFailedException
- * @build CheckLogging
- * @build CheckLogStreams
+ * @build TestLibrary CheckLogging
  * @run main/othervm -Dsun.rmi.log.useOld=true CheckLogStreams
  */
 
--- a/test/sun/rmi/runtime/Log/checkLogging/CheckLogging.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/sun/rmi/runtime/Log/checkLogging/CheckLogging.java	Wed Dec 26 19:03:36 2012 -0800
@@ -29,9 +29,6 @@
  *
  * @library ../../../../../java/rmi/testlibrary
  * @build TestLibrary
- * @build TestParams
- * @build TestFailedException
- * @build CheckLogging
  * @run main/othervm CheckLogging
  */
 
--- a/test/sun/rmi/server/MarshalOutputStream/marshalForeignStub/MarshalForeignStub.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/sun/rmi/server/MarshalOutputStream/marshalForeignStub/MarshalForeignStub.java	Wed Dec 26 19:03:36 2012 -0800
@@ -31,11 +31,7 @@
  * @author Ann Wollrath
  *
  * @library ../../../../../java/rmi/testlibrary
- * @build TestLibrary
- * @build TestFailedException
- * @build MarshalForeignStub
- * @build Receiver
- * @build MarshalForeignStub_Stub
+ * @build TestLibrary Receiver MarshalForeignStub_Stub
  * @run main/othervm/policy=security.policy MarshalForeignStub
  */
 
--- a/test/sun/rmi/transport/proxy/EagerHttpFallback.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/sun/rmi/transport/proxy/EagerHttpFallback.java	Wed Dec 26 19:03:36 2012 -0800
@@ -25,6 +25,7 @@
  * @bug 4290727
  * @summary Verify that ConnectException will trigger HTTP fallback if
  *          sun.rmi.transport.proxy.eagerHttpFallback system property is set.
+ *
  * @library ../../../../java/rmi/testlibrary
  * @build TestLibrary
  * @run main/othervm EagerHttpFallback
--- a/test/sun/rmi/transport/tcp/DeadCachedConnection.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/sun/rmi/transport/tcp/DeadCachedConnection.java	Wed Dec 26 19:03:36 2012 -0800
@@ -25,9 +25,7 @@
  * @bug 4094891
  * @summary unable to retry call if cached connection to server is used
  * @library ../../../../java/rmi/testlibrary
- * @build DeadCachedConnection
- * @build JavaVM
- * @build TestLibrary
+ * @build TestLibrary JavaVM
  * @run main/othervm DeadCachedConnection
  */
 
--- a/test/sun/rmi/transport/tcp/blockAccept/BlockAcceptTest.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/sun/rmi/transport/tcp/blockAccept/BlockAcceptTest.java	Wed Dec 26 19:03:36 2012 -0800
@@ -27,11 +27,8 @@
  * @summary RMI blocks in HttpAwareServerSocket.accept() if you telnet to it
  * @author Adrian Colley
  *
- * @library ../../../../../java/rmi/testlibrary/
- * @build TestIface
- * @build TestImpl
- * @build TestImpl_Stub
- * @build BlockAcceptTest
+ * @library ../../../../../java/rmi/testlibrary
+ * @build TestIface TestImpl TestImpl_Stub
  * @run main/othervm/policy=security.policy/timeout=60 BlockAcceptTest
  */
 
--- a/test/sun/rmi/transport/tcp/disableMultiplexing/DisableMultiplexing.java	Wed Dec 19 15:49:39 2012 -0800
+++ b/test/sun/rmi/transport/tcp/disableMultiplexing/DisableMultiplexing.java	Wed Dec 26 19:03:36 2012 -0800
@@ -28,7 +28,6 @@
  * on that port, rather than engage in the deprecated "multiplexing protocol".
  * @author Peter Jones
  *
- * @build DisableMultiplexing
  * @build DisableMultiplexing_Stub
  * @run main/othervm DisableMultiplexing
  */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/jar/JarBackSlash.java	Wed Dec 26 19:03:36 2012 -0800
@@ -0,0 +1,135 @@
+/*
+ * Copyright (c) 2012 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * Portions Copyright (c) 2012 IBM Corporation
+ */
+
+/*
+ * @test
+ * @bug 7201156
+ * @summary jar tool fails to convert file separation characters for list and extract
+ * @author Sean Chou
+ */
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.PipedInputStream;
+import java.io.PipedOutputStream;
+import java.io.PrintStream;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.jar.JarEntry;
+import java.util.jar.JarOutputStream;
+
+import sun.tools.jar.Main;
+
+public class JarBackSlash {
+
+    // used construct an entry JarBackSlash/dir/file.txt
+    private static String JARBACKSLASH = "JarBackSlash";
+    private static String DIR = "dir";
+    private static String FILENAME = "file.txt";
+
+    private static File createJarFile() throws IOException {
+        File jarFile = File.createTempFile("JarBackSlashTest", ".jar");
+        jarFile.deleteOnExit();
+
+        try (JarOutputStream output = new JarOutputStream(new FileOutputStream(jarFile))) {
+            JarEntry entry = new JarEntry(JARBACKSLASH + "/" + DIR + "/" + FILENAME);
+            output.putNextEntry(entry);
+        }
+
+        return jarFile;
+    }
+
+    private static void testJarList(String jarFile) throws IOException {
+        List<String> argList = new ArrayList<String>();
+        argList.add("-tvf");
+        argList.add(jarFile);
+        argList.add(JARBACKSLASH + File.separatorChar + DIR + File.separatorChar + FILENAME);
+
+        String jarArgs[] = new String[argList.size()];
+        jarArgs = argList.toArray(jarArgs);
+
+        PipedOutputStream pipedOutput = new PipedOutputStream();
+        PipedInputStream pipedInput = new PipedInputStream(pipedOutput);
+        PrintStream out = new PrintStream(pipedOutput);
+
+        Main jarTool = new Main(out, System.err, "jar");
+        if (!jarTool.run(jarArgs)) {
+            fail("Could not list jar file.");
+        }
+
+        out.flush();
+        check(pipedInput.available() > 0);
+    }
+
+
+    private static void testJarExtract(String jarFile) throws IOException {
+        List<String> argList = new ArrayList<String>();
+        argList.add("-xvf");
+        argList.add(jarFile);
+        argList.add(JARBACKSLASH + File.separatorChar + DIR + File.separatorChar + FILENAME);
+
+        String jarArgs[] = new String[argList.size()];
+        jarArgs = argList.toArray(jarArgs);
+
+        PipedOutputStream pipedOutput = new PipedOutputStream();
+        PipedInputStream pipedInput = new PipedInputStream(pipedOutput);
+        PrintStream out = new PrintStream(pipedOutput);
+
+        Main jarTool = new Main(out, System.err, "jar");
+        if (!jarTool.run(jarArgs)) {
+            fail("Could not list jar file.");
+        }
+
+        out.flush();
+        check(pipedInput.available() > 0);
+    }
+
+    public static void realMain(String[] args) throws Throwable {
+        File tmpJarFile = createJarFile();
+        String tmpJarFilePath = tmpJarFile.getAbsolutePath();
+
+        testJarList(tmpJarFilePath);
+        testJarExtract(tmpJarFilePath);
+    }
+
+
+    //--------------------- Infrastructure ---------------------------
+    static volatile int passed = 0, failed = 0;
+    static void pass() {passed++;}
+    static void fail() {failed++; Thread.dumpStack();}
+    static void fail(String msg) {System.out.println(msg); fail();}
+    static void unexpected(Throwable t) {failed++; t.printStackTrace();}
+    static void check(boolean cond) {if (cond) pass(); else fail();}
+    static void equal(Object x, Object y) {
+        if (x == null ? y == null : x.equals(y)) pass();
+        else fail(x + " not equal to " + y);}
+    public static void main(String[] args) throws Throwable {
+        try {realMain(args);} catch (Throwable t) {unexpected(t);}
+        System.out.println("\nPassed = " + passed + " failed = " + failed);
+        if (failed > 0) throw new AssertionError("Some tests failed");}
+}