8176394: Incorrect relational operator in java/nio/channels/FileChannel/InterruptDeadlock.java
authorbpb
Wed, 08 Mar 2017 12:14:25 -0800
changeset 44113 2b76e807b769
parent 44112 d0b2c775ec6d
child 44114 c6c96b739bad
8176394: Incorrect relational operator in java/nio/channels/FileChannel/InterruptDeadlock.java Summary: Change Reader thread run method so it reads continuously as intended Reviewed-by: alanb
jdk/test/java/nio/channels/FileChannel/InterruptDeadlock.java
--- a/jdk/test/java/nio/channels/FileChannel/InterruptDeadlock.java	Wed Mar 08 13:54:30 2017 -0500
+++ b/jdk/test/java/nio/channels/FileChannel/InterruptDeadlock.java	Wed Mar 08 12:14:25 2017 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -58,7 +58,7 @@
                     if (n > 0)
                         pos += n;
                     // fc.size is important here as it is position sensitive
-                    if (pos > fc.size())
+                    if (pos >= fc.size())
                         pos = 0L;
                 }
             } catch (ClosedChannelException x) {