changeset 5490:0b7293b9e964

Merge
author lana
date Wed, 07 Nov 2012 13:09:47 -0800
parents 448626eae40d 2b43b06caea9
children c49b6f031579
files src/share/classes/sun/awt/AWTAccessor.java
diffstat 45 files changed, 609 insertions(+), 271 deletions(-) [+]
line wrap: on
line diff
--- a/make/common/Demo.gmk	Fri Oct 19 16:49:25 2012 -0700
+++ b/make/common/Demo.gmk	Wed Nov 07 13:09:47 2012 -0800
@@ -158,6 +158,8 @@
     #       bit between them.
     LINK.demo   = $(LINK.c)
     LDLIBS.demo = $(EXTRA_LIBS) $(LFLAGS_$(COMPILER_VERSION))
+    DEMO_VERSION_INFO = $(OBJDIR)/$(LIBRARY).res
+    LDLIBS.demo += $(DEMO_VERSION_INFO)
   else
     ifneq ($(DEMO_NEEDS_CPP),)
       LINK.demo   = $(LINK.cpp)
@@ -288,6 +290,13 @@
 	$(install-file)
 endif
 
+ifeq ($(PLATFORM),windows)
+# JDK name required here
+RC_FLAGS += /D "JDK_FNAME=$(LIBRARY).dll" \
+            /D "JDK_INTERNAL_NAME=$(LIBRARY)" \
+            /D "JDK_FTYPE=0x2L"
+endif
+
 # Native library building
 ifdef DEMO_LIBRARY
 
@@ -308,6 +317,9 @@
   # Actual creation of the native shared library (C++ and C are different)
 $(DEMO_LIBRARY): $(DEMO_FULL_OBJECTS)
 	@$(prep-target)
+  ifeq ($(PLATFORM),windows)
+	$(RC) $(RC_FLAGS) $(CC_OBJECT_OUTPUT_FLAG)$(DEMO_VERSION_INFO) $(VERSIONINFO_RESOURCE)
+  endif
 	$(LINK.demo) $(SHARED_LIBRARY_FLAG) $(CC_PROGRAM_OUTPUT_FLAG)$@ \
 	    $(DEMO_FULL_OBJECTS) $(LDLIBS.demo)
 	@$(call binary_file_verification,$@)
--- a/make/javax/crypto/Makefile	Fri Oct 19 16:49:25 2012 -0700
+++ b/make/javax/crypto/Makefile	Wed Nov 07 13:09:47 2012 -0800
@@ -156,7 +156,12 @@
 #
 
 ifdef OPENJDK
-all: build-jar install-jar build-policy install-limited
+ifdef UNLIMITED_CRYPTO
+POLICY = install-unlimited
+else
+POLICY = install-limited
+endif
+all: build-jar install-jar build-policy $(POLICY)
 else  # OPENJDK
 ifeq ($(strip $(FILES_java)),)
 all:
--- a/src/share/classes/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java	Fri Oct 19 16:49:25 2012 -0700
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java	Wed Nov 07 13:09:47 2012 -0800
@@ -523,6 +523,7 @@
         Object ScrollbarBackgroundColor = new DesktopProperty(
                                                        "win.scrollbar.backgroundColor",
                                                         table.get("scrollbar"));
+        Object buttonFocusColor = new FocusColorProperty();
 
         Object TextBackground         = new XPColorValue(Part.EP_EDIT, null, Prop.FILLCOLOR,
                                                          WindowBackgroundColor);
@@ -629,7 +630,7 @@
             "Button.highlight", ControlHighlightColor,
             "Button.disabledForeground", InactiveTextColor,
             "Button.disabledShadow", ControlHighlightColor,
-            "Button.focus", black,
+            "Button.focus", buttonFocusColor,
             "Button.dashedRectGapX", new XPValue(Integer.valueOf(3), Integer.valueOf(5)),
             "Button.dashedRectGapY", new XPValue(Integer.valueOf(3), Integer.valueOf(4)),
             "Button.dashedRectGapWidth", new XPValue(Integer.valueOf(6), Integer.valueOf(10)),
@@ -655,7 +656,7 @@
             "CheckBox.darkShadow", ControlDarkShadowColor,
             "CheckBox.light", ControlLightColor,
             "CheckBox.highlight", ControlHighlightColor,
-            "CheckBox.focus", black,
+            "CheckBox.focus", buttonFocusColor,
             "CheckBox.focusInputMap",
                new UIDefaults.LazyInputMap(new Object[] {
                             "SPACE", "pressed",
@@ -1010,7 +1011,7 @@
             "RadioButton.darkShadow", ControlDarkShadowColor,
             "RadioButton.light", ControlLightColor,
             "RadioButton.highlight", ControlHighlightColor,
-            "RadioButton.focus", black,
+            "RadioButton.focus", buttonFocusColor,
             "RadioButton.focusInputMap",
                new UIDefaults.LazyInputMap(new Object[] {
                           "SPACE", "pressed",
@@ -2617,4 +2618,19 @@
         }
     }
 
+    private static class FocusColorProperty extends DesktopProperty {
+        public FocusColorProperty () {
+            // Fallback value is never used bacause of the configureValue method doesn't return null
+            super("win.3d.backgroundColor", Color.BLACK);
+        }
+
+        @Override
+        protected Object configureValue(Object value) {
+            if (! ((Boolean)Toolkit.getDefaultToolkit().getDesktopProperty("win.highContrast.on")).booleanValue()){
+                return Color.BLACK;
+            }
+            return Color.BLACK.equals(value) ? Color.WHITE : Color.BLACK;
+        }
+    }
+
 }
--- a/src/share/classes/com/sun/java/swing/plaf/windows/WindowsRadioButtonUI.java	Fri Oct 19 16:49:25 2012 -0700
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/WindowsRadioButtonUI.java	Wed Nov 07 13:09:47 2012 -0800
@@ -89,6 +89,11 @@
         }
     }
 
+    protected void uninstallDefaults(AbstractButton b) {
+        super.uninstallDefaults(b);
+        initialized = false;
+    }
+
     protected Color getFocusColor() {
         return focusColor;
     }
--- a/src/share/classes/com/sun/java/swing/plaf/windows/WindowsRootPaneUI.java	Fri Oct 19 16:49:25 2012 -0700
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/WindowsRootPaneUI.java	Wed Nov 07 13:09:47 2012 -0800
@@ -30,6 +30,8 @@
 import java.awt.Event;
 import java.awt.KeyEventPostProcessor;
 import java.awt.Window;
+import java.awt.Toolkit;
+import sun.awt.SunToolkit;
 
 import java.awt.event.ActionEvent;
 import java.awt.event.KeyEvent;
@@ -125,7 +127,19 @@
                 }
                 JMenu menu = mbar != null ? mbar.getMenu(0) : null;
 
-                if (menu != null) {
+                // It might happen that the altRelease event is processed
+                // with a reasonable delay since it has been generated.
+                // Here we check the last deactivation time of the containing
+                // window. If this time appears to be greater than the altRelease
+                // event time the event is skipped to avoid unexpected menu
+                // activation. See 7121442.
+                boolean skip = false;
+                Toolkit tk = Toolkit.getDefaultToolkit();
+                if (tk instanceof SunToolkit) {
+                    skip = ev.getWhen() <= ((SunToolkit)tk).getWindowDeactivationTime(winAncestor);
+                }
+
+                if (menu != null && !skip) {
                     MenuElement[] path = new MenuElement[2];
                     path[0] = mbar;
                     path[1] = menu;
--- a/src/share/classes/java/awt/SequencedEvent.java	Fri Oct 19 16:49:25 2012 -0700
+++ b/src/share/classes/java/awt/SequencedEvent.java	Wed Nov 07 13:09:47 2012 -0800
@@ -26,6 +26,7 @@
 package java.awt;
 
 import java.util.LinkedList;
+import sun.awt.AWTAccessor;
 import sun.awt.AppContext;
 import sun.awt.SunToolkit;
 
@@ -54,6 +55,17 @@
     private AppContext appContext;
     private boolean disposed;
 
+    static {
+        AWTAccessor.setSequencedEventAccessor(new AWTAccessor.SequencedEventAccessor() {
+            public AWTEvent getNested(AWTEvent sequencedEvent) {
+                return ((SequencedEvent)sequencedEvent).nested;
+            }
+            public boolean isSequencedEvent(AWTEvent event) {
+                return event instanceof SequencedEvent;
+            }
+        });
+    }
+
     /**
      * Constructs a new SequencedEvent which will dispatch the specified
      * nested event.
--- a/src/share/classes/java/nio/X-Buffer.java.template	Fri Oct 19 16:49:25 2012 -0700
+++ b/src/share/classes/java/nio/X-Buffer.java.template	Wed Nov 07 13:09:47 2012 -0800
@@ -888,8 +888,6 @@
      */
     public $Type$Buffer put(String src, int start, int end) {
         checkBounds(start, end - start, src.length());
-        if (end - start > remaining())
-            throw new BufferOverflowException();
         for (int i = start; i < end; i++)
             this.put(src.charAt(i));
         return this;
--- a/src/share/classes/javax/swing/JTable.java	Fri Oct 19 16:49:25 2012 -0700
+++ b/src/share/classes/javax/swing/JTable.java	Wed Nov 07 13:09:47 2012 -0800
@@ -8588,7 +8588,7 @@
              *    <code>null</code> if this object is not on the screen
              */
             public Point getLocationOnScreen() {
-                if (parent != null) {
+                if (parent != null && parent.isShowing()) {
                     Point parentLocation = parent.getLocationOnScreen();
                     Point componentLocation = getLocation();
                     componentLocation.translate(parentLocation.x, parentLocation.y);
@@ -9389,7 +9389,7 @@
              *    <code>null</code> if this object is not on the screen
              */
             public Point getLocationOnScreen() {
-                if (parent != null) {
+                if (parent != null && parent.isShowing()) {
                     Point parentLocation = parent.getLocationOnScreen();
                     Point componentLocation = getLocation();
                     componentLocation.translate(parentLocation.x, parentLocation.y);
--- a/src/share/classes/javax/swing/text/html/parser/Parser.java	Fri Oct 19 16:49:25 2012 -0700
+++ b/src/share/classes/javax/swing/text/html/parser/Parser.java	Wed Nov 07 13:09:47 2012 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -952,7 +952,7 @@
                         ch = readCh();
                         break;
                 }
-                char data[] = {mapNumericReference((char) n)};
+                char data[] = mapNumericReference(n);
                 return data;
             }
             addString('#');
@@ -1021,7 +1021,7 @@
     }
 
     /**
-     * Converts numeric character reference to Unicode character.
+     * Converts numeric character reference to char array.
      *
      * Normally the code in a reference should be always converted
      * to the Unicode character with the same code, but due to
@@ -1030,13 +1030,21 @@
      * to displayable characters with other codes.
      *
      * @param c the code of numeric character reference.
-     * @return the character corresponding to the reference code.
+     * @return a char array corresponding to the reference code.
      */
-    private char mapNumericReference(char c) {
-        if (c < 130 || c > 159) {
-            return c;
+    private char[] mapNumericReference(int c) {
+        char[] data;
+        if (c >= 0xffff) { // outside unicode BMP.
+            try {
+                data = Character.toChars(c);
+            } catch (IllegalArgumentException e) {
+                data = new char[0];
+            }
+        } else {
+            data = new char[1];
+            data[0] = (c < 130 || c > 159) ? (char) c : cp1252Map[c - 130];
         }
-        return cp1252Map[c - 130];
+        return data;
     }
 
     /**
--- a/src/share/classes/sun/awt/AWTAccessor.java	Fri Oct 19 16:49:25 2012 -0700
+++ b/src/share/classes/sun/awt/AWTAccessor.java	Wed Nov 07 13:09:47 2012 -0800
@@ -668,6 +668,21 @@
     }
 
     /*
+     * An accessor for the SequencedEventAccessor class
+     */
+    public interface SequencedEventAccessor {
+        /*
+         * Returns the nested event.
+         */
+        AWTEvent getNested(AWTEvent sequencedEvent);
+
+        /*
+         * Returns true if the event is an instances of SequencedEvent.
+         */
+        boolean isSequencedEvent(AWTEvent event);
+    }
+
+    /*
      * Accessor instances are initialized in the static initializers of
      * corresponding AWT classes by using setters defined below.
      */
@@ -693,6 +708,7 @@
     private static SystemTrayAccessor systemTrayAccessor;
     private static TrayIconAccessor trayIconAccessor;
     private static DefaultKeyboardFocusManagerAccessor defaultKeyboardFocusManagerAccessor;
+    private static SequencedEventAccessor sequencedEventAccessor;
 
     /*
      * Set an accessor object for the java.awt.Component class.
@@ -1071,4 +1087,20 @@
         return defaultKeyboardFocusManagerAccessor;
     }
 
+    /*
+     * Set an accessor object for the java.awt.SequencedEvent class.
+     */
+    public static void setSequencedEventAccessor(SequencedEventAccessor sea) {
+        sequencedEventAccessor = sea;
+    }
+
+    /*
+     * Get the accessor object for the java.awt.SequencedEvent class.
+     */
+    public static SequencedEventAccessor getSequencedEventAccessor() {
+        // The class is not public. So we can't ensure it's initialized.
+        // Null returned value means it's not initialized
+        // (so not a single instance of the event has been created).
+        return sequencedEventAccessor;
+    }
 }
--- a/src/share/classes/sun/awt/SunToolkit.java	Fri Oct 19 16:49:25 2012 -0700
+++ b/src/share/classes/sun/awt/SunToolkit.java	Wed Nov 07 13:09:47 2012 -0800
@@ -462,6 +462,19 @@
         if (event == null) {
             throw new NullPointerException();
         }
+
+        AWTAccessor.SequencedEventAccessor sea = AWTAccessor.getSequencedEventAccessor();
+        if (sea != null && sea.isSequencedEvent(event)) {
+            AWTEvent nested = sea.getNested(event);
+            if (nested.getID() == WindowEvent.WINDOW_LOST_FOCUS &&
+                nested instanceof TimedWindowEvent)
+            {
+                TimedWindowEvent twe = (TimedWindowEvent)nested;
+                ((SunToolkit)Toolkit.getDefaultToolkit()).
+                    setWindowDeactivationTime((Window)twe.getSource(), twe.getWhen());
+            }
+        }
+
         // All events posted via this method are system-generated.
         // Placing the following call here reduces considerably the
         // number of places throughout the toolkit that would
@@ -1857,6 +1870,28 @@
         return false;
     }
 
+    private static final Object DEACTIVATION_TIMES_MAP_KEY = new Object();
+
+    public synchronized void setWindowDeactivationTime(Window w, long time) {
+        AppContext ctx = getAppContext(w);
+        WeakHashMap<Window, Long> map = (WeakHashMap<Window, Long>)ctx.get(DEACTIVATION_TIMES_MAP_KEY);
+        if (map == null) {
+            map = new WeakHashMap<Window, Long>();
+            ctx.put(DEACTIVATION_TIMES_MAP_KEY, map);
+        }
+        map.put(w, time);
+    }
+
+    public synchronized long getWindowDeactivationTime(Window w) {
+        AppContext ctx = getAppContext(w);
+        WeakHashMap<Window, Long> map = (WeakHashMap<Window, Long>)ctx.get(DEACTIVATION_TIMES_MAP_KEY);
+        if (map == null) {
+            return -1;
+        }
+        Long time = map.get(w);
+        return time == null ? -1 : time;
+    }
+
     // Cosntant alpha
     public boolean isWindowOpacitySupported() {
         return false;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/awt/TimedWindowEvent.java	Wed Nov 07 13:09:47 2012 -0800
@@ -0,0 +1,51 @@
+/*
+ * 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.awt;
+
+import java.awt.event.WindowEvent;
+import java.awt.Window;
+
+public class TimedWindowEvent extends WindowEvent {
+
+    private long time;
+
+    public long getWhen() {
+        return time;
+    }
+
+    public TimedWindowEvent(Window source, int id, Window opposite, long time) {
+        super(source, id, opposite);
+        this.time = time;
+    }
+
+    public TimedWindowEvent(Window source, int id, Window opposite,
+                            int oldState, int newState, long time)
+    {
+        super(source, id, opposite, oldState, newState);
+        this.time = time;
+    }
+}
+
--- a/src/share/classes/sun/print/PSPrinterJob.java	Fri Oct 19 16:49:25 2012 -0700
+++ b/src/share/classes/sun/print/PSPrinterJob.java	Wed Nov 07 13:09:47 2012 -0800
@@ -68,14 +68,18 @@
 
 import java.io.BufferedInputStream;
 import java.io.BufferedOutputStream;
+import java.io.BufferedReader;
 import java.io.CharConversionException;
 import java.io.File;
 import java.io.InputStream;
+import java.io.InputStreamReader;
 import java.io.IOException;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.OutputStream;
 import java.io.PrintStream;
+import java.io.PrintWriter;
+import java.io.StringWriter;
 
 import java.util.ArrayList;
 import java.util.Enumeration;
@@ -674,15 +678,38 @@
     private class PrinterSpooler implements java.security.PrivilegedAction {
         PrinterException pex;
 
+        private void handleProcessFailure(final Process failedProcess,
+                final String[] execCmd, final int result) throws IOException {
+            try (StringWriter sw = new StringWriter();
+                    PrintWriter pw = new PrintWriter(sw)) {
+                pw.append("error=").append(Integer.toString(result));
+                pw.append(" running:");
+                for (String arg: execCmd) {
+                    pw.append(" '").append(arg).append("'");
+                }
+                try (InputStream is = failedProcess.getErrorStream();
+                        InputStreamReader isr = new InputStreamReader(is);
+                        BufferedReader br = new BufferedReader(isr)) {
+                    while (br.ready()) {
+                        pw.println();
+                        pw.append("\t\t").append(br.readLine());
+                    }
+                } finally {
+                    pw.flush();
+                    throw new IOException(sw.toString());
+                }
+            }
+        }
+
         public Object run() {
+            if (spoolFile == null || !spoolFile.exists()) {
+               pex = new PrinterException("No spool file");
+               return null;
+            }
             try {
                 /**
                  * Spool to the printer.
                  */
-                if (spoolFile == null || !spoolFile.exists()) {
-                   pex = new PrinterException("No spool file");
-                   return null;
-                }
                 String fileName = spoolFile.getAbsolutePath();
                 String execCmd[] = printExecCmd(mDestination, mOptions,
                                mNoJobSheet, getJobNameInt(),
@@ -690,12 +717,16 @@
 
                 Process process = Runtime.getRuntime().exec(execCmd);
                 process.waitFor();
-                spoolFile.delete();
-
+                final int result = process.exitValue();
+                if (0 != result) {
+                    handleProcessFailure(process, execCmd, result);
+                }
             } catch (IOException ex) {
                 pex = new PrinterIOException(ex);
             } catch (InterruptedException ie) {
                 pex = new PrinterException(ie.toString());
+            } finally {
+                spoolFile.delete();
             }
             return null;
         }
--- a/src/share/classes/sun/util/resources/CurrencyNames_es_VE.properties	Fri Oct 19 16:49:25 2012 -0700
+++ b/src/share/classes/sun/util/resources/CurrencyNames_es_VE.properties	Wed Nov 07 13:09:47 2012 -0800
@@ -36,5 +36,5 @@
 # Taligent is a registered trademark of Taligent, Inc.
 
 VEB=Bs
-VEF=BsF.
+VEF=Bs.F.
 
--- a/src/solaris/classes/java/lang/Terminator.java	Fri Oct 19 16:49:25 2012 -0700
+++ b/src/solaris/classes/java/lang/Terminator.java	Wed Nov 07 13:09:47 2012 -0800
@@ -53,14 +53,20 @@
             }
         };
         handler = sh;
+        // When -Xrs is specified the user is responsible for
+        // ensuring that shutdown hooks are run by calling
+        // System.exit()
         try {
             Signal.handle(new Signal("HUP"), sh);
+        } catch (IllegalArgumentException e) {
+        }
+        try {
             Signal.handle(new Signal("INT"), sh);
+        } catch (IllegalArgumentException e) {
+        }
+        try {
             Signal.handle(new Signal("TERM"), sh);
         } catch (IllegalArgumentException e) {
-            // When -Xrs is specified the user is responsible for
-            // ensuring that shutdown hooks are run by calling
-            // System.exit()
         }
     }
 
--- a/src/solaris/classes/sun/font/FontConfigManager.java	Fri Oct 19 16:49:25 2012 -0700
+++ b/src/solaris/classes/sun/font/FontConfigManager.java	Wed Nov 07 13:09:47 2012 -0800
@@ -347,6 +347,11 @@
         name = name.toLowerCase();
 
         initFontConfigFonts(false);
+        if (fontConfigFonts == null) {
+            // This avoids an immediate NPE if fontconfig look up failed
+            // but doesn't guarantee this is a recoverable situation.
+            return null;
+        }
 
         FcCompFont fcInfo = null;
         for (int i=0; i<fontConfigFonts.length; i++) {
--- a/src/solaris/classes/sun/print/UnixPrintJob.java	Fri Oct 19 16:49:25 2012 -0700
+++ b/src/solaris/classes/sun/print/UnixPrintJob.java	Wed Nov 07 13:09:47 2012 -0800
@@ -38,7 +38,9 @@
 import java.io.OutputStream;
 import java.io.OutputStreamWriter;
 import java.io.IOException;
+import java.io.PrintWriter;
 import java.io.Reader;
+import java.io.StringWriter;
 import java.io.UnsupportedEncodingException;
 import java.nio.file.Files;
 import java.util.Vector;
@@ -956,23 +958,49 @@
     private class PrinterSpooler implements java.security.PrivilegedAction {
         PrintException pex;
 
+        private void handleProcessFailure(final Process failedProcess,
+                final String[] execCmd, final int result) throws IOException {
+            try (StringWriter sw = new StringWriter();
+                    PrintWriter pw = new PrintWriter(sw)) {
+                pw.append("error=").append(Integer.toString(result));
+                pw.append(" running:");
+                for (String arg: execCmd) {
+                    pw.append(" '").append(arg).append("'");
+                }
+                try (InputStream is = failedProcess.getErrorStream();
+                        InputStreamReader isr = new InputStreamReader(is);
+                        BufferedReader br = new BufferedReader(isr)) {
+                    while (br.ready()) {
+                        pw.println();
+                        pw.append("\t\t").append(br.readLine());
+                    }
+                } finally {
+                    pw.flush();
+                    throw new IOException(sw.toString());
+                }
+            }
+        }
+
         public Object run() {
+            if (spoolFile == null || !spoolFile.exists()) {
+               pex = new PrintException("No spool file");
+               notifyEvent(PrintJobEvent.JOB_FAILED);
+               return null;
+            }
             try {
                 /**
                  * Spool to the printer.
                  */
-                if (spoolFile == null || !spoolFile.exists()) {
-                   pex = new PrintException("No spool file");
-                   notifyEvent(PrintJobEvent.JOB_FAILED);
-                   return null;
-                }
                 String fileName = spoolFile.getAbsolutePath();
                 String execCmd[] = printExecCmd(mDestination, mOptions,
                                mNoJobSheet, jobName, copies, fileName);
 
                 Process process = Runtime.getRuntime().exec(execCmd);
                 process.waitFor();
-                spoolFile.delete();
+                final int result = process.exitValue();
+                if (0 != result) {
+                    handleProcessFailure(process, execCmd, result);
+                }
                 notifyEvent(PrintJobEvent.DATA_TRANSFER_COMPLETE);
             } catch (IOException ex) {
                 notifyEvent(PrintJobEvent.JOB_FAILED);
@@ -982,6 +1010,7 @@
                 notifyEvent(PrintJobEvent.JOB_FAILED);
                 pex = new PrintException(ie);
             } finally {
+                spoolFile.delete();
                 notifyEvent(PrintJobEvent.NO_MORE_EVENTS);
             }
             return null;
--- a/src/solaris/native/java/net/Inet4AddressImpl.c	Fri Oct 19 16:49:25 2012 -0700
+++ b/src/solaris/native/java/net/Inet4AddressImpl.c	Wed Nov 07 13:09:47 2012 -0800
@@ -196,7 +196,7 @@
                 struct addrinfo *next
                     = (struct addrinfo*) malloc(sizeof(struct addrinfo));
                 if (!next) {
-                    JNU_ThrowOutOfMemoryError(env, "heap allocation failed");
+                    JNU_ThrowOutOfMemoryError(env, "Native heap allocation failed");
                     ret = NULL;
                     goto cleanupAndReturn;
                 }
--- a/src/solaris/native/java/net/Inet6AddressImpl.c	Fri Oct 19 16:49:25 2012 -0700
+++ b/src/solaris/native/java/net/Inet6AddressImpl.c	Wed Nov 07 13:09:47 2012 -0800
@@ -270,7 +270,7 @@
                     struct addrinfo *next
                         = (struct addrinfo*) malloc(sizeof(struct addrinfo));
                     if (!next) {
-                        JNU_ThrowOutOfMemoryError(env, "heap allocation failed");
+                        JNU_ThrowOutOfMemoryError(env, "Native heap allocation failed");
                         ret = NULL;
                         goto cleanupAndReturn;
                     }
--- a/src/solaris/native/java/net/NetworkInterface.c	Fri Oct 19 16:49:25 2012 -0700
+++ b/src/solaris/native/java/net/NetworkInterface.c	Wed Nov 07 13:09:47 2012 -0800
@@ -804,7 +804,7 @@
        do{ \
         _pointer = (_type)malloc( _size ); \
         if (_pointer == NULL) { \
-            JNU_ThrowOutOfMemoryError(env, "heap allocation failed"); \
+            JNU_ThrowOutOfMemoryError(env, "Native heap allocation failed"); \
             return ifs; /* return untouched list */ \
         } \
        } while(0)
--- a/src/solaris/native/java/net/PlainDatagramSocketImpl.c	Fri Oct 19 16:49:25 2012 -0700
+++ b/src/solaris/native/java/net/PlainDatagramSocketImpl.c	Wed Nov 07 13:09:47 2012 -0800
@@ -485,7 +485,7 @@
         fullPacket = (char *)malloc(packetBufferLen);
 
         if (!fullPacket) {
-            JNU_ThrowOutOfMemoryError(env, "heap allocation failed");
+            JNU_ThrowOutOfMemoryError(env, "Send buffer native heap allocation failed");
             return;
         } else {
             mallocedPacket = JNI_TRUE;
@@ -714,7 +714,7 @@
         fullPacket = (char *)malloc(packetBufferLen);
 
         if (!fullPacket) {
-            JNU_ThrowOutOfMemoryError(env, "heap allocation failed");
+            JNU_ThrowOutOfMemoryError(env, "Peek buffer native heap allocation failed");
             return -1;
         } else {
             mallocedPacket = JNI_TRUE;
@@ -874,7 +874,7 @@
         fullPacket = (char *)malloc(packetBufferLen);
 
         if (!fullPacket) {
-            JNU_ThrowOutOfMemoryError(env, "heap allocation failed");
+            JNU_ThrowOutOfMemoryError(env, "Receive buffer native heap allocation failed");
             return;
         } else {
             mallocedPacket = JNI_TRUE;
@@ -1350,19 +1350,18 @@
          * value is an InetAddress.
          */
 #ifdef AF_INET6
-#if defined(__solaris__) || defined(MACOSX)
+#ifdef __linux__
+        mcast_set_if_by_addr_v4(env, this, fd, value);
+        if (ipv6_available()) {
+            mcast_set_if_by_addr_v6(env, this, fd, value);
+        }
+#else  /* __linux__ not defined */
         if (ipv6_available()) {
             mcast_set_if_by_addr_v6(env, this, fd, value);
         } else {
             mcast_set_if_by_addr_v4(env, this, fd, value);
         }
-#endif
-#ifdef __linux__
-        mcast_set_if_by_addr_v4(env, this, fd, value);
-        if (ipv6_available()) {
-            mcast_set_if_by_addr_v6(env, this, fd, value);
-        }
-#endif
+#endif  /* __linux__ */
 #else
         mcast_set_if_by_addr_v4(env, this, fd, value);
 #endif  /* AF_INET6 */
@@ -1373,19 +1372,18 @@
          * value is a NetworkInterface.
          */
 #ifdef AF_INET6
-#if defined(__solaris__) || defined(MACOSX)
+#ifdef __linux__
+        mcast_set_if_by_if_v4(env, this, fd, value);
+        if (ipv6_available()) {
+            mcast_set_if_by_if_v6(env, this, fd, value);
+        }
+#else  /* __linux__ not defined */
         if (ipv6_available()) {
             mcast_set_if_by_if_v6(env, this, fd, value);
         } else {
             mcast_set_if_by_if_v4(env, this, fd, value);
         }
-#endif
-#ifdef __linux__
-        mcast_set_if_by_if_v4(env, this, fd, value);
-        if (ipv6_available()) {
-            mcast_set_if_by_if_v6(env, this, fd, value);
-        }
-#endif
+#endif  /* __linux__ */
 #else
         mcast_set_if_by_if_v4(env, this, fd, value);
 #endif  /* AF_INET6 */
@@ -1456,19 +1454,18 @@
 static void setMulticastLoopbackMode(JNIEnv *env, jobject this, int fd,
                                   jint opt, jobject value) {
 #ifdef AF_INET6
-#if defined(__solaris__) || defined(MACOSX)
+#ifdef __linux__
+    mcast_set_loop_v4(env, this, fd, value);
+    if (ipv6_available()) {
+        mcast_set_loop_v6(env, this, fd, value);
+    }
+#else  /* __linux__ not defined */
     if (ipv6_available()) {
         mcast_set_loop_v6(env, this, fd, value);
     } else {
         mcast_set_loop_v4(env, this, fd, value);
     }
-#endif
-#ifdef __linux__
-    mcast_set_loop_v4(env, this, fd, value);
-    if (ipv6_available()) {
-        mcast_set_loop_v6(env, this, fd, value);
-    }
-#endif
+#endif  /* __linux__ */
 #else
     mcast_set_loop_v4(env, this, fd, value);
 #endif  /* AF_INET6 */
@@ -2030,13 +2027,6 @@
     }
     /* setsockopt to be correct ttl */
 #ifdef AF_INET6
-#if defined(__solaris__) || defined(MACOSX)
-    if (ipv6_available()) {
-        setHopLimit(env, fd, ttl);
-    } else {
-        setTTL(env, fd, ttl);
-    }
-#endif
 #ifdef __linux__
     setTTL(env, fd, ttl);
     if (ipv6_available()) {
@@ -2045,7 +2035,13 @@
             (*env)->SetIntField(env, this, pdsi_ttlID, ttl);
         }
     }
-#endif  // __linux__
+#else  /*  __linux__ not defined */
+    if (ipv6_available()) {
+        setHopLimit(env, fd, ttl);
+    } else {
+        setTTL(env, fd, ttl);
+    }
+#endif  /* __linux__ */
 #else
     setTTL(env, fd, ttl);
 #endif  /* AF_INET6 */
--- a/src/solaris/native/sun/java2d/x11/X11SurfaceData.c	Fri Oct 19 16:49:25 2012 -0700
+++ b/src/solaris/native/sun/java2d/x11/X11SurfaceData.c	Wed Nov 07 13:09:47 2012 -0800
@@ -563,6 +563,8 @@
         J2dRlsTraceLn1(J2D_TRACE_ERROR,
                        "X11SD_SetupSharedSegment shmget has failed: %s",
                        strerror(errno));
+        free((void *)shminfo);
+        XDestroyImage(img);
         return NULL;
     }
 
@@ -572,6 +574,8 @@
         J2dRlsTraceLn1(J2D_TRACE_ERROR,
                        "X11SD_SetupSharedSegment shmat has failed: %s",
                        strerror(errno));
+        free((void *)shminfo);
+        XDestroyImage(img);
         return NULL;
     }
 
@@ -592,6 +596,9 @@
         J2dRlsTraceLn1(J2D_TRACE_ERROR,
                        "X11SD_SetupSharedSegment XShmAttach has failed: %s",
                        strerror(errno));
+        shmdt(shminfo->shmaddr);
+        free((void *)shminfo);
+        XDestroyImage(img);
         return NULL;
     }
 
@@ -1485,13 +1492,10 @@
 #ifdef MITSHM
         if (image->obdata != NULL) {
             X11SD_DropSharedSegment((XShmSegmentInfo*)image->obdata);
-        } else {
-            free(image->data);
+            image->obdata = NULL;
         }
-#else
-        free(image->data);
 #endif /* MITSHM */
-        XFree(image);
+        XDestroyImage(image);
     }
 }
 
--- a/src/solaris/native/sun/nio/ch/EPollArrayWrapper.c	Fri Oct 19 16:49:25 2012 -0700
+++ b/src/solaris/native/sun/nio/ch/EPollArrayWrapper.c	Wed Nov 07 13:09:47 2012 -0800
@@ -30,39 +30,9 @@
 
 #include "sun_nio_ch_EPollArrayWrapper.h"
 
-#include <dlfcn.h>
 #include <unistd.h>
 #include <sys/time.h>
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-/* epoll_wait(2) man page */
-
-typedef union epoll_data {
-    void *ptr;
-    int fd;
-    __uint32_t u32;
-    __uint64_t u64;
-} epoll_data_t;
-
-
-/* x86-64 has same alignment as 32-bit */
-#ifdef __x86_64__
-#define EPOLL_PACKED __attribute__((packed))
-#else
-#define EPOLL_PACKED
-#endif
-
-struct epoll_event {
-    __uint32_t events;  /* Epoll events */
-    epoll_data_t data;  /* User data variable */
-} EPOLL_PACKED;
-
-#ifdef  __cplusplus
-}
-#endif
+#include <sys/epoll.h>
 
 #define RESTARTABLE(_cmd, _result) do { \
   do { \
@@ -70,18 +40,6 @@
   } while((_result == -1) && (errno == EINTR)); \
 } while(0)
 
-/*
- * epoll event notification is new in 2.6 kernel. As the offical build
- * platform for the JDK is on a 2.4-based distribution then we must
- * obtain the addresses of the epoll functions dynamically.
- */
-typedef int (*epoll_create_t)(int size);
-typedef int (*epoll_ctl_t)   (int epfd, int op, int fd, struct epoll_event *event);
-typedef int (*epoll_wait_t)  (int epfd, struct epoll_event *events, int maxevents, int timeout);
-
-static epoll_create_t epoll_create_func;
-static epoll_ctl_t    epoll_ctl_func;
-static epoll_wait_t   epoll_wait_func;
 
 static int
 iepoll(int epfd, struct epoll_event *events, int numfds, jlong timeout)
@@ -95,7 +53,7 @@
     start = t.tv_sec * 1000 + t.tv_usec / 1000;
 
     for (;;) {
-        int res = (*epoll_wait_func)(epfd, events, numfds, timeout);
+        int res = epoll_wait(epfd, events, numfds, timeout);
         if (res < 0 && errno == EINTR) {
             if (remaining >= 0) {
                 gettimeofday(&t, NULL);
@@ -116,14 +74,6 @@
 JNIEXPORT void JNICALL
 Java_sun_nio_ch_EPollArrayWrapper_init(JNIEnv *env, jclass this)
 {
-    epoll_create_func = (epoll_create_t) dlsym(RTLD_DEFAULT, "epoll_create");
-    epoll_ctl_func    = (epoll_ctl_t)    dlsym(RTLD_DEFAULT, "epoll_ctl");
-    epoll_wait_func   = (epoll_wait_t)   dlsym(RTLD_DEFAULT, "epoll_wait");
-
-    if ((epoll_create_func == NULL) || (epoll_ctl_func == NULL) ||
-        (epoll_wait_func == NULL)) {
-        JNU_ThrowInternalError(env, "unable to get address of epoll functions, pre-2.6 kernel?");
-    }
 }
 
 JNIEXPORT jint JNICALL
@@ -133,7 +83,7 @@
      * epoll_create expects a size as a hint to the kernel about how to
      * dimension internal structures. We can't predict the size in advance.
      */
-    int epfd = (*epoll_create_func)(256);
+    int epfd = epoll_create(256);
     if (epfd < 0) {
        JNU_ThrowIOExceptionWithLastError(env, "epoll_create failed");
     }
@@ -162,7 +112,7 @@
     event.events = events;
     event.data.fd = fd;
 
-    RESTARTABLE((*epoll_ctl_func)(epfd, (int)opcode, (int)fd, &event), res);
+    RESTARTABLE(epoll_ctl(epfd, (int)opcode, (int)fd, &event), res);
 
     /*
      * A channel may be registered with several Selectors. When each Selector
@@ -188,7 +138,7 @@
     int res;
 
     if (timeout <= 0) {           /* Indefinite or no wait */
-        RESTARTABLE((*epoll_wait_func)(epfd, events, numfds, timeout), res);
+        RESTARTABLE(epoll_wait(epfd, events, numfds, timeout), res);
     } else {                      /* Bounded wait; bounded restarts */
         res = iepoll(epfd, events, numfds, timeout);
     }
--- a/src/windows/classes/java/lang/Terminator.java	Fri Oct 19 16:49:25 2012 -0700
+++ b/src/windows/classes/java/lang/Terminator.java	Wed Nov 07 13:09:47 2012 -0800
@@ -53,13 +53,17 @@
             }
         };
         handler = sh;
+
+        // When -Xrs is specified the user is responsible for
+        // ensuring that shutdown hooks are run by calling
+        // System.exit()
         try {
             Signal.handle(new Signal("INT"), sh);
+        } catch (IllegalArgumentException e) {
+        }
+        try {
             Signal.handle(new Signal("TERM"), sh);
         } catch (IllegalArgumentException e) {
-            // When -Xrs is specified the user is responsible for
-            // ensuring that shutdown hooks are run by calling
-            // System.exit()
         }
     }
 
--- a/src/windows/classes/sun/java2d/ScreenUpdateManager.java	Fri Oct 19 16:49:25 2012 -0700
+++ b/src/windows/classes/sun/java2d/ScreenUpdateManager.java	Wed Nov 07 13:09:47 2012 -0800
@@ -111,7 +111,7 @@
                                                    SurfaceData oldsd)
     {
         SurfaceData surfaceData = peer.getSurfaceData();
-        if (surfaceData.isValid()) {
+        if (surfaceData == null || surfaceData.isValid()) {
             return surfaceData;
         }
         peer.replaceSurfaceData();
--- a/src/windows/native/java/net/DualStackPlainDatagramSocketImpl.c	Fri Oct 19 16:49:25 2012 -0700
+++ b/src/windows/native/java/net/DualStackPlainDatagramSocketImpl.c	Wed Nov 07 13:09:47 2012 -0800
@@ -265,7 +265,7 @@
         }
         fullPacket = (char *)malloc(packetBufferLen);
         if (!fullPacket) {
-            JNU_ThrowOutOfMemoryError(env, "heap allocation failed");
+            JNU_ThrowOutOfMemoryError(env, "Native heap allocation failed");
             return -1;
         }
     } else {
@@ -427,7 +427,7 @@
         }
         fullPacket = (char *)malloc(length);
         if (!fullPacket) {
-            JNU_ThrowOutOfMemoryError(env, "heap allocation failed");
+            JNU_ThrowOutOfMemoryError(env, "Native heap allocation failed");
             return;
         }
     } else {
--- a/src/windows/native/java/net/Inet6AddressImpl.c	Fri Oct 19 16:49:25 2012 -0700
+++ b/src/windows/native/java/net/Inet6AddressImpl.c	Wed Nov 07 13:09:47 2012 -0800
@@ -197,7 +197,7 @@
                 struct addrinfo *next
                     = (struct addrinfo*) malloc(sizeof(struct addrinfo));
                 if (!next) {
-                    JNU_ThrowOutOfMemoryError(env, "heap allocation failed");
+                    JNU_ThrowOutOfMemoryError(env, "Native heap allocation failed");
                     ret = NULL;
                     goto cleanupAndReturn;
                 }
--- a/src/windows/native/java/net/NetworkInterface.c	Fri Oct 19 16:49:25 2012 -0700
+++ b/src/windows/native/java/net/NetworkInterface.c	Wed Nov 07 13:09:47 2012 -0800
@@ -266,7 +266,7 @@
             }
         }
         if (curr == NULL) {
-            JNU_ThrowOutOfMemoryError(env, "heap allocation failure");
+            JNU_ThrowOutOfMemoryError(env, "Native heap allocation failure");
             free_netif(netifP);
             free(tableP);
             return -1;
@@ -366,7 +366,7 @@
 
             netaddr *curr = (netaddr *)malloc(sizeof(netaddr));
             if (curr == NULL) {
-                JNU_ThrowOutOfMemoryError(env, "heap allocation failure");
+                JNU_ThrowOutOfMemoryError(env, "Native heap allocation failure");
                 free_netaddr(netaddrP);
                 free(tableP);
                 return -1;
--- a/src/windows/native/java/net/TwoStacksPlainDatagramSocketImpl.c	Fri Oct 19 16:49:25 2012 -0700
+++ b/src/windows/native/java/net/TwoStacksPlainDatagramSocketImpl.c	Wed Nov 07 13:09:47 2012 -0800
@@ -243,7 +243,7 @@
                                 addrList = curr;
                             }
                             LeaveCriticalSection(&sizeCheckLock);
-                            JNU_ThrowOutOfMemoryError(env, "heap allocation failed");
+                            JNU_ThrowOutOfMemoryError(env, "Native heap allocation failed");
                             return JNI_TRUE;
                         }
                         curr->addr = htonl((*addrp)->S_un.S_addr);
@@ -740,7 +740,7 @@
          */
         fullPacket = (char *)malloc(packetBufferLen);
         if (!fullPacket) {
-            JNU_ThrowOutOfMemoryError(env, "heap allocation failed");
+            JNU_ThrowOutOfMemoryError(env, "Send buf native heap allocation failed");
             return;
         }
     } else {
@@ -1003,7 +1003,7 @@
          */
         fullPacket = (char *)malloc(packetBufferLen);
         if (!fullPacket) {
-            JNU_ThrowOutOfMemoryError(env, "heap allocation failed");
+            JNU_ThrowOutOfMemoryError(env, "Native heap allocation failed");
             return -1;
         }
     } else {
@@ -1287,7 +1287,7 @@
          */
         fullPacket = (char *)malloc(packetBufferLen);
         if (!fullPacket) {
-            JNU_ThrowOutOfMemoryError(env, "heap allocation failed");
+            JNU_ThrowOutOfMemoryError(env, "Receive buf native heap allocation failed");
             return;
         }
     } else {
--- a/src/windows/native/java/util/TimeZone_md.c	Fri Oct 19 16:49:25 2012 -0700
+++ b/src/windows/native/java/util/TimeZone_md.c	Wed Nov 07 13:09:47 2012 -0800
@@ -165,6 +165,7 @@
     WCHAR *stdNamePtr = tzi.StandardName;
     DWORD valueSize;
     DWORD timeType;
+    int isVista;
 
     /*
      * Get the current time zone setting of the platform.
@@ -180,6 +181,7 @@
     ver.dwOSVersionInfoSize = sizeof(ver);
     GetVersionEx(&ver);
     isNT = ver.dwPlatformId == VER_PLATFORM_WIN32_NT;
+    isVista = isNT && ver.dwMajorVersion >= 6;
 
     ret = RegOpenKeyEx(HKEY_LOCAL_MACHINE, WIN_CURRENT_TZ_KEY, 0,
                        KEY_READ, (PHKEY)&hKey);
@@ -202,8 +204,13 @@
             ret = RegQueryValueExA(hKey, "DynamicDaylightTimeDisabled",
                                    NULL, &valueType, (LPBYTE) &val, &bufSize);
         }
+
         if (ret == ERROR_SUCCESS) {
-            if (val == 1) {
+            int daylightSavingsUpdateDisabledOther = val == 1 && tzi.DaylightDate.wMonth != 0;
+            int daylightSavingsUpdateDisabledVista = val == 1;
+            int daylightSavingsUpdateDisabled = isVista ? daylightSavingsUpdateDisabledVista : daylightSavingsUpdateDisabledOther;
+
+            if (daylightSavingsUpdateDisabled) {
                 (void) RegCloseKey(hKey);
                 customZoneName(tzi.Bias, winZoneName);
                 return VALUE_GMTOFFSET;
@@ -213,7 +220,7 @@
         /*
          * Vista has the key for the current "Time Zones" entry.
          */
-        if (isNT && ver.dwMajorVersion >= 6) {
+        if (isVista) {
             valueType = 0;
             bufSize = MAX_ZONE_CHAR;
             ret = RegQueryValueExA(hKey, "TimeZoneKeyName", NULL,
--- a/src/windows/native/sun/windows/awt_Window.cpp	Fri Oct 19 16:49:25 2012 -0700
+++ b/src/windows/native/sun/windows/awt_Window.cpp	Wed Nov 07 13:09:47 2012 -0800
@@ -1477,7 +1477,7 @@
     if (wClassEvent == NULL) {
         if (env->PushLocalFrame(1) < 0)
             return;
-        wClassEvent = env->FindClass("java/awt/event/WindowEvent");
+        wClassEvent = env->FindClass("sun/awt/TimedWindowEvent");
         if (wClassEvent != NULL) {
             wClassEvent = (jclass)env->NewGlobalRef(wClassEvent);
         }
@@ -1491,7 +1491,7 @@
     if (wEventInitMID == NULL) {
         wEventInitMID =
             env->GetMethodID(wClassEvent, "<init>",
-                             "(Ljava/awt/Window;ILjava/awt/Window;II)V");
+                             "(Ljava/awt/Window;ILjava/awt/Window;IIJ)V");
         DASSERT(wEventInitMID);
         if (wEventInitMID == NULL) {
             return;
@@ -1532,7 +1532,7 @@
         }
     }
     jobject event = env->NewObject(wClassEvent, wEventInitMID, target, id,
-                                   jOpposite, oldState, newState);
+                                   jOpposite, oldState, newState, TimeHelper::getMessageTimeUTC());
     DASSERT(!safe_ExceptionOccurred(env));
     DASSERT(event != NULL);
     if (jOpposite != NULL) {
@@ -1559,21 +1559,8 @@
 
 BOOL AwtWindow::AwtSetActiveWindow(BOOL isMouseEventCause, UINT hittest)
 {
-    // Fix for 6458497.
-    // Retreat if current foreground window is out of both our and embedder process.
-    // The exception is when activation is requested due to a mouse event.
-    if (!isMouseEventCause) {
-        HWND fgWindow = ::GetForegroundWindow();
-        if (NULL != fgWindow) {
-            DWORD fgProcessID;
-            ::GetWindowThreadProcessId(fgWindow, &fgProcessID);
-            if (fgProcessID != ::GetCurrentProcessId()
-                && !AwtToolkit::GetInstance().IsEmbedderProcessId(fgProcessID))
-            {
-                return FALSE;
-            }
-        }
-    }
+    // We used to reject non mouse window activation if our app wasn't active.
+    // This code since has been removed as the fix for 7185280
 
     HWND proxyContainerHWnd = GetProxyToplevelContainer();
     HWND proxyHWnd = GetProxyFocusOwner();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/java/swing/plaf/windows/WindowsRadioButtonUI/7089914/bug7089914.java	Wed Nov 07 13:09:47 2012 -0800
@@ -0,0 +1,77 @@
+/*
+ * 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 7089914
+ * @summary Focus on image icons are not visible in javaws cache with high contrast mode
+ * @author Sean Chou
+ */
+
+import javax.swing.*;
+import java.lang.reflect.Field;
+
+public class bug7089914 {
+
+    public static void main(String[] args) throws Exception {
+        try {
+            UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
+        } catch (Exception e) {
+            System.out.println("Not WindowsLookAndFeel, test skipped");
+
+            return;
+        }
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+            @Override
+            public void run() {
+
+                JRadioButton rb = new JRadioButton();
+
+                if (!"com.sun.java.swing.plaf.windows.WindowsRadioButtonUI".equals(rb.getUI().getClass().getName())) {
+                    throw new RuntimeException("Unexpected UI class of JRadioButton");
+                }
+
+                try {
+                    Field initializedField = rb.getUI().getClass().getDeclaredField("initialized");
+                    initializedField.setAccessible(true);
+
+                    if (!initializedField.getBoolean(rb.getUI())) {
+                        throw new RuntimeException("initialized is false");
+                    }
+
+                    rb.getUI().uninstallUI(rb);
+
+                    if (initializedField.getBoolean(rb.getUI())) {
+                        throw new RuntimeException("initialized is true");
+                    }
+                } catch (NoSuchFieldException | IllegalAccessException e) {
+                    throw new RuntimeException(e);
+                }
+            }
+        });
+    }
+}
--- a/test/java/nio/Buffer/Basic-X.java.template	Fri Oct 19 16:49:25 2012 -0700
+++ b/test/java/nio/Buffer/Basic-X.java.template	Wed Nov 07 13:09:47 2012 -0800
@@ -402,19 +402,6 @@
         ck(b, b.charAt(1), 'f');
         ck(b, b.subSequence(1, 3).toString().equals("fg"));
 
-        // String ops
-
-        // 7190219
-        b.clear();
-        int pos = b.position();
-        tryCatch(b, BufferOverflowException.class, new Runnable() {
-            public void run() {
-                b.put(String.valueOf(new char[b.capacity() + 1]), 0,
-                        b.capacity() + 1);
-            }});
-        ck(b, b.position(), pos);
-        relGet(b);
-
 #end[char]
 
         // Compact
--- a/test/java/nio/Buffer/Basic.java	Fri Oct 19 16:49:25 2012 -0700
+++ b/test/java/nio/Buffer/Basic.java	Wed Nov 07 13:09:47 2012 -0800
@@ -25,7 +25,7 @@
  * @summary Unit test for buffers
  * @bug 4413135 4414911 4416536 4416562 4418782 4471053 4472779 4490253 4523725
  *      4526177 4463011 4660660 4661219 4663521 4782970 4804304 4938424 6231529
- *      6221101 6234263 6535542 6591971 6593946 6795561 7190219
+ *      6221101 6234263 6535542 6591971 6593946 6795561
  * @author Mark Reinhold
  */
 
--- a/test/java/nio/Buffer/BasicByte.java	Fri Oct 19 16:49:25 2012 -0700
+++ b/test/java/nio/Buffer/BasicByte.java	Wed Nov 07 13:09:47 2012 -0800
@@ -404,19 +404,6 @@
 
 
 
-
-
-
-
-
-
-
-
-
-
-
-
-
         // Compact
 
         relPut(b);
--- a/test/java/nio/Buffer/BasicChar.java	Fri Oct 19 16:49:25 2012 -0700
+++ b/test/java/nio/Buffer/BasicChar.java	Wed Nov 07 13:09:47 2012 -0800
@@ -402,19 +402,6 @@
         ck(b, b.charAt(1), 'f');
         ck(b, b.subSequence(1, 3).toString().equals("fg"));
 
-        // String ops
-
-        // 7190219
-        b.clear();
-        int pos = b.position();
-        tryCatch(b, BufferOverflowException.class, new Runnable() {
-            public void run() {
-                b.put(String.valueOf(new char[b.capacity() + 1]), 0,
-                        b.capacity() + 1);
-            }});
-        ck(b, b.position(), pos);
-        relGet(b);
-
 
 
         // Compact
--- a/test/java/nio/Buffer/BasicDouble.java	Fri Oct 19 16:49:25 2012 -0700
+++ b/test/java/nio/Buffer/BasicDouble.java	Wed Nov 07 13:09:47 2012 -0800
@@ -404,19 +404,6 @@
 
 
 
-
-
-
-
-
-
-
-
-
-
-
-
-
         // Compact
 
         relPut(b);
--- a/test/java/nio/Buffer/BasicFloat.java	Fri Oct 19 16:49:25 2012 -0700
+++ b/test/java/nio/Buffer/BasicFloat.java	Wed Nov 07 13:09:47 2012 -0800
@@ -404,19 +404,6 @@
 
 
 
-
-
-
-
-
-
-
-
-
-
-
-
-
         // Compact
 
         relPut(b);
--- a/test/java/nio/Buffer/BasicInt.java	Fri Oct 19 16:49:25 2012 -0700
+++ b/test/java/nio/Buffer/BasicInt.java	Wed Nov 07 13:09:47 2012 -0800
@@ -404,19 +404,6 @@
 
 
 
-
-
-
-
-
-
-
-
-
-
-
-
-
         // Compact
 
         relPut(b);
--- a/test/java/nio/Buffer/BasicLong.java	Fri Oct 19 16:49:25 2012 -0700
+++ b/test/java/nio/Buffer/BasicLong.java	Wed Nov 07 13:09:47 2012 -0800
@@ -404,19 +404,6 @@
 
 
 
-
-
-
-
-
-
-
-
-
-
-
-
-
         // Compact
 
         relPut(b);
--- a/test/java/nio/Buffer/BasicShort.java	Fri Oct 19 16:49:25 2012 -0700
+++ b/test/java/nio/Buffer/BasicShort.java	Wed Nov 07 13:09:47 2012 -0800
@@ -404,19 +404,6 @@
 
 
 
-
-
-
-
-
-
-
-
-
-
-
-
-
         // Compact
 
         relPut(b);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/swing/JTable/7188612/JTableAccessibleGetLocationOnScreen.java	Wed Nov 07 13:09:47 2012 -0800
@@ -0,0 +1,106 @@
+/*
+ * 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 7188612
+ * @summary AccessibleTableHeader and AccessibleJTableCell should stick to
+ *    AccessibleComponent.getLocationOnScreen api.
+ * @author Frank Ding
+ */
+
+import javax.accessibility.AccessibleComponent;
+import javax.accessibility.AccessibleTable;
+import javax.swing.JComponent;
+import javax.swing.JFrame;
+import javax.swing.JTable;
+import javax.swing.SwingUtilities;
+
+public class JTableAccessibleGetLocationOnScreen {
+    private static JFrame frame;
+    private static JTable table;
+
+    public static void main(String[] args) throws Exception {
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+
+            @Override
+            public void run() {
+                constructInEDT();
+                try {
+                    assertGetLocation();
+                } finally {
+                    frame.dispose();
+                }
+            }
+        });
+
+    }
+
+    private static void constructInEDT() {
+        String[] columnNames = { "col1", "col2", };
+        Object[][] data = { { "row1, col1", "row1, col2" },
+                { "row2, col1", "row2, col2" }, };
+
+        frame = new JFrame(
+                "JTable AccessibleTableHeader and AccessibleJTableCell test");
+        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+        table = new JTable(data, columnNames);
+        frame.add(table);
+        frame.pack();
+    }
+
+    private static void assertGetLocation() {
+        // the frame is now invisible
+        // test getLocationOnScreen() of
+        // JTable$AccessibleJTable$AccessibleJTableHeaderCell
+        // and JTable$AccessibleJTable$AccessibleJTableCell
+        AccessibleTable accessibleTable = (AccessibleTable) table
+                .getAccessibleContext();
+        AccessibleTable header = accessibleTable.getAccessibleColumnHeader();
+        AccessibleComponent accessibleComp1 = (AccessibleComponent) header
+                .getAccessibleAt(0, 0);
+        // getLocation() must be null according to its javadoc and no exception
+        // is thrown
+        if (null != accessibleComp1.getLocationOnScreen()) {
+            throw new RuntimeException(
+                    "JTable$AccessibleJTable$AccessibleJTableHeaderCell."
+                            + "getLocation() must be null");
+        }
+
+        JComponent.AccessibleJComponent accessibleJComponent =
+                (JComponent.AccessibleJComponent) table.getAccessibleContext();
+        AccessibleComponent accessibleComp2 = (AccessibleComponent)
+                accessibleJComponent.getAccessibleChild(3);
+        // getLocation() must be null according to its javadoc and no exception
+        // is thrown
+        if (null != accessibleComp2.getLocationOnScreen()) {
+            throw new RuntimeException("JTable$AccessibleJTable$"
+                    + "AccessibleJTableCell.getLocation() must be null");
+        }
+
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/swing/text/html/parser/Parser/6836089/bug6836089.java	Wed Nov 07 13:09:47 2012 -0800
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2010, 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 6836089
+ * @summary Tests correct parsing of characters outside Base Multilingual Plane
+ * @author Vladislav Karnaukhov
+ */
+
+import javax.swing.*;
+import javax.swing.text.html.*;
+
+public class bug6836089 {
+
+    public static void main(String[] args) throws Exception {
+        SwingUtilities.invokeAndWait(new Runnable() {
+            @Override
+            public void run() {
+                JTextPane htmlPane = new JTextPane();
+                htmlPane.setEditorKit(new HTMLEditorKit());
+
+                htmlPane.setText("<html><head></head><body>&#131072;</body></html>");
+                String str = htmlPane.getText();
+                if (str.contains("&#0;")) {
+                    throw new RuntimeException("Test failed");
+                }
+            }
+        });
+    }
+}
--- a/test/sun/text/resources/LocaleData	Fri Oct 19 16:49:25 2012 -0700
+++ b/test/sun/text/resources/LocaleData	Wed Nov 07 13:09:47 2012 -0800
@@ -656,7 +656,6 @@
 FormatData/es_UY/NumberElements/2=;
 CurrencyNames/es_VE/VEB=Bs
 # bug 6570259
-CurrencyNames/es_VE/VEF=BsF.
 FormatData/es_VE/NumberPatterns/0=#,##0.###;-#,##0.###
 # FormatData/es_VE/NumberPatterns/1=Bs#,##0.00;Bs -#,##0.00 # Changed; see bug 4122840
 FormatData/es_VE/NumberPatterns/2=#,##0%
@@ -7003,6 +7002,8 @@
 CurrencyNames/zh_CN/tmt=\u571f\u5e93\u66fc\u65af\u5766\u65b0\u9a6c\u7eb3\u7279
 CurrencyNames/zh_CN/zwl=\u6d25\u5df4\u5e03\u97e6\u5143 (2009)
 
+# bug 7189611
+CurrencyNames/es_VE/VEF=Bs.F.
 CurrencyNames/zh_TW/cuc=\u53e4\u5df4\u53ef\u8f49\u63db\u62ab\u7d22
 CurrencyNames/zh_TW/tmt=\u571f\u5eab\u66fc\u65b0\u99ac\u7d0d\u7279
 CurrencyNames/zh_TW/zwl=\u8f9b\u5df4\u5a01\u5143 (2009)
--- a/test/sun/text/resources/LocaleDataTest.java	Fri Oct 19 16:49:25 2012 -0700
+++ b/test/sun/text/resources/LocaleDataTest.java	Wed Nov 07 13:09:47 2012 -0800
@@ -33,7 +33,7 @@
  *      6379214 6485516 6486607 4225362 4494727 6533691 6531591 6531593 6570259
  *      6509039 6609737 6610748 6645271 6507067 6873931 6450945 6645268 6646611
  *      6645405 6650730 6910489 6573250 6870908 6585666 6716626 6914413 6916787
- *      6919624 6998391 7019267 7020960 7025837 7020583 7036905 7066203
+ *      6919624 6998391 7019267 7020960 7025837 7020583 7036905 7066203 7189611
  * @summary Verify locale data
  *
  */