OpenJDK / amber / amber
changeset 44113:2b76e807b769
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
author | bpb |
---|---|
date | Wed, 08 Mar 2017 12:14:25 -0800 |
parents | d0b2c775ec6d |
children | c6c96b739bad |
files | jdk/test/java/nio/channels/FileChannel/InterruptDeadlock.java |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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) {