changeset 12336:2f3170c192c3

8098535: Test closed/java/awt/Clipboard/ImageTransferTest/ImageTransferTest fails on OEL 7.1 Reviewed-by: serb, azvegint
author ssadetsky
date Tue, 30 Jun 2015 10:45:32 +0300
parents e06161762a72
children 8044d252fa0b
files src/java.desktop/unix/native/libawt_xawt/xawt/XToolkit.c
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.desktop/unix/native/libawt_xawt/xawt/XToolkit.c	Mon Jun 29 13:47:28 2015 +0300
+++ b/src/java.desktop/unix/native/libawt_xawt/xawt/XToolkit.c	Tue Jun 30 10:45:32 2015 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, 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
@@ -554,8 +554,10 @@
             curPollTimeout = min(AWT_MAX_POLL_TIMEOUT, curPollTimeout);
         } else if (timeout_control == TIMEOUT_EVENTS) {
             /* subtract 1/4 (plus 1, in case the division truncates to 0) */
-            curPollTimeout -= ((curPollTimeout>>2) + 1);
-            curPollTimeout = max(AWT_MIN_POLL_TIMEOUT, curPollTimeout);
+            if (curPollTimeout > 0) {
+                curPollTimeout -= ((curPollTimeout>>2) + 1);
+                curPollTimeout = max(AWT_MIN_POLL_TIMEOUT, curPollTimeout);
+            }
         }
         break;
     case AWT_POLL_AGING_FAST: