changeset 12609:a3dc113274df

Merge
author asaha
date Thu, 26 Jan 2017 12:19:19 -0800
parents d640834171d3 0fce8ee36bfd
children eab784b59659
files .hgtags src/share/lib/security/java.security-aix src/share/lib/security/java.security-linux src/share/lib/security/java.security-macosx src/share/lib/security/java.security-solaris src/share/lib/security/java.security-windows test/sun/security/tools/jarsigner/TimestampCheck.java
diffstat 23 files changed, 621 insertions(+), 231 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Thu Jan 26 17:26:29 2017 +0300
+++ b/.hgtags	Thu Jan 26 12:19:19 2017 -0800
@@ -679,5 +679,9 @@
 9561afc12df843ef21ecd9d7b3633371e7a2bfc4 jdk8u121-b12
 2974746e56192cdd14fc2dd43179bcf28e4faf4a jdk8u121-b13
 032874d46bf95478cb86690b3c91d335c0764b0b jdk8u131-b00
+bea5b22daf5ddd941f3bcbf7a4e5fc5244ceb788 jdk8u131-b01
+a01d217a232906e82f80e5bc3db4d60c4c74716e jdk8u131-b02
+3d2dfed2b420a59c68e5deedd257eb630f88b3da jdk8u131-b03
+0f7d02f565658a89b073ee77c296f33148c50da3 jdk8u131-b04
 a160009bbe1417d85f1c0eec890fdb17391b3637 jdk8u141-b00
 072e084bceeedeb75467e40ca77786ac9ef5227a jdk8u151-b00
--- a/src/macosx/classes/sun/lwawt/LWMouseInfoPeer.java	Thu Jan 26 17:26:29 2017 +0300
+++ b/src/macosx/classes/sun/lwawt/LWMouseInfoPeer.java	Thu Jan 26 12:19:19 2017 -0800
@@ -51,8 +51,12 @@
             return false;
         }
 
-        final Object windowPeer = AWTAccessor.getComponentAccessor().getPeer(w);
-        return LWWindowPeer.getWindowUnderCursor() == windowPeer;
+        LWWindowPeer windowPeer = (LWWindowPeer)AWTAccessor.getComponentAccessor().getPeer(w);
+        if (windowPeer == null) {
+            return false;
+        }
+
+        return LWToolkit.getLWToolkit().getPlatformWindowUnderMouse() == windowPeer.getPlatformWindow();
     }
 
 }
--- a/src/macosx/classes/sun/lwawt/LWToolkit.java	Thu Jan 26 17:26:29 2017 +0300
+++ b/src/macosx/classes/sun/lwawt/LWToolkit.java	Thu Jan 26 12:19:19 2017 -0800
@@ -385,6 +385,8 @@
         return new LWMouseInfoPeer();
     }
 
+    protected abstract PlatformWindow getPlatformWindowUnderMouse();
+
     @Override
     public final PrintJob getPrintJob(Frame frame, String doctitle,
                                       Properties props) {
--- a/src/macosx/classes/sun/lwawt/LWWindowPeer.java	Thu Jan 26 17:26:29 2017 +0300
+++ b/src/macosx/classes/sun/lwawt/LWWindowPeer.java	Thu Jan 26 12:19:19 2017 -0800
@@ -749,11 +749,10 @@
                 lastMouseEventPeer = targetPeer;
             }
         } else {
-            PlatformWindow topmostPlatforWindow =
-                    platformWindow.getTopmostPlatformWindowUnderMouse();
+            PlatformWindow topmostPlatformWindow = LWToolkit.getLWToolkit().getPlatformWindowUnderMouse();
 
             LWWindowPeer topmostWindowPeer =
-                    topmostPlatforWindow != null ? topmostPlatforWindow.getPeer() : null;
+                    topmostPlatformWindow != null ? topmostPlatformWindow.getPeer() : null;
 
             // topmostWindowPeer == null condition is added for the backward
             // compatibility with applets. It can be removed when the
@@ -764,8 +763,7 @@
                         screenX, screenY, modifiers, clickCount, popupTrigger,
                         targetPeer);
             } else {
-                LWComponentPeer<?, ?> topmostTargetPeer =
-                        topmostWindowPeer != null ? topmostWindowPeer.findPeerAt(r.x + x, r.y + y) : null;
+                LWComponentPeer<?, ?> topmostTargetPeer = topmostWindowPeer.findPeerAt(r.x + x, r.y + y);
                 topmostWindowPeer.generateMouseEnterExitEventsForComponents(when, button, x, y,
                         screenX, screenY, modifiers, clickCount, popupTrigger,
                         topmostTargetPeer);
--- a/src/macosx/classes/sun/lwawt/PlatformWindow.java	Thu Jan 26 17:26:29 2017 +0300
+++ b/src/macosx/classes/sun/lwawt/PlatformWindow.java	Thu Jan 26 12:19:19 2017 -0800
@@ -107,8 +107,6 @@
 
     public void setAlwaysOnTop(boolean value);
 
-    public PlatformWindow getTopmostPlatformWindowUnderMouse();
-
     public void updateFocusableWindowState();
 
     public boolean rejectFocusRequest(CausedFocusEvent.Cause cause);
--- a/src/macosx/classes/sun/lwawt/macosx/CPlatformEmbeddedFrame.java	Thu Jan 26 17:26:29 2017 +0300
+++ b/src/macosx/classes/sun/lwawt/macosx/CPlatformEmbeddedFrame.java	Thu Jan 26 12:19:19 2017 -0800
@@ -129,11 +129,6 @@
     @Override
     public void setAlwaysOnTop(boolean value) {}
 
-    // This method should be properly implemented for applets.
-    // It returns null just as a stub.
-    @Override
-    public PlatformWindow getTopmostPlatformWindowUnderMouse() { return null; }
-
     @Override
     public void updateFocusableWindowState() {}
 
--- a/src/macosx/classes/sun/lwawt/macosx/CPlatformLWWindow.java	Thu Jan 26 17:26:29 2017 +0300
+++ b/src/macosx/classes/sun/lwawt/macosx/CPlatformLWWindow.java	Thu Jan 26 12:19:19 2017 -0800
@@ -157,11 +157,6 @@
     }
 
     @Override
-    public PlatformWindow getTopmostPlatformWindowUnderMouse(){
-        return null;
-    }
-
-    @Override
     public void setOpacity(float opacity) {
     }
 
--- a/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java	Thu Jan 26 17:26:29 2017 +0300
+++ b/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java	Thu Jan 26 12:19:19 2017 -0800
@@ -31,6 +31,8 @@
 import java.awt.peer.WindowPeer;
 import java.beans.*;
 import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicLong;
 import java.util.concurrent.atomic.AtomicReference;
@@ -40,6 +42,8 @@
 import javax.swing.*;
 
 import sun.awt.*;
+import sun.awt.AWTAccessor.ComponentAccessor;
+import sun.awt.AWTAccessor.WindowAccessor;
 import sun.java2d.SurfaceData;
 import sun.java2d.opengl.CGLSurfaceData;
 import sun.lwawt.*;
@@ -65,9 +69,9 @@
     private static native void nativeSetEnabled(long nsWindowPtr, boolean isEnabled);
     private static native void nativeSynthesizeMouseEnteredExitedEvents();
     private static native void nativeDispose(long nsWindowPtr);
-    private static native CPlatformWindow nativeGetTopmostPlatformWindowUnderMouse();
     private static native void nativeEnterFullScreenMode(long nsWindowPtr);
     private static native void nativeExitFullScreenMode(long nsWindowPtr);
+    static native CPlatformWindow nativeGetTopmostPlatformWindowUnderMouse();
 
     // Loger to report issues happened during execution but that do not affect functionality
     private static final PlatformLogger logger = PlatformLogger.getLogger("sun.lwawt.macosx.CPlatformWindow");
@@ -208,6 +212,8 @@
     private volatile boolean isFullScreenMode;
     private boolean isFullScreenAnimationOn;
 
+    private volatile boolean isIconifyAnimationActive;
+
     private Window target;
     private LWWindowPeer peer;
     protected CPlatformView contentView;
@@ -769,10 +775,6 @@
         setStyleBits(ALWAYS_ON_TOP, isAlwaysOnTop);
     }
 
-    public PlatformWindow getTopmostPlatformWindowUnderMouse(){
-        return CPlatformWindow.nativeGetTopmostPlatformWindowUnderMouse();
-    }
-
     @Override
     public void setOpacity(float opacity) {
         execute(ptr -> CWrapper.NSWindow.setAlphaValue(ptr, opacity));
@@ -992,6 +994,9 @@
         if (peer != null) {
             peer.notifyIconify(iconify);
         }
+        if (iconify) {
+            isIconifyAnimationActive = false;
+        }
     }
 
     private void deliverZoom(final boolean isZoomed) {
@@ -1061,31 +1066,92 @@
         return true;
     }
 
+    private boolean isIconified() {
+        boolean isIconified = false;
+        if (target instanceof Frame) {
+            int state = ((Frame)target).getExtendedState();
+            if ((state & Frame.ICONIFIED) != 0) {
+                isIconified = true;
+            }
+        }
+        return isIconifyAnimationActive || isIconified;
+    }
+
+    private boolean isOneOfOwnersOrSelf(CPlatformWindow window) {
+        while (window != null) {
+            if (this == window) {
+                return true;
+            }
+            window = window.owner;
+        }
+        return false;
+    }
+
+    private CPlatformWindow getRootOwner() {
+        CPlatformWindow rootOwner = this;
+        while (rootOwner.owner != null) {
+            rootOwner = rootOwner.owner;
+        }
+        return rootOwner;
+    }
+
     private void orderAboveSiblings() {
-        if (owner == null) {
-            return;
+        // Recursively pop up the windows from the very bottom, (i.e. root owner) so that
+        // the windows are ordered above their nearest owner; ancestors of the window,
+        // which is going to become 'main window', are placed above their siblings.
+        CPlatformWindow rootOwner = getRootOwner();
+        if (rootOwner.isVisible() && !rootOwner.isIconified()) {
+            rootOwner.execute(CWrapper.NSWindow::orderFront);
         }
+        // Do not order child windows of iconified owner.
+        if (!rootOwner.isIconified()) {
+            final WindowAccessor windowAccessor = AWTAccessor.getWindowAccessor();
+            orderAboveSiblingsImpl(windowAccessor.getOwnedWindows(rootOwner.target));
+        }
+    }
 
-        // NOTE: the logic will fail if we have a hierarchy like:
-        //       visible root owner
-        //          invisible owner
-        //              visible dialog
-        // However, this is an unlikely scenario for real life apps
-        if (owner.isVisible()) {
-            // Recursively pop up the windows from the very bottom so that only
-            // the very top-most one becomes the main window
-            owner.orderAboveSiblings();
+    private void orderAboveSiblingsImpl(Window[] windows) {
+        ArrayList<Window> childWindows = new ArrayList<Window>();
 
-            // Order the window to front of the stack of child windows
-            owner.execute(nsWindowOwnerPtr->{
-                execute(nsWindowSelfPtr->{
-                    CWrapper.NSWindow.orderFront(nsWindowOwnerPtr);
-                    CWrapper.NSWindow.orderWindow(nsWindowSelfPtr, CWrapper.NSWindow.NSWindowAbove, nsWindowOwnerPtr);
-                });
-            });
+        final ComponentAccessor componentAccessor = AWTAccessor.getComponentAccessor();
+        final WindowAccessor windowAccessor = AWTAccessor.getWindowAccessor();
+
+        // Go through the list of windows and perform ordering.
+        for (Window w : windows) {
+            boolean iconified = false;
+            final Object p = componentAccessor.getPeer(w);
+            if (p instanceof LWWindowPeer) {
+                CPlatformWindow pw = (CPlatformWindow)((LWWindowPeer)p).getPlatformWindow();
+                iconified = isIconified();
+                if (pw != null && pw.isVisible() && !iconified) {
+                    // If the window is one of ancestors of 'main window' or is going to become main by itself,
+                    // the window should be ordered above its siblings; otherwise the window is just ordered
+                    // above its nearest parent.
+                    if (pw.isOneOfOwnersOrSelf(this)) {
+                        pw.execute(CWrapper.NSWindow::orderFront);
+                    } else {
+                        pw.owner.execute(ownerPtr -> {
+                            pw.execute(ptr -> {
+                                CWrapper.NSWindow.orderWindow(ptr, CWrapper.NSWindow.NSWindowAbove, ownerPtr);
+                            });
+                        });
+                    }
+                    pw.applyWindowLevel(w);
+                }
+            }
+            // Retrieve the child windows for each window from the list except iconified ones
+            // and store them for future use.
+            // Note: we collect data about child windows even for invisible owners, since they may have
+            // visible children.
+            if (!iconified) {
+                childWindows.addAll(Arrays.asList(windowAccessor.getOwnedWindows(w)));
+            }
         }
-
-        applyWindowLevel(target);
+        // If some windows, which have just been ordered, have any child windows, let's start new iteration
+        // and order these child windows.
+        if (!childWindows.isEmpty()) {
+            orderAboveSiblingsImpl(childWindows.toArray(new Window[0]));
+        }
     }
 
     protected void applyWindowLevel(Window target) {
@@ -1100,6 +1166,10 @@
     //                          NATIVE CALLBACKS
     // ----------------------------------------------------------------------
 
+    private void windowWillMiniaturize() {
+        isIconifyAnimationActive = true;
+    }
+
     private void windowDidBecomeMain() {
         assert CThreading.assertAppKit();
 
--- a/src/macosx/classes/sun/lwawt/macosx/CRobot.java	Thu Jan 26 17:26:29 2017 +0300
+++ b/src/macosx/classes/sun/lwawt/macosx/CRobot.java	Thu Jan 26 12:19:19 2017 -0800
@@ -78,7 +78,7 @@
     @Override
     public void mousePress(int buttons) {
         mouseButtonsState |= buttons;
-
+        checkMousePos();
         mouseEvent(fDevice.getCGDisplayID(), mouseLastX, mouseLastY,
                    buttons, true, false);
     }
@@ -92,11 +92,40 @@
     @Override
     public void mouseRelease(int buttons) {
         mouseButtonsState &= ~buttons;
-
+        checkMousePos();
         mouseEvent(fDevice.getCGDisplayID(), mouseLastX, mouseLastY,
                    buttons, false, false);
     }
 
+    /**
+     * Set unknown mouse location, if needed.
+     */
+    private void checkMousePos() {
+        if (mouseLastX == MOUSE_LOCATION_UNKNOWN ||
+                mouseLastY == MOUSE_LOCATION_UNKNOWN) {
+
+            Rectangle deviceBounds = fDevice.getDefaultConfiguration().getBounds();
+            Point mousePos = CCursorManager.getInstance().getCursorPosition();
+
+            if (mousePos.x < deviceBounds.x) {
+                mousePos.x = deviceBounds.x;
+            }
+            else if (mousePos.x > deviceBounds.x + deviceBounds.width) {
+                mousePos.x = deviceBounds.x + deviceBounds.width;
+            }
+
+            if (mousePos.y < deviceBounds.y) {
+                mousePos.y = deviceBounds.y;
+            }
+            else if (mousePos.y > deviceBounds.y + deviceBounds.height) {
+                mousePos.y = deviceBounds.y + deviceBounds.height;
+            }
+
+            mouseLastX = mousePos.x;
+            mouseLastY = mousePos.y;
+        }
+    }
+
     @Override
     public native void mouseWheel(int wheelAmt);
 
--- a/src/macosx/classes/sun/lwawt/macosx/CViewPlatformEmbeddedFrame.java	Thu Jan 26 17:26:29 2017 +0300
+++ b/src/macosx/classes/sun/lwawt/macosx/CViewPlatformEmbeddedFrame.java	Thu Jan 26 12:19:19 2017 -0800
@@ -144,11 +144,6 @@
     }
 
     @Override
-    public PlatformWindow getTopmostPlatformWindowUnderMouse() {
-        return null;
-    }
-
-    @Override
     public void updateFocusableWindowState() {
     }
 
--- a/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java	Thu Jan 26 17:26:29 2017 +0300
+++ b/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java	Thu Jan 26 12:19:19 2017 -0800
@@ -917,4 +917,9 @@
                 !path.endsWith("/") &&
                 !path.endsWith(".");
     }
+
+    @Override
+    protected PlatformWindow getPlatformWindowUnderMouse() {
+        return CPlatformWindow.nativeGetTopmostPlatformWindowUnderMouse();
+    }
 }
--- a/src/macosx/native/sun/awt/AWTWindow.m	Thu Jan 26 17:26:29 2017 +0300
+++ b/src/macosx/native/sun/awt/AWTWindow.m	Thu Jan 26 12:19:19 2017 -0800
@@ -326,10 +326,44 @@
     return [window isKindOfClass: [AWTWindow_Panel class]] || [window isKindOfClass: [AWTWindow_Normal class]];
 }
 
+// Retrieves the list of possible window layers (levels)
++ (NSArray*) getWindowLayers {
+    static NSArray *windowLayers;
+    static dispatch_once_t token;
+ 
+    // Initialize the list of possible window layers
+    dispatch_once(&token, ^{
+        // The layers are ordered from front to back, (i.e. the toppest one is the first)
+        windowLayers = [NSArray arrayWithObjects:
+                            [NSNumber numberWithInt:CGWindowLevelForKey(kCGPopUpMenuWindowLevelKey)],
+                            [NSNumber numberWithInt:CGWindowLevelForKey(kCGFloatingWindowLevelKey)],
+                            [NSNumber numberWithInt:CGWindowLevelForKey(kCGNormalWindowLevelKey)],
+                            nil
+                       ];
+        [windowLayers retain];
+    });
+    return windowLayers;
+}
+
+
 // returns id for the topmost window under mouse
 + (NSInteger) getTopmostWindowUnderMouseID {
     NSInteger result = -1;
-    
+
+    NSArray *windowLayers = [AWTWindow getWindowLayers];
+    // Looking for the window under mouse starting from the toppest layer
+    for (NSNumber *layer in windowLayers) {
+        result = [AWTWindow getTopmostWindowUnderMouseIDImpl:[layer integerValue]];
+        if (result != -1) {
+            break;
+        }
+    }
+    return result;
+}
+
++ (NSInteger) getTopmostWindowUnderMouseIDImpl:(NSInteger)windowLayer {
+    NSInteger result = -1;    
+
     NSRect screenRect = [[NSScreen mainScreen] frame];
     NSPoint nsMouseLocation = [NSEvent mouseLocation];
     CGPoint cgMouseLocation = CGPointMake(nsMouseLocation.x, screenRect.size.height - nsMouseLocation.y);
@@ -338,7 +372,7 @@
 
     for (NSDictionary *window in windows) {
         NSInteger layer = [[window objectForKey:(id)kCGWindowLayer] integerValue];
-        if (layer == 0) {
+        if (layer == windowLayer) {
             CGRect rect;
             CGRectMakeWithDictionaryRepresentation((CFDictionaryRef)[window objectForKey:(id)kCGWindowBounds], &rect);
             if (CGRectContainsPoint(rect, cgMouseLocation)) {
@@ -614,6 +648,14 @@
 AWT_ASSERT_APPKIT_THREAD;
 
     self.isMinimizing = YES;
+
+    JNIEnv *env = [ThreadUtilities getJNIEnv];
+    jobject platformWindow = [self.javaPlatformWindow jObjectWithEnv:env];
+    if (platformWindow != NULL) {
+        static JNF_MEMBER_CACHE(jm_windowWillMiniaturize, jc_CPlatformWindow, "windowWillMiniaturize", "()V");
+        JNFCallVoidMethod(env, platformWindow, jm_windowWillMiniaturize);
+        (*env)->DeleteLocalRef(env, platformWindow);
+    }
     // Excplicitly make myself a key window to avoid possible
     // negative visual effects during iconify operation
     [self.nsWindow makeKeyAndOrderFront:self.nsWindow];
@@ -1255,15 +1297,16 @@
 JNICALL Java_sun_lwawt_macosx_CPlatformWindow_nativeGetTopmostPlatformWindowUnderMouse
 (JNIEnv *env, jclass clazz)
 {
-    jobject topmostWindowUnderMouse = nil;
+    __block jobject topmostWindowUnderMouse = nil;
 
     JNF_COCOA_ENTER(env);
-    AWT_ASSERT_APPKIT_THREAD;
 
-    AWTWindow *awtWindow = [AWTWindow getTopmostWindowUnderMouse];
-    if (awtWindow != nil) {
-        topmostWindowUnderMouse = [awtWindow.javaPlatformWindow jObject];
-    }
+    [ThreadUtilities performOnMainThreadWaiting:YES block:^{
+        AWTWindow *awtWindow = [AWTWindow getTopmostWindowUnderMouse];
+        if (awtWindow != nil) {
+            topmostWindowUnderMouse = [awtWindow.javaPlatformWindow jObject];
+        }
+    }];
 
     JNF_COCOA_EXIT(env);
 
--- a/src/macosx/native/sun/awt/CCursorManager.m	Thu Jan 26 17:26:29 2017 +0300
+++ b/src/macosx/native/sun/awt/CCursorManager.m	Thu Jan 26 12:19:19 2017 -0800
@@ -118,13 +118,11 @@
 
 JNF_COCOA_ENTER(env);
 
-    __block NSPoint pt = NSZeroPoint;
-    
-    [ThreadUtilities performOnMainThreadWaiting:YES block:^(){
-            pt = ConvertNSScreenPoint(env, [NSEvent mouseLocation]);
-    }];
-    
-    jpt = NSToJavaPoint(env, pt);
+    CGEventRef event = CGEventCreate(NULL);
+    CGPoint globalPos = CGEventGetLocation(event);
+    CFRelease(event);
+
+    jpt = NSToJavaPoint(env, globalPos);
 
 JNF_COCOA_EXIT(env);
 
--- a/src/macosx/native/sun/awt/CRobot.m	Thu Jan 26 17:26:29 2017 +0300
+++ b/src/macosx/native/sun/awt/CRobot.m	Thu Jan 26 12:19:19 2017 -0800
@@ -146,47 +146,10 @@
 
     // This is the native method called when Robot mouse events occur.
     // The CRobot tracks the mouse position, and which button was
-    // pressed. If the mouse position is unknown it is obtained from
-    // CGEvents. The peer also tracks the mouse button desired state,
+    // pressed. The peer also tracks the mouse button desired state,
     // the appropriate key modifier state, and whether the mouse action
     // is simply a mouse move with no mouse button state changes.
 
-    CGError err = kCGErrorSuccess;
-
-    CGRect globalDeviceBounds = CGDisplayBounds(displayID);
-
-    // Set unknown mouse location, if needed.
-    if ((mouseLastX == sun_lwawt_macosx_CRobot_MOUSE_LOCATION_UNKNOWN) ||
-        (mouseLastY == sun_lwawt_macosx_CRobot_MOUSE_LOCATION_UNKNOWN))
-    {
-        CGEventRef event = CGEventCreate(NULL);
-        if (event == NULL) {
-            return;
-        }
-
-        CGPoint globalPos = CGEventGetLocation(event);
-        CFRelease(event);
-
-        // Normalize the coords within this display device, as
-        // per Robot rules.
-        if (globalPos.x < CGRectGetMinX(globalDeviceBounds)) {
-            globalPos.x = CGRectGetMinX(globalDeviceBounds);
-        }
-        else if (globalPos.x > CGRectGetMaxX(globalDeviceBounds)) {
-            globalPos.x = CGRectGetMaxX(globalDeviceBounds);
-        }
-
-        if (globalPos.y < CGRectGetMinY(globalDeviceBounds)) {
-            globalPos.y = CGRectGetMinY(globalDeviceBounds);
-        }
-        else if (globalPos.y > CGRectGetMaxY(globalDeviceBounds)) {
-            globalPos.y = CGRectGetMaxY(globalDeviceBounds);
-        }
-
-        mouseLastX = (jint)globalPos.x;
-        mouseLastY = (jint)globalPos.y;
-    }
-
     // volatile, otherwise it warns that it might be clobbered by 'longjmp'
     volatile CGPoint point;
 
--- a/src/share/classes/java/awt/Window.java	Thu Jan 26 17:26:29 2017 +0300
+++ b/src/share/classes/java/awt/Window.java	Thu Jan 26 12:19:19 2017 -0800
@@ -4100,6 +4100,10 @@
             public void setTrayIconWindow(Window w, boolean isTrayIconWindow) {
                 w.isTrayIconWindow = isTrayIconWindow;
             }
+
+            public Window[] getOwnedWindows(Window w) {
+                return w.getOwnedWindows_NoClientCode();
+            }
         }); // WindowAccessor
     } // static
 
--- a/src/share/classes/sun/awt/AWTAccessor.java	Thu Jan 26 17:26:29 2017 +0300
+++ b/src/share/classes/sun/awt/AWTAccessor.java	Thu Jan 26 12:19:19 2017 -0800
@@ -334,6 +334,12 @@
          * Marks the specified window as an utility window for TrayIcon.
          */
         void setTrayIconWindow(Window w, boolean isTrayIconWindow);
+
+        /**
+         * Return an array containing all the windows this
+         * window currently owns.
+         */
+        Window[] getOwnedWindows(Window w);
     }
 
     /**
--- a/src/share/classes/sun/security/smartcardio/TerminalImpl.java	Thu Jan 26 17:26:29 2017 +0300
+++ b/src/share/classes/sun/security/smartcardio/TerminalImpl.java	Thu Jan 26 12:19:19 2017 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2016, 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
@@ -75,10 +75,10 @@
             }
         }
         try {
-            card =  new CardImpl(this, protocol);
+            card = new CardImpl(this, protocol);
             return card;
         } catch (PCSCException e) {
-            if (e.code == SCARD_W_REMOVED_CARD) {
+            if (e.code == SCARD_W_REMOVED_CARD || e.code == SCARD_E_NO_SMARTCARD) {
                 throw new CardNotPresentException("No card present", e);
             } else {
                 throw new CardException("connect() failed", e);
--- a/test/TEST.groups	Thu Jan 26 17:26:29 2017 +0300
+++ b/test/TEST.groups	Thu Jan 26 12:19:19 2017 -0800
@@ -394,6 +394,7 @@
   javax/management/mxbean/LeakTest.java \
   javax/management/mxbean/MXBeanTest.java \
   javax/management/mxbean/PropertyNamesTest.java \
+  javax/xml/bind/marshal/8134111/UnmarshalTest.java \
   javax/xml/ws/8043129 \
   jdk/lambda/vm/InterfaceAccessFlagsTest.java \
   sun/misc/URLClassPath/ClassnameCharTest.java \
@@ -566,6 +567,7 @@
   java/net/HttpCookie/IllegalCookieNameTest.java \
   java/net/HttpURLConnection/UnmodifiableMaps.java \
   java/net/ResponseCache/Test.java \
+  java/net/SetFactoryPermission/SetFactoryPermission.java \
   java/net/URLClassLoader/ClassLoad.java \
   java/net/URLClassLoader/closetest/CloseTest.java \
   java/net/URLPermission/URLTest.java \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/xml/jaxp/transform/8167179/NamespacePrefixTest.java	Thu Jan 26 12:19:19 2017 -0800
@@ -0,0 +1,188 @@
+/*
+ * Copyright (c) 2016, 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.io.StringReader;
+import java.io.StringWriter;
+import java.util.concurrent.CyclicBarrier;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import javax.xml.transform.Source;
+import javax.xml.transform.Templates;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+import org.testng.annotations.Test;
+import static org.testng.Assert.assertTrue;
+
+/*
+ * @test
+ * @bug 8167179
+ * @run testng/othervm NamespacePrefixTest
+ * @summary This class tests the generation of namespace prefixes
+ */
+public class NamespacePrefixTest {
+
+    @Test
+    public void testReuseTemplates() throws Exception {
+        final TransformerFactory tf = TransformerFactory.newInstance();
+        final Source xslsrc = new StreamSource(new StringReader(XSL));
+        final Templates tmpl = tf.newTemplates(xslsrc);
+        for (int i = 0; i < TRANSF_COUNT; i++) {
+            checkResult(doTransformation(tmpl.newTransformer()));
+        }
+    }
+
+    @Test
+    public void testReuseTransformer() throws Exception {
+        final TransformerFactory tf = TransformerFactory.newInstance();
+        final Source xslsrc = new StreamSource(new StringReader(XSL));
+        final Transformer t = tf.newTransformer(xslsrc);
+        for (int i = 0; i < TRANSF_COUNT; i++) {
+            checkResult(doTransformation(t));
+        }
+    }
+
+    @Test
+    public void testConcurrentTransformations() throws Exception {
+        final TransformerFactory tf = TransformerFactory.newInstance();
+        final Source xslsrc = new StreamSource(new StringReader(XSL));
+        final Templates tmpl = tf.newTemplates(xslsrc);
+        concurrentTestPassed.set(true);
+
+        // Execute multiple TestWorker tasks
+        for (int id = 0; id < THREADS_COUNT; id++) {
+            EXECUTOR.execute(new TransformerThread(tmpl.newTransformer(), id));
+        }
+        // Initiate shutdown of previously submitted task
+        EXECUTOR.shutdown();
+        // Wait for termination of submitted tasks
+        if (!EXECUTOR.awaitTermination(THREADS_COUNT, TimeUnit.SECONDS)) {
+            // If not all tasks terminates during the time out force them to shutdown
+            EXECUTOR.shutdownNow();
+        }
+        // Check if all transformation threads generated the correct namespace prefix
+        assertTrue(concurrentTestPassed.get());
+    }
+
+    // Do one transformation with the provided transformer
+    private static String doTransformation(Transformer t) throws Exception {
+        StringWriter resWriter = new StringWriter();
+        Source xmlSrc = new StreamSource(new StringReader(XML));
+        t.transform(xmlSrc, new StreamResult(resWriter));
+        return resWriter.toString();
+    }
+
+    // Check if the transformation result string contains the
+    // element with the exact namespace prefix generated.
+    private static void checkResult(String result) {
+        // Check prefix of 'Element2' element, it should always be the same
+        assertTrue(result.contains(EXPECTED_CONTENT));
+    }
+
+    // Check if the transformation result string contains the element with
+    // the exact namespace prefix generated by current thread.
+    // If the expected prefix is not found and there was no failures observed by
+    // other test threads then mark concurrent test as failed.
+    private static void checkThreadResult(String result, int id) {
+        boolean res = result.contains(EXPECTED_CONTENT);
+        System.out.printf("%d: transformation result: %s%n", id, res ? "Pass" : "Fail");
+        if (!res) {
+            System.out.printf("%d result:%s%n", id, result);
+        }
+        concurrentTestPassed.compareAndSet(true, res);
+    }
+
+    // TransformerThread task that does the transformation similar
+    // to testReuseTransformer test method
+    private class TransformerThread implements Runnable {
+
+        private final Transformer transformer;
+        private final int id;
+
+        TransformerThread(Transformer transformer, int id) {
+            this.transformer = transformer;
+            this.id = id;
+        }
+
+        @Override
+        public void run() {
+            try {
+                System.out.printf("%d: waiting for barrier%n", id);
+                //Synchronize startup of all tasks
+                BARRIER.await();
+                System.out.printf("%d: starting transformation%n", id);
+                checkThreadResult(doTransformation(transformer), id);
+            } catch (Exception ex) {
+                throw new RuntimeException("TransformerThread " + id + " failed", ex);
+            }
+        }
+    }
+
+    // Number of subsequent transformations
+    private static final int TRANSF_COUNT = 10;
+
+    // Number of transformer threads running concurently
+    private static final int THREADS_COUNT = 10;
+
+    // Variable for storing the concurrent transformation test result. It is
+    // updated by transformer threads
+    private static final AtomicBoolean concurrentTestPassed = new AtomicBoolean(true);
+
+    // Cyclic barrier for threads startup synchronization
+    private static final CyclicBarrier BARRIER = new CyclicBarrier(THREADS_COUNT);
+
+    // Thread pool
+    private static final ExecutorService EXECUTOR = Executors.newCachedThreadPool();
+
+    // XSL that transforms XML and produces unique namespace prefixes for each element
+    private final static String XSL = "<xsl:stylesheet version=\"1.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\">\n"
+            + " <xsl:template match=\"node()|@*\" priority=\"1\">\n"
+            + "     <xsl:copy>\n"
+            + "       <xsl:apply-templates select=\"node()|@*\"/>\n"
+            + "     </xsl:copy>\n"
+            + " </xsl:template>\n"
+            + " <xsl:template match=\"*\" priority=\"2\">\n"
+            + "  <xsl:element name=\"{name()}\" namespace=\"{namespace-uri()}\">\n"
+            + "   <xsl:apply-templates select=\"node()|@*\"/>\n"
+            + "  </xsl:element>\n"
+            + " </xsl:template>\n"
+            + "</xsl:stylesheet>";
+
+    // Simple XML content with root and two child elements
+    private final static String XML = "<TestRoot xmlns=\"test.xmlns\">\n"
+            + "  <Element1 xmlns=\"test.xmlns\">\n"
+            + "  </Element1>\n"
+            + "  <Element2 xmlns=\"test.xmlns\">\n"
+            + "  </Element2>\n"
+            + "</TestRoot>";
+
+    // With thread local namespace prefix index each transformation result should
+    // be the same and contain the same prefix for Element2
+    private final static String EXPECTED_CONTENT = "</ns2:Element2>";
+
+}
--- a/test/sun/misc/URLClassPath/ClassnameCharTest.java	Thu Jan 26 17:26:29 2017 +0300
+++ b/test/sun/misc/URLClassPath/ClassnameCharTest.java	Thu Jan 26 12:19:19 2017 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2016, 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
@@ -102,16 +102,60 @@
 
     //--------------------- Infrastructure ---------------------------
     static volatile int passed = 0, failed = 0;
-    static boolean pass() {passed++; return true;}
-    static boolean fail() {failed++; server.stop(0); Thread.dumpStack(); return false;}
-    static boolean fail(String msg) {System.out.println(msg); return fail();}
-    static void unexpected(Throwable t) {failed++; server.stop(0); t.printStackTrace();}
-    static boolean check(boolean cond) {if (cond) pass(); else fail(); return cond;}
+
+    static boolean pass() {
+        passed++;
+        return true;
+    }
+
+    static boolean fail() {
+        failed++;
+        if (server != null) {
+            server.stop(0);
+        }
+        Thread.dumpStack();
+        return false;
+    }
+
+    static boolean fail(String msg) {
+        System.out.println(msg);
+        return fail();
+    }
+
+    static void unexpected(Throwable t) {
+        failed++;
+        if (server != null) {
+            server.stop(0);
+        }
+        t.printStackTrace();
+    }
+
+    static boolean check(boolean cond) {
+        if (cond) {
+            pass();
+        } else {
+            fail();
+        }
+        return cond;
+    }
+
     static boolean equal(Object x, Object y) {
-        if (x == null ? y == null : x.equals(y)) return pass();
-        else return fail(x + " not equal to " + y);}
+        if (x == null ? y == null : x.equals(y)) {
+            return pass();
+        } else {
+            return fail(x + " not equal to " + y);
+        }
+    }
+
     public static void main(String[] args) throws Throwable {
-        try {realMain(args);} catch (Throwable t) {unexpected(t);}
+        try {
+            realMain(args);
+        } catch (Throwable t) {
+            unexpected(t);
+        }
         System.out.println("\nPassed = " + passed + " failed = " + failed);
-        if (failed > 0) throw new AssertionError("Some tests failed");}
+        if (failed > 0) {
+            throw new AssertionError("Some tests failed");
+        }
+    }
 }
--- a/test/sun/net/www/protocol/http/HttpInputStream.java	Thu Jan 26 17:26:29 2017 +0300
+++ b/test/sun/net/www/protocol/http/HttpInputStream.java	Thu Jan 26 12:19:19 2017 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2016, 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,77 +23,95 @@
 
 /* @test
  * @bug 4937598
- * @summary http://www.clipstream.com vedio does not play; read() problem
+ * @summary http://www.clipstream.com video does not play; read() problem
  */
-import java.util.*;
-import java.io.*;
-import java.net.*;
-import java.text.*;
 
-public class HttpInputStream implements Runnable {
 
-  ServerSocket serverSock;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.net.URL;
 
-  public void run() {
-      try {
-          Socket s = serverSock.accept();
-          InputStream in = s.getInputStream();
-          byte b[] = new byte[4096];
+public class HttpInputStream {
 
-          // assume we read the entire http request
-          // (bad assumption but okay for test case)
-          int nread = in.read(b);
+    private static final int CONTENT_LENGTH = 20;
 
-          OutputStream o = s.getOutputStream();
+    static class Server implements AutoCloseable, Runnable {
 
-          o.write( "HTTP/1.1 200 OK".getBytes() );
-          o.write( "Content-Length: 20".getBytes() );
-          o.write( (byte)'\r' );
-          o.write( (byte)'\n' );
-          o.write( (byte)'\r' );
-          o.write( (byte)'\n' );
+        final ServerSocket serverSocket;
+        static final byte[] requestEnd = new byte[]{'\r', '\n', '\r', '\n'};
+        static final int TIMEOUT = 10 * 1000;
 
-          for (int i = 0; i < 20; i++) {
-              o.write((byte)0xff);
-          }
+        Server() throws IOException {
+            serverSocket = new ServerSocket(0);
+        }
 
-          o.flush();
-          o.close();
+        void readOneRequest(InputStream is) throws IOException {
+            int requestEndCount = 0, r;
+            while ((r = is.read()) != -1) {
+                if (r == requestEnd[requestEndCount]) {
+                    requestEndCount++;
+                    if (requestEndCount == 4) {
+                        break;
+                    }
+                } else {
+                    requestEndCount = 0;
+                }
+            }
+        }
 
-      } catch (Exception e) { }
-  }
+        @Override
+        public void run() {
+            try (Socket s = serverSocket.accept()) {
+                s.setSoTimeout(TIMEOUT);
+                readOneRequest(s.getInputStream());
+                try (OutputStream os =
+                             s.getOutputStream()) {
+                    os.write("HTTP/1.1 200 OK".getBytes());
+                    os.write(("Content-Length: " + CONTENT_LENGTH).getBytes());
+                    os.write("\r\n\r\n".getBytes());
+                    for (int i = 0; i < CONTENT_LENGTH; i++) {
+                        os.write(0xff);
+                    }
+                    os.flush();
+                }
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
 
+        @Override
+        public void close() throws IOException {
+            if (!serverSocket.isClosed()) {
+                serverSocket.close();
+            }
+        }
 
-  public HttpInputStream() throws Exception {
+        public int getPort() {
+            return serverSocket.getLocalPort();
+        }
+    }
 
-     serverSock = new ServerSocket(0);
-     int port = serverSock.getLocalPort();
 
-     Thread thr = new Thread(this);
-     thr.start();
+    private static int read(InputStream is) throws IOException {
+        int len = 0;
+        while (is.read() != -1) {
+            len++;
+        }
+        return len;
+    }
 
-     Date date = new Date(new Date().getTime()-1440000); // this time yesterday
-     URL url;
-     HttpURLConnection con;
-
-     url = new URL("http://localhost:" + String.valueOf(port) +
-                   "/anything");
-     con = (HttpURLConnection)url.openConnection();
-
-     int ret = con.getResponseCode();
-     byte[] b = new byte[20];
-     InputStream is = con.getInputStream();
-     int i = 0, count = 0;
-     while ((i = is.read()) != -1) {
-         System.out.println("i = "+i);
-         count++;
-     }
-     if (count != 20) {
-         throw new RuntimeException("HttpInputStream.read() failed with 0xff");
-     }
-  }
-
-  public static void main(String args[]) throws Exception {
-      new HttpInputStream();
-  }
+    public static void main(String args[]) throws IOException {
+        try (Server server = new Server()) {
+            (new Thread(server)).start();
+            URL url = new URL("http://localhost:" + server.getPort() + "/anything");
+            try (InputStream is = url.openConnection().getInputStream()) {
+                if (read(is) != CONTENT_LENGTH) {
+                    throw new RuntimeException("HttpInputStream.read() failed with 0xff");
+                }
+            }
+        }
+    }
 }
--- a/test/sun/security/krb5/auto/UnboundSSL.java	Thu Jan 26 17:26:29 2017 +0300
+++ b/test/sun/security/krb5/auto/UnboundSSL.java	Thu Jan 26 12:19:19 2017 -0800
@@ -34,9 +34,9 @@
  * @bug 8025123
  * @summary Checks if an unbound server can handle connections
  *          only for allowed service principals
- * @run main/othervm/policy=unbound.ssl.policy UnboundSSL
+ * @run main/othervm/java.security.policy=unbound.ssl.policy UnboundSSL
  *                              unbound.ssl.jaas.conf server_star
- * @run main/othervm/policy=unbound.ssl.policy UnboundSSL
+ * @run main/othervm/java.security.policy=unbound.ssl.policy UnboundSSL
  *                              unbound.ssl.jaas.conf server_multiple_principals
  */
 public class UnboundSSL {
--- a/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/SSLSocketImpl/CloseSocket.java	Thu Jan 26 17:26:29 2017 +0300
+++ b/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/SSLSocketImpl/CloseSocket.java	Thu Jan 26 12:19:19 2017 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2016, 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
@@ -26,67 +26,96 @@
  * @bug 4674913
  * @summary Verify that EOFException are correctly handled during the handshake
  * @author Andreas Sterbenz
+ * @run main/othervm CloseSocket
  */
 
-import java.io.*;
-import java.net.*;
-
-import javax.net.ssl.*;
+import javax.net.SocketFactory;
+import javax.net.ssl.SSLSocket;
+import javax.net.ssl.SSLSocketFactory;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.util.ArrayList;
 
 public class CloseSocket {
 
+    private static ArrayList<TestCase> testCases = new ArrayList<>();
+
+    static {
+        testCases.add(socket -> socket.startHandshake());
+        testCases.add(socket -> {
+            InputStream in = socket.getInputStream();
+            in.read();
+        });
+        testCases.add(socket -> {
+            OutputStream out = socket.getOutputStream();
+            out.write(43);
+        });
+    }
+
     public static void main(String[] args) throws Exception {
-        final ServerSocket serverSocket = new ServerSocket(0);
-        int serverPort = serverSocket.getLocalPort();
-        new Thread() {
-            public void run() {
-                try {
-                    Socket s = serverSocket.accept();
-                    System.out.println("Server accepted connection");
-                    // wait a bit before closing the socket to give
-                    // the client time to send its hello message
-                    Thread.currentThread().sleep(100);
-                    s.close();
-                    System.out.println("Server closed socket, done.");
-                } catch (Exception e) {
-                    System.out.println("Server exception:");
-                    e.printStackTrace();
+        try (Server server = new Server()) {
+            new Thread(server).start();
+
+            SocketFactory factory = SSLSocketFactory.getDefault();
+            try (SSLSocket socket = (SSLSocket) factory.createSocket("localhost",
+                    server.getPort())) {
+                socket.setSoTimeout(2000);
+                System.out.println("Client established TCP connection");
+                boolean failed = false;
+                for (TestCase testCase : testCases) {
+                    try {
+                        testCase.test(socket);
+                        System.out.println("ERROR: no exception");
+                        failed = true;
+                    } catch (IOException e) {
+                        System.out.println("Failed as expected: " + e);
+                    }
+                }
+                if (failed) {
+                    throw new Exception("One or more tests failed");
                 }
             }
-        }.start();
-        SSLSocketFactory factory = (SSLSocketFactory)SSLSocketFactory.getDefault();
-        SSLSocket socket = (SSLSocket)factory.createSocket("localhost", serverPort);
-        System.out.println("Client established TCP connection");
-        boolean failed = false;
-        try {
-            System.out.println("Starting handshake...");
-            socket.startHandshake();
-            System.out.println("ERROR: no exception");
-            failed = true;
-        } catch (IOException e) {
-            System.out.println("Failed as expected: " + e);
-        }
-        try {
-            System.out.println("Trying read...");
-            InputStream in = socket.getInputStream();
-            int b = in.read();
-            System.out.println("ERROR: no exception, read: " + b);
-            failed = true;
-        } catch (IOException e) {
-            System.out.println("Failed as expected: " + e);
-        }
-        try {
-            System.out.println("Trying read...");
-            OutputStream out = socket.getOutputStream();
-            out.write(43);
-            System.out.println("ERROR: no exception");
-            failed = true;
-        } catch (IOException e) {
-            System.out.println("Failed as expected: " + e);
-        }
-        if (failed) {
-            throw new Exception("One or more tests failed");
         }
     }
 
+    static class Server implements AutoCloseable, Runnable {
+
+        final ServerSocket serverSocket;
+
+        Server() throws IOException {
+            serverSocket = new ServerSocket(0);
+        }
+
+        public int getPort() {
+            return serverSocket.getLocalPort();
+        }
+
+        @Override
+        public void run() {
+            try (Socket s = serverSocket.accept()) {
+                System.out.println("Server accepted connection");
+                // wait a bit before closing the socket to give
+                // the client time to send its hello message
+                Thread.currentThread().sleep(100);
+                s.close();
+                System.out.println("Server closed socket, done.");
+            } catch (Exception e) {
+                throw new RuntimeException("Problem in test execution", e);
+            }
+        }
+
+        @Override
+        public void close() throws Exception {
+            if (!serverSocket.isClosed()) {
+                serverSocket.close();
+            }
+        }
+    }
+
+    interface TestCase {
+        void test(SSLSocket socket) throws IOException;
+    }
 }