Merge
authorasaha
Tue, 28 Jun 2011 08:39:36 -0700
changeset 10906 18ee92f0c62f
parent 10905 238185ac17e8 (diff)
parent 10039 490fdc65a2ca (current diff)
child 10907 ea32ea5b72d7
Merge
--- a/jdk/.jcheck/conf	Mon Jun 27 13:21:34 2011 -0700
+++ b/jdk/.jcheck/conf	Tue Jun 28 08:39:36 2011 -0700
@@ -1,1 +1,1 @@
-project=jdk7
+project=jdk8
--- a/jdk/src/share/classes/java/io/InputStream.java	Mon Jun 27 13:21:34 2011 -0700
+++ b/jdk/src/share/classes/java/io/InputStream.java	Tue Jun 28 08:39:36 2011 -0700
@@ -44,10 +44,9 @@
  */
 public abstract class InputStream implements Closeable {
 
-    // SKIP_BUFFER_SIZE is used to determine the size of skipBuffer
-    private static final int SKIP_BUFFER_SIZE = 2048;
-    // skipBuffer is initialized in skip(long), if needed.
-    private static byte[] skipBuffer;
+    // MAX_SKIP_BUFFER_SIZE is used to determine the maximum buffer size to
+    // use when skipping.
+    private static final int MAX_SKIP_BUFFER_SIZE = 2048;
 
     /**
      * Reads the next byte of data from the input stream. The value byte is
@@ -212,18 +211,15 @@
 
         long remaining = n;
         int nr;
-        if (skipBuffer == null)
-            skipBuffer = new byte[SKIP_BUFFER_SIZE];
-
-        byte[] localSkipBuffer = skipBuffer;
 
         if (n <= 0) {
             return 0;
         }
 
+        int size = (int)Math.min(MAX_SKIP_BUFFER_SIZE, remaining);
+        byte[] skipBuffer = new byte[size];
         while (remaining > 0) {
-            nr = read(localSkipBuffer, 0,
-                      (int) Math.min(SKIP_BUFFER_SIZE, remaining));
+            nr = read(skipBuffer, 0, (int)Math.min(size, remaining));
             if (nr < 0) {
                 break;
             }
--- a/jdk/src/windows/classes/java/lang/ProcessImpl.java	Mon Jun 27 13:21:34 2011 -0700
+++ b/jdk/src/windows/classes/java/lang/ProcessImpl.java	Tue Jun 28 08:39:36 2011 -0700
@@ -60,10 +60,11 @@
         throws IOException
     {
         if (append) {
+            String path = f.getPath();
             SecurityManager sm = System.getSecurityManager();
             if (sm != null)
-                sm.checkWrite(f.getPath());
-            long handle = openForAtomicAppend(f.getPath());
+                sm.checkWrite(path);
+            long handle = openForAtomicAppend(path);
             final FileDescriptor fd = new FileDescriptor();
             fdAccess.setHandle(fd, handle);
             return AccessController.doPrivileged(
--- a/jdk/src/windows/native/sun/windows/awt_Window.cpp	Mon Jun 27 13:21:34 2011 -0700
+++ b/jdk/src/windows/native/sun/windows/awt_Window.cpp	Tue Jun 28 08:39:36 2011 -0700
@@ -355,7 +355,7 @@
     RECT rect;
     CalculateWarningWindowBounds(env, &rect);
 
-    ::SetWindowPos(warningWindow, IsAlwaysOnTop() ? HWND_TOPMOST : GetHWnd(),
+    ::SetWindowPos(warningWindow, IsAlwaysOnTop() ? HWND_TOPMOST : HWND_NOTOPMOST,
             rect.left, rect.top,
             rect.right - rect.left, rect.bottom - rect.top,
             SWP_ASYNCWINDOWPOS | SWP_NOACTIVATE |
@@ -835,7 +835,7 @@
 
     if (securityAnimationKind == akShow) {
         ::SetWindowPos(warningWindow,
-                IsAlwaysOnTop() ? HWND_TOPMOST : GetHWnd(),
+                IsAlwaysOnTop() ? HWND_TOPMOST : HWND_NOTOPMOST,
                 0, 0, 0, 0,
                 SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOMOVE |
                 SWP_SHOWWINDOW | SWP_NOOWNERZORDER);