Merge
authorprr
Fri, 02 Feb 2018 10:32:59 -0800
changeset 48736 0454688cc319
parent 48735 7c63eefd620a (diff)
parent 48724 9a00756a58d0 (current diff)
child 48737 7c12219870fd
child 49079 05077701f689
Merge
test/jdk/ProblemList.txt
--- a/src/java.desktop/macosx/classes/com/apple/laf/AquaMenuBarBorder.java	Fri Feb 02 10:31:05 2018 -0800
+++ b/src/java.desktop/macosx/classes/com/apple/laf/AquaMenuBarBorder.java	Fri Feb 02 10:32:59 2018 -0800
@@ -31,13 +31,14 @@
 import java.awt.Insets;
 
 import javax.swing.border.Border;
+import javax.swing.plaf.UIResource;
 
 import sun.swing.SwingUtilities2;
 
 /**
  * The class represents the border of a {@code JMenuBar}.
  */
-public class AquaMenuBarBorder implements Border {
+public class AquaMenuBarBorder implements Border, UIResource {
 
     @Override
     public void paintBorder(final Component c, final Graphics g, final int x,
--- a/src/java.desktop/share/classes/com/sun/imageio/plugins/png/PNGImageReader.java	Fri Feb 02 10:31:05 2018 -0800
+++ b/src/java.desktop/share/classes/com/sun/imageio/plugins/png/PNGImageReader.java	Fri Feb 02 10:32:59 2018 -0800
@@ -428,12 +428,16 @@
 
     private void parse_iCCP_chunk(int chunkLength) throws IOException {
         String keyword = readNullTerminatedString("ISO-8859-1", 80);
+        int compressedProfileLength = chunkLength - keyword.length() - 2;
+        if (compressedProfileLength <= 0) {
+            throw new IIOException("iCCP chunk length is not proper");
+        }
         metadata.iCCP_profileName = keyword;
 
         metadata.iCCP_compressionMethod = stream.readUnsignedByte();
 
         byte[] compressedProfile =
-          new byte[chunkLength - keyword.length() - 2];
+          new byte[compressedProfileLength];
         stream.readFully(compressedProfile);
         metadata.iCCP_compressedProfile = compressedProfile;
 
@@ -463,7 +467,11 @@
 
         String text;
         pos = stream.getStreamPosition();
-        byte[] b = new byte[(int)(chunkStart + chunkLength - pos)];
+        int textLength = (int)(chunkStart + chunkLength - pos);
+        if (textLength <= 0) {
+            throw new IIOException("iTXt chunk length is not proper");
+        }
+        byte[] b = new byte[textLength];
         stream.readFully(b);
 
         if (compressionFlag == 1) { // Decompress the text
@@ -515,12 +523,16 @@
     private void parse_sPLT_chunk(int chunkLength)
         throws IOException, IIOException {
         metadata.sPLT_paletteName = readNullTerminatedString("ISO-8859-1", 80);
-        chunkLength -= metadata.sPLT_paletteName.length() + 1;
+        int remainingChunkLength = chunkLength -
+                (metadata.sPLT_paletteName.length() + 1);
+        if (remainingChunkLength <= 0) {
+            throw new IIOException("sPLT chunk length is not proper");
+        }
 
         int sampleDepth = stream.readUnsignedByte();
         metadata.sPLT_sampleDepth = sampleDepth;
 
-        int numEntries = chunkLength/(4*(sampleDepth/8) + 2);
+        int numEntries = remainingChunkLength/(4*(sampleDepth/8) + 2);
         metadata.sPLT_red = new int[numEntries];
         metadata.sPLT_green = new int[numEntries];
         metadata.sPLT_blue = new int[numEntries];
@@ -558,9 +570,13 @@
 
     private void parse_tEXt_chunk(int chunkLength) throws IOException {
         String keyword = readNullTerminatedString("ISO-8859-1", 80);
+        int textLength = chunkLength - keyword.length() - 1;
+        if (textLength <= 0) {
+            throw new IIOException("tEXt chunk length is not proper");
+        }
         metadata.tEXt_keyword.add(keyword);
 
-        byte[] b = new byte[chunkLength - keyword.length() - 1];
+        byte[] b = new byte[textLength];
         stream.readFully(b);
         metadata.tEXt_text.add(new String(b, "ISO-8859-1"));
 
@@ -596,7 +612,7 @@
             // Alpha table may have fewer entries than RGB palette
             int maxEntries = metadata.PLTE_red.length;
             int numEntries = chunkLength;
-            if (numEntries > maxEntries) {
+            if (numEntries > maxEntries && maxEntries > 0) {
                 processWarningOccurred(
 "tRNS chunk has more entries than prior PLTE chunk, ignoring extras.");
                 numEntries = maxEntries;
@@ -652,12 +668,16 @@
 
     private void parse_zTXt_chunk(int chunkLength) throws IOException {
         String keyword = readNullTerminatedString("ISO-8859-1", 80);
+        int textLength = chunkLength - keyword.length() - 2;
+        if (textLength <= 0) {
+            throw new IIOException("zTXt chunk length is not proper");
+        }
         metadata.zTXt_keyword.add(keyword);
 
         int method = stream.readUnsignedByte();
         metadata.zTXt_compressionMethod.add(method);
 
-        byte[] b = new byte[chunkLength - keyword.length() - 2];
+        byte[] b = new byte[textLength];
         stream.readFully(b);
         metadata.zTXt_text.add(new String(inflate(b), "ISO-8859-1"));
 
--- a/src/java.desktop/share/classes/java/awt/Component.java	Fri Feb 02 10:31:05 2018 -0800
+++ b/src/java.desktop/share/classes/java/awt/Component.java	Fri Feb 02 10:32:59 2018 -0800
@@ -9310,7 +9310,9 @@
          * when shown/hidden..
          * @since 1.3
          */
-        protected class AccessibleAWTComponentHandler implements ComponentListener {
+        protected class AccessibleAWTComponentHandler implements ComponentListener, Serializable {
+            private static final long serialVersionUID = -1009684107426231869L;
+
             public void componentHidden(ComponentEvent e)  {
                 if (accessibleContext != null) {
                     accessibleContext.firePropertyChange(
@@ -9340,7 +9342,9 @@
          * when focus events happen
          * @since 1.3
          */
-        protected class AccessibleAWTFocusHandler implements FocusListener {
+        protected class AccessibleAWTFocusHandler implements FocusListener, Serializable {
+            private static final long serialVersionUID = 3150908257351582233L;
+
             public void focusGained(FocusEvent event) {
                 if (accessibleContext != null) {
                     accessibleContext.firePropertyChange(
--- a/src/java.desktop/share/classes/java/awt/Container.java	Fri Feb 02 10:31:05 2018 -0800
+++ b/src/java.desktop/share/classes/java/awt/Container.java	Fri Feb 02 10:32:59 2018 -0800
@@ -40,6 +40,7 @@
 import java.io.ObjectStreamField;
 import java.io.PrintStream;
 import java.io.PrintWriter;
+import java.io.Serializable;
 
 import java.lang.ref.WeakReference;
 import java.security.AccessController;
@@ -3849,7 +3850,9 @@
          * @since 1.3
          */
         protected class AccessibleContainerHandler
-            implements ContainerListener {
+            implements ContainerListener, Serializable {
+            private static final long serialVersionUID = -480855353991814677L;
+
             public void componentAdded(ContainerEvent e) {
                 Component c = e.getChild();
                 if (c != null && c instanceof Accessible) {
--- a/src/java.desktop/share/classes/javax/swing/DefaultRowSorter.java	Fri Feb 02 10:31:05 2018 -0800
+++ b/src/java.desktop/share/classes/javax/swing/DefaultRowSorter.java	Fri Feb 02 10:32:59 2018 -0800
@@ -1033,8 +1033,10 @@
             // Not transformed, nothing to do.
             return false;
         }
-        if (!sorted || (lastRow - firstRow) > viewToModel.length / 10) {
-            // We either weren't sorted, or to much changed, sort it all
+        if (!sorted || viewToModel.length == 0 ||
+                (lastRow - firstRow) > viewToModel.length / 10) {
+            // We either weren't sorted, or to much changed, sort it all or
+            // this is the first row added and we have to update diffeent caches
             sort();
             return false;
         }
--- a/test/jdk/ProblemList.txt	Fri Feb 02 10:31:05 2018 -0800
+++ b/test/jdk/ProblemList.txt	Fri Feb 02 10:32:59 2018 -0800
@@ -116,45 +116,155 @@
 java/awt/Focus/FocusOwnerFrameOnClick/FocusOwnerFrameOnClick.java 8081489 generic-all
 java/awt/Focus/IconifiedFrameFocusChangeTest/IconifiedFrameFocusChangeTest.java 6849364 generic-all
 java/awt/Focus/AutoRequestFocusTest/AutoRequestFocusToFrontTest.java 6848406 generic-all
-java/awt/Focus/AutoRequestFocusTest/AutoRequestFocusSetVisibleTest.java 6848407 generic-all 
+java/awt/Focus/AutoRequestFocusTest/AutoRequestFocusSetVisibleTest.java 6848407 generic-all
 java/awt/Frame/MaximizedUndecorated/MaximizedUndecorated.java 8022302 generic-all
 
 java/awt/FileDialog/FileDialogIconTest/FileDialogIconTest.java 8160558 windows-all
-java/awt/Modal/FileDialog/FileDialogTKModal1Test.java 7186009 windows-all,macosx-all
-java/awt/Modal/FileDialog/FileDialogTKModal2Test.java 7186009 windows-all,macosx-all
-java/awt/Modal/FileDialog/FileDialogTKModal3Test.java 7186009 windows-all,macosx-all
-java/awt/Modal/FileDialog/FileDialogTKModal4Test.java 7186009 windows-all,macosx-all
-java/awt/Modal/FileDialog/FileDialogTKModal5Test.java 7186009 windows-all,macosx-all
-java/awt/Modal/FileDialog/FileDialogTKModal6Test.java 7186009 windows-all,macosx-all
 java/awt/event/MouseWheelEvent/InfiniteRecursion/InfiniteRecursion.java 8060176 windows-all,macosx-all
 java/awt/event/MouseWheelEvent/InfiniteRecursion/InfiniteRecursion_1.java 8060176 windows-all,macosx-all
 java/awt/dnd/BadSerializaionTest/BadSerializationTest.java 8039082 generic-all
 java/awt/Focus/ChoiceFocus/ChoiceFocus.java 8169103 windows-all
 java/awt/event/KeyEvent/CorrectTime/CorrectTime.java 6626492 generic-all
 java/awt/Frame/MaximizedToUnmaximized/MaximizedToUnmaximized.java 8129569 generic-all
-java/awt/EventQueue/6980209/bug6980209.java 8131670 generic-all
 java/awt/event/InputEvent/EventWhenTest/EventWhenTest.java 8168646 generic-all
 java/awt/Mixing/AWT_Mixing/OpaqueOverlappingChoice.java 8048171 generic-all
+java/awt/Mixing/AWT_Mixing/JMenuBarOverlapping.java 8159451 linux-all,windows-all
+java/awt/Mixing/AWT_Mixing/JSplitPaneOverlapping.java 6986109 windows-all
+java/awt/Mixing/AWT_Mixing/JInternalFrameMoveOverlapping.java 6986109 windows-all
+java/awt/Mixing/AWT_Mixing/JSplitPaneOverlapping.java 8194765 windows-all
+java/awt/Mixing/AWT_Mixing/MixingPanelsResizing.java 8049405 generic-all
 java/awt/Focus/ActualFocusedWindowTest/ActualFocusedWindowRetaining.java 6829264 generic-all
 java/awt/datatransfer/DragImage/MultiResolutionDragImageTest.java 8080982 generic-all
 java/awt/Toolkit/ScreenInsetsTest/ScreenInsetsTest.java 6829250 windows-all
 java/awt/LightweightComponent/LightweightEventTest/LightweightEventTest.java 8159252 windows-all
 java/awt/EventDispatchThread/HandleExceptionOnEDT/HandleExceptionOnEDT.java 6990210 generic-all
 java/awt/EventDispatchThread/LoopRobustness/LoopRobustness.html 4931413 windows-all
-java/awt/Focus/8073453/AWTFocusTransitionTest.java 8136517 generic-all
 java/awt/FullScreen/FullScreenInsets/FullScreenInsets.java 7019055 windows-all
 java/awt/Focus/8013611/JDK8013611.java 8175366 windows-all
 java/awt/Focus/6981400/Test1.java 8029675 windows-all
 java/awt/Focus/6981400/Test3.java 8173264 generic-all
-java/awt/Mixing/AWT_Mixing/JSplitPaneOverlapping.java 6986109 windows-all
-java/awt/Mixing/AWT_Mixing/JInternalFrameMoveOverlapping.java 6986109 windows-all
 java/awt/event/KeyEvent/ExtendedKeyCode/ExtendedKeyCodeTest.java 8169476 windows-all
 java/awt/event/KeyEvent/KeyChar/KeyCharTest.java 8169474 windows-all
 java/awt/event/MouseEvent/SpuriousExitEnter/SpuriousExitEnter_3.java 6854300 generic-all
 java/awt/event/KeyEvent/ExtendedModifiersTest/ExtendedModifiersTest.java 8129778 generic-all
 java/awt/event/KeyEvent/KeyMaskTest/KeyMaskTest.java 8129778 generic-all
 java/awt/event/MouseEvent/MouseButtonsAndKeyMasksTest/MouseButtonsAndKeyMasksTest.java 8129778 generic-all
+
+java/awt/dnd/URIListToFileListBetweenJVMsTest/URIListToFileListBetweenJVMsTest.html 8194947 generic-all
+java/awt/dnd/ImageTransferTest/ImageTransferTest.java 8176556 generic-all
+java/awt/Dialog/MakeWindowAlwaysOnTop/MakeWindowAlwaysOnTop.java 7054585 generic-all
+java/awt/Frame/SetMaximizedBounds/SetMaximizedBounds.java 8196006 windows-all
+java/awt/FullScreen/AltTabCrashTest/AltTabCrashTest.java 8047218 generic-all
+java/awt/GridLayout/LayoutExtraGaps/LayoutExtraGaps.java 8000171 windows-all
+java/awt/Mouse/GetMousePositionTest/GetMousePositionWithPopup.java 8196017 windows-all
+java/awt/Scrollbar/ScrollbarMouseWheelTest/ScrollbarMouseWheelTest.java 8196018 windows-all
+java/awt/TrayIcon/ActionCommand/ActionCommand.java 8150540 windows-all
+java/awt/TrayIcon/ActionEventMask/ActionEventMask.java 8150540 windows-all
+java/awt/TrayIcon/ActionEventTest/ActionEventTest.java 8150540 windows-all
+java/awt/TrayIcon/ModalityTest/ModalityTest.java 8150540 windows-all
+java/awt/TrayIcon/MouseEventMask/MouseEventMaskTest.java 8150540 windows-all
+java/awt/TrayIcon/MouseEventMask/MouseEventMovedTest.java 8150540 windows-all
+java/awt/TrayIcon/MouseMovedTest/MouseMovedTest.java 8150540 windows-all
+java/awt/TrayIcon/SecurityCheck/FunctionalityCheck/FunctionalityCheck.java 8150540 windows-all
+java/awt/TrayIcon/TrayIconEventModifiers/TrayIconEventModifiersTest.java 8150540 windows-all
+java/awt/TrayIcon/TrayIconEvents/TrayIconEventsTest.java 8150540 windows-all
+java/awt/TrayIcon/TrayIconMouseTest/TrayIconMouseTest.java 8150540 windows-all
+java/awt/TrayIcon/TrayIconPopup/TrayIconPopupClickTest.java 8150540 windows-all
+java/awt/TrayIcon/TrayIconPopup/TrayIconPopupTest.java 8150540 windows-all
+java/awt/TrayIcon/PopupMenuLeakTest/PopupMenuLeakTest.java 8196440 linux-all
+java/awt/Window/Grab/GrabTest.java 8196019 windows-all
+java/awt/Window/ShapedAndTranslucentWindows/ShapedTranslucentWindowClick.java 8196020 windows-all
+java/awt/font/TextLayout/CombiningPerf.java 8192931 generic-all
+java/awt/image/DrawImage/IncorrectAlphaSurface2SW.java 8056077 generic-all
+java/awt/image/DrawImage/IncorrectClipXorModeSW2Surface.java 8196025 windows-all
+java/awt/image/DrawImage/IncorrectClipXorModeSurface2Surface.java 8196025 windows-all
+java/awt/image/DrawImage/IncorrectSourceOffset.java 8196086 windows-all
+java/awt/image/DrawImage/IncorrectUnmanagedImageRotatedClip.java 8196087 windows-all
+java/awt/print/Headless/HeadlessPrinterJob.java 8196088 windows-all
+sun/java2d/DirectX/OnScreenRenderingResizeTest/OnScreenRenderingResizeTest.java 8022403 generic-all
+sun/java2d/DirectX/OverriddenInsetsTest/OverriddenInsetsTest.java 8196102 generic-all
+sun/java2d/DirectX/RenderingToCachedGraphicsTest/RenderingToCachedGraphicsTest.java 8196180 windows-all
+sun/java2d/GdiRendering/InsetClipping.java 8196181 windows-all
+sun/java2d/OpenGL/CopyAreaOOB.java 7001973 windows-all
+sun/java2d/SunGraphics2D/DrawImageBilinear.java 8191506 generic-all
+sun/java2d/SunGraphics2D/PolyVertTest.java 6986565 generic-all
+sun/java2d/SunGraphics2D/SimplePrimQuality.java 7992007 generic-all
+sun/java2d/SunGraphics2D/SourceClippingBlitTest/SourceClippingBlitTest.java 8196191 windows-all
+sun/java2d/pipe/InterpolationQualityTest.java 8171303 windows-all,linux-all
+java/awt/FullScreen/BufferStrategyExceptionTest/BufferStrategyExceptionTest.java 8196186 windows-all
+java/awt/FullScreen/DisplayChangeVITest/DisplayChangeVITest.java 8169469 windows-all
+java/awt/FullScreen/NonExistentDisplayModeTest/NonExistentDisplayModeTest.java 8196187 windows-all
+java/awt/Graphics/ClippedCopyAreaTest/ClippedCopyAreaTest.java 8196436 linux-all
+java/awt/Graphics/CopyScaledArea/CopyScaledAreaTest.java 8196189 windows-all
+java/awt/GraphicsDevice/CloneConfigsTest.java 8196190 windows-all
+java/awt/TextArea/TextAreaScrolling/TextAreaScrolling.java 8196300 windows-all
+java/awt/print/PrinterJob/Margins.java 8196301 windows-all
+java/awt/Choice/PopupPosTest/PopupPosTest.html 8192930 windows-all
+java/awt/Component/GetScreenLocTest.java 4753654 windows-all
+java/awt/Choice/SelectCurrentItemTest/SelectCurrentItemTest.html 8192929 windows-all
+java/awt/Dialog/MakeWindowAlwaysOnTop/MakeWindowAlwaysOnTop.java 7054586 windows-all
+java/awt/Dialog/SiblingChildOrder/SiblingChildOrderTest.java 8193940 windows-all
+java/awt/Focus/NonFocusableWindowTest/NoEventsTest.java 8000171 windows-all
+java/awt/Frame/MiscUndecorated/RepaintTest.java 8079267 windows-all
+java/awt/Robot/ModifierRobotKey/ModifierRobotKeyTest.java 8157173 windows-all
+java/awt/Modal/FileDialog/FileDialogTKModal1Test.java 8196430 generic-all
+java/awt/Modal/FileDialog/FileDialogTKModal2Test.java 8196430 generic-all
+java/awt/Modal/FileDialog/FileDialogTKModal3Test.java 8196430 generic-all
+java/awt/Modal/FileDialog/FileDialogTKModal4Test.java 8196430 generic-all
+java/awt/Modal/FileDialog/FileDialogTKModal5Test.java 8196430 generic-all
+java/awt/Modal/FileDialog/FileDialogTKModal6Test.java 8196430 generic-all
+java/awt/Modal/ModalExclusionTests/ApplicationExcludeDialogPageSetupTest.java 8196431 linux-all
+java/awt/Modal/ModalExclusionTests/ApplicationExcludeDialogPrintSetupTest.java 8196431 linux-all
+java/awt/Modal/ModalExclusionTests/ApplicationExcludeFramePageSetupTest.java 8196431 linux-all
+java/awt/Modal/ModalExclusionTests/ApplicationExcludeFramePrintSetupTest.java 8196431 linux-all
+java/awt/Modal/ModalExclusionTests/ToolkitExcludeDialogPageSetupTest.java 8196431 linux-all
+java/awt/Modal/ModalExclusionTests/ToolkitExcludeDialogPrintSetupTest.java 8196431 linux-all
+java/awt/Modal/ModalExclusionTests/ToolkitExcludeFramePageSetupTest.java 8196431 linux-all
+java/awt/Modal/ModalExclusionTests/ToolkitExcludeFramePrintSetupTest.java 8196431 linux-all
 java/awt/Modal/ModalFocusTransferTests/FocusTransferWDFAppModal2Test.java 8058813 windows-all
+java/awt/Modal/ModalFocusTransferTests/FocusTransferWDFModeless2Test.java 8196191 windows-all
+java/awt/Modal/ModalFocusTransferTests/FocusTransferDWFDocModalTest.java 8196432 linux-all
+java/awt/Modal/ModalFocusTransferTests/FocusTransferDWFModelessTest.java 8196432 linux-all
+java/awt/Modal/ModalFocusTransferTests/FocusTransferDWFNonModalTest.java 8196432 linux-all
+java/awt/Modal/ModalFocusTransferTests/FocusTransferDialogsModelessTest.java 8196432 linux-all
+java/awt/Modal/ModalFocusTransferTests/FocusTransferDialogsNonModalTest.java 8196432 linux-all
+java/awt/Modal/ModalFocusTransferTests/FocusTransferFDWDocModalTest.java 8196432 linux-all
+java/awt/Modal/ModalFocusTransferTests/FocusTransferFDWModelessTest.java 8196432 linux-all
+java/awt/Modal/ModalFocusTransferTests/FocusTransferFDWNonModalTest.java 8196432 linux-all
+java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDAppModal1Test.java 8196432 linux-all
+java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDAppModal2Test.java 8196432 linux-all
+java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDAppModal3Test.java 8196432 linux-all
+java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDAppModal4Test.java 8196432 linux-all
+java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDDocModal1Test.java 8196432 linux-all
+java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDDocModal2Test.java 8196432 linux-all
+java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDDocModal3Test.java 8196432 linux-all
+java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDDocModal4Test.java 8196432 linux-all
+java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDModeless1Test.java 8196432 linux-all
+java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDModeless2Test.java 8196432 linux-all
+java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDModeless3Test.java 8196432 linux-all
+java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDModeless4Test.java 8196432 linux-all
+java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDNonModal1Test.java 8196432 linux-all
+java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDNonModal2Test.java 8196432 linux-all
+java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDNonModal3Test.java 8196432 linux-all
+java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDNonModal4Test.java 8196432 linux-all
+java/awt/Modal/ModalFocusTransferTests/FocusTransferWDFDocModal2Test.java 8196432 linux-all
+java/awt/Modal/ModalFocusTransferTests/FocusTransferWDFNonModal2Test.java 8196432 linux-all
+java/awt/Mouse/GetMousePositionTest/GetMousePositionWithOverlay.java 8196435 linux-all
+java/awt/Focus/ForwardingFocusToProxyMotifTest/ForwardingFocusToProxyMotifTest.java 8196436 linux-all
+java/awt/Window/OverrideRedirectRemoved/ChildWindowProblem.java 8196438 linux-all
+java/awt/Modal/ToBack/ToBackAppModal1Test.java 8196441 linux-all
+java/awt/Modal/ToBack/ToBackAppModal2Test.java 8196441 linux-all
+java/awt/Modal/ToBack/ToBackAppModal3Test.java 8196441 linux-all
+java/awt/Modal/ToBack/ToBackAppModal4Test.java 8196441 linux-all
+java/awt/Modal/ToBack/ToBackModal1Test.java 8196441 linux-all
+java/awt/Modal/ToBack/ToBackModal2Test.java 8196441 linux-all
+java/awt/Modal/ToBack/ToBackModal3Test.java 8196441 linux-all
+java/awt/Modal/ToBack/ToBackModal4Test.java 8196441 linux-all
+java/awt/Modal/ToBack/ToBackTKModal1Test.java 8196441 linux-all
+java/awt/Modal/ToBack/ToBackTKModal2Test.java 8196441 linux-all
+java/awt/Modal/ToBack/ToBackTKModal3Test.java 8196441 linux-all
+java/awt/Modal/ToBack/ToBackTKModal4Test.java 8196441 linux-all
+java/awt/List/SingleModeDeselect/SingleModeDeselect.java 8196301 windows-all
 
 
 ############################################################################
@@ -298,9 +408,43 @@
 javax/swing/JWindow/ShapedAndTranslucentWindows/PerPixelTranslucentCanvas.java 8081476 windows-all
 # The next test below is an intermittent failure
 javax/swing/JComboBox/8033069/bug8033069ScrollBar.java 8163367 generic-all
-javax/swing/JColorChooser/Test6541987.java 8143021 linux-all
+javax/swing/JColorChooser/Test6541987.java 8143021 windows-all,linux-all
 javax/swing/JTable/7124218/SelectEditTableCell.java 8148958 linux-all
 javax/swing/JTree/DnD/LastNodeLowerHalfDrop.java 8159131 linux-all
+javax/swing/JFileChooser/8041694/bug8041694.java 8196302 windows-all
+javax/swing/JInternalFrame/8069348/bug8069348.java 8196303 windows-all
+javax/swing/AbstractButton/6711682/bug6711682.java 8060765 windows-all
+javax/swing/Action/8133039/bug8133039.java 8196089 windows-all
+javax/swing/JComboBox/6559152/bug6559152.java 8196090 windows-all
+javax/swing/JComboBox/6607130/bug6607130.java 8196091 windows-all
+javax/swing/JComboBox/8032878/bug8032878.java 8196092 windows-all
+javax/swing/JComboBox/8057893/bug8057893.java 8169953 windows-all
+javax/swing/JComboBox/8072767/bug8072767.java 8196093 windows-all
+javax/swing/JComponent/4337267/bug4337267.java 8146451 windows-all
+javax/swing/JEditorPane/6917744/bug6917744.java 8194767 generic-all
+javax/swing/JFileChooser/4524490/bug4524490.java 8042380 generic-all
+javax/swing/JFileChooser/8002077/bug8002077.java 8196094 windows-all
+javax/swing/JFileChooser/DeserializedJFileChooser/DeserializedJFileChooserTest.java 8196095 generic-all
+javax/swing/JFrame/8175301/ScaledFrameBackgroundTest.java 8193942 generic-all
+javax/swing/JInternalFrame/8020708/bug8020708.java 8194943 windows-all
+javax/swing/JList/6462008/bug6462008.java 7156347 generic-all
+javax/swing/JPopupMenu/6580930/bug6580930.java 8196096 windows-all
+javax/swing/JPopupMenu/6675802/bug6675802.java 8196097 windows-all
+javax/swing/JTabbedPane/8007563/Test8007563.java 8051591 generic-all
+javax/swing/SwingUtilities/TestBadBreak/TestBadBreak.java 8160720 generic-all
+javax/swing/plaf/basic/BasicTextUI/8001470/bug8001470.java 8196098 windows-all
+javax/swing/text/CSSBorder/6796710/bug6796710.java 8196099 windows-all
+javax/swing/text/DefaultCaret/HidingSelection/HidingSelectionTest.java 8194048 windows-all
+javax/swing/text/JTextComponent/5074573/bug5074573.java 8196100 windows-all
+javax/swing/JFileChooser/6798062/bug6798062.java 8146446 windows-all
+javax/swing/plaf/basic/BasicGraphicsUtils/8132119/bug8132119.java 8196434 linux-all
+javax/swing/JComboBox/8032878/bug8032878.java 8196439 linux-all
+javax/swing/JComboBox/8182031/ComboPopupTest.java 8196465 linux-all
+javax/swing/JFileChooser/6738668/bug6738668.java 8194946 linux-all,macosx-all
+javax/swing/JFileChooser/8021253/bug8021253.java 8169954 windows-all,linux-all
+javax/swing/JFileChooser/8062561/bug8062561.java 8196466 linux-all
+javax/swing/JInternalFrame/Test6325652.java 8196467 linux-all
+
 
 ############################################################################
 
@@ -366,7 +510,7 @@
 com/sun/jndi/ldap/LdapTimeoutTest.java                          8151678 linux-all
 
 javax/rmi/PortableRemoteObject/8146975/RmiIiopReturnValueTest.java 8194663 generic-all
- 
+
 org/omg/CORBA/OrbPropertiesTest.java			        8194663 generic-all
 
 javax/rmi/PortableRemoteObject/ConcurrentHashMapTest.java       8194663 generic-all
--- a/test/jdk/java/awt/EventDispatchThread/HandleExceptionOnEDT/HandleExceptionOnEDT.java	Fri Feb 02 10:31:05 2018 -0800
+++ b/test/jdk/java/awt/EventDispatchThread/HandleExceptionOnEDT/HandleExceptionOnEDT.java	Fri Feb 02 10:32:59 2018 -0800
@@ -90,9 +90,9 @@
         Point fp = f.getLocationOnScreen();
         r.mouseMove(fp.x + f.getWidth() / 2, fp.y + f.getHeight() / 2);
         Util.waitForIdle(r);
-        r.mousePress(InputEvent.BUTTON1_MASK);
+        r.mousePress(InputEvent.BUTTON1_DOWN_MASK);
         Util.waitForIdle(r);
-        r.mouseRelease(InputEvent.BUTTON2_MASK);
+        r.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
         f.removeMouseListener(exceptionListener);
 
         if (!exceptionHandled)
@@ -118,9 +118,9 @@
         Point dp = d.getLocationOnScreen();
         r.mouseMove(dp.x + d.getWidth() / 2, dp.y + d.getHeight() / 2);
         Util.waitForIdle(r);
-        r.mousePress(InputEvent.BUTTON1_MASK);
+        r.mousePress(InputEvent.BUTTON1_DOWN_MASK);
         Util.waitForIdle(r);
-        r.mouseRelease(InputEvent.BUTTON2_MASK);
+        r.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
         d.removeMouseListener(exceptionListener);
 
         if (!exceptionHandled)
@@ -142,9 +142,9 @@
         mousePressed = false;
         r.mouseMove(fp.x + 50, fp.y + 50);
         Util.waitForIdle(r);
-        r.mousePress(InputEvent.BUTTON1_MASK);
+        r.mousePress(InputEvent.BUTTON1_DOWN_MASK);
         Util.waitForIdle(r);
-        r.mouseRelease(InputEvent.BUTTON1_MASK);
+        r.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
         Util.waitForIdle(r);
         f.removeMouseListener(pressedListener);
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javax/imageio/plugins/png/PngImproperChunkSizeTest.java	Fri Feb 02 10:32:59 2018 -0800
@@ -0,0 +1,133 @@
+/*
+ * Copyright (c) 2018, 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     8191023
+ * @summary Test verifies that PNGImageReader doesn't throw any undocumented
+ *          Exception when we try to create byte array of negative size because
+ *          when keyword length is more than chunk size.
+ * @run     main PngImproperChunkSizeTest
+ */
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Base64;
+import javax.imageio.IIOException;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+
+public class PngImproperChunkSizeTest {
+
+    private static ImageReader reader;
+
+    private static String zTXTMalformedData = "iVBORw0KGgoAAAANSUhEUgAAAAEAAA" +
+            "ABCAAAAAA6fptVAAAABHpUWHRhYWFhYWFhYQAAAApJREFUGFdj+A8AAQEBAFpNb" +
+            "/EAAAAASUVORK5CYIIK";
+
+    private static String tEXTMalformedData = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAAB"
+            + "CAMAAAA6fptVAAAABHRFWHRhYWFhYWFhYQAAAApJREFUGFdj+A8AAQEBAFpNb"
+            + "/EAAAAASUVORK5CYIIK";
+
+    private static String iCCPMalformedData = "iVBORw0KGgoAAAANSUhEUgAAAAEAAA" +
+            "ABCAAAAAA6fptVAAAABGlDQ1BhYWFhYWFhYQAAAApJREFUGFdj+A8AAQEBAFpNb" +
+            "/EAAAAASUVORK5CYIIK";
+
+    private static ByteArrayInputStream initializeInputStream(String input) {
+        byte[] inputBytes = Base64.getDecoder().decode(input);
+        return new ByteArrayInputStream(inputBytes);
+    }
+
+    private static Boolean readzTXTData(InputStream input) throws IOException {
+        // Set input and mark ignoreMetadata = false
+        reader.setInput(ImageIO.createImageInputStream(input), true, false);
+        try {
+            reader.read(0);
+        } catch (IIOException e) {
+            Throwable cause = e.getCause();
+            if (cause == null ||
+                !cause.getMessage().
+                        equals("zTXt chunk length is not proper"))
+            {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    private static Boolean readtEXTData(InputStream input) throws IOException {
+        // Set input and mark ignoreMetadata = false
+        reader.setInput(ImageIO.createImageInputStream(input), true, false);
+        try {
+            reader.read(0);
+        } catch (IIOException e) {
+            Throwable cause = e.getCause();
+            if (cause == null ||
+                !cause.getMessage().
+                        equals("tEXt chunk length is not proper"))
+            {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    private static Boolean readiCCPData(InputStream input) throws IOException {
+        // Set input and mark ignoreMetadata = false
+        reader.setInput(ImageIO.createImageInputStream(input), true, false);
+        try {
+            reader.read(0);
+        } catch (IIOException e) {
+            Throwable cause = e.getCause();
+            if (cause == null ||
+                !cause.getMessage().
+                        equals("iCCP chunk length is not proper"))
+            {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    public static void main(String[] args) throws java.io.IOException {
+        reader = ImageIO.getImageReadersByFormatName("png").next();
+
+        InputStream in = initializeInputStream(zTXTMalformedData);
+        Boolean zTXTFailed = readzTXTData(in);
+
+        in = initializeInputStream(tEXTMalformedData);
+        Boolean tEXTFailed = readtEXTData(in);
+
+        in = initializeInputStream(iCCPMalformedData);
+        Boolean iCCPFailed = readiCCPData(in);
+
+        reader.dispose();
+
+        if (zTXTFailed || tEXTFailed || iCCPFailed) {
+            throw new RuntimeException("Test didn't throw the required" +
+                    " Exception");
+        }
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javax/swing/JFrame/Serialization/JFrameMenuSerializationTest.java	Fri Feb 02 10:32:59 2018 -0800
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2017, 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 8189201
+ * @summary [macosx] NotSerializableException during JFrame with MenuBar
+ *          serialization
+ * @run main JFrameMenuSerializationTest
+ */
+
+import javax.swing.*;
+import java.awt.*;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.NotSerializableException;
+import java.io.ObjectOutputStream;
+
+public class JFrameMenuSerializationTest {
+    private static JFrame frame;
+
+    public static void main(String[] args) throws Exception {
+        System.setProperty("apple.laf.useScreenMenuBar", "true");
+        SwingUtilities.invokeAndWait(() -> {
+            frame = new JFrame();
+            frame.setJMenuBar(new JMenuBar());
+            frame.setVisible(true);
+            frame.getAccessibleContext().addPropertyChangeListener(evt -> {});
+        });
+        Robot robot = new Robot();
+        robot.waitForIdle();
+        robot.delay(200);
+        ByteArrayOutputStream baos = new ByteArrayOutputStream(10000);
+        ObjectOutputStream oos = new ObjectOutputStream(baos);
+        SwingUtilities.invokeAndWait(() -> {
+            try {
+                oos.writeObject(frame);
+            } catch (NotSerializableException e) {
+                throw new RuntimeException("Test failed", e);
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        });
+        SwingUtilities.invokeLater(frame::dispose);
+
+    }
+}
--- a/test/jdk/javax/swing/JList/BasicListTest.java	Fri Feb 02 10:31:05 2018 -0800
+++ b/test/jdk/javax/swing/JList/BasicListTest.java	Fri Feb 02 10:32:59 2018 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -22,9 +22,9 @@
  */
 /*
  * @test
- * @bug 8191639
- * @headful
- * @summary  Verifies no NPE is thrown wjen pageup/down is pressed in a JList
+ * @bug 8191639 8196443
+ * @key headful
+ * @summary  Verifies no NPE is thrown when pageup/down is pressed in a JList
  * @run main BasicListTest
  */
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javax/swing/JTable/DefaultRowSorterCacheTest.java	Fri Feb 02 10:32:59 2018 -0800
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2018, 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
+ * @key headful
+ * @bug 7007967
+ * @summary Verifies that DefaultRowSorter updates its cache properly when the
+ *           all the row are deleted and then new rows are added to the table
+ * @run main DefaultRowSorterCacheTest
+ */
+
+
+import javax.swing.table.DefaultTableModel;
+import javax.swing.table.TableRowSorter;
+import javax.swing.SwingUtilities;
+
+class CustomTableModel extends DefaultTableModel
+{
+    public CustomTableModel(Object[][] data, Object[] columnNames) {
+        super(data, columnNames);
+    }
+
+    @Override
+    public Class<?> getColumnClass(int columnIndex) {
+        if (getRowCount() > 0) {
+            return getValueAt(0, columnIndex).getClass();
+        }
+        return super.getColumnClass(columnIndex);
+    }
+}
+
+public class DefaultRowSorterCacheTest {
+
+    public void testSort() {
+        Object[] values = new Object[]{1, 2, 10};
+        Object[][] data = new Object[][]{{values[0]}, {values[1]}, {values[2]}};
+
+        //Create custom table model
+        DefaultTableModel model = new CustomTableModel(data, new Object[]{"A"});
+
+        TableRowSorter<DefaultTableModel> rowSorter =
+                new TableRowSorter<DefaultTableModel>(model);
+        rowSorter.toggleSortOrder(0);
+
+        for (int row = 0; row < model.getRowCount(); row++) {
+            // values are in sorted ascending. so the row index and
+            // view index from sorter should be same
+            if (row != rowSorter.convertRowIndexToView(row)) {
+                throw new RuntimeException("Wrong sorting before making any " +
+                        "changes in test case");
+            }
+        }
+
+        // clear model and notify sorter
+        model.setRowCount(0);
+        rowSorter.rowsDeleted(0, values.length - 1);
+
+        // refill the model and notify sorter
+        for (int i = 0; i < values.length; i++) {
+            model.addRow(new Object[]{values[i]});
+            rowSorter.rowsInserted(i, i);
+        }
+
+        for (int row = 0; row < model.getRowCount(); row++) {
+            // values are in sorted ascending. so the row index and
+            // view index from sorter should be same
+            if (row != rowSorter.convertRowIndexToView(row)) {
+                throw new RuntimeException("Wrong sorting at end of test case");
+            }
+        }
+    }
+
+    public static void main(String[] args) throws Exception{
+        SwingUtilities.invokeAndWait(new Runnable() {
+            @Override
+            public void run() {
+                new DefaultRowSorterCacheTest().testSort();
+            }
+        });
+    }
+}