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
--- 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) {