src/java.base/share/classes/java/nio/X-Buffer.java.template
changeset 49282 271ef464fb3a
parent 49210 7c795d301dbf
child 49581 bd45ce23b1ac
--- a/src/java.base/share/classes/java/nio/X-Buffer.java.template	Thu Mar 22 08:41:06 2018 -0700
+++ b/src/java.base/share/classes/java/nio/X-Buffer.java.template	Thu Mar 22 09:07:08 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, 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
@@ -1337,7 +1337,7 @@
                                         that, that.position(),
                                         Math.min(this.remaining(), that.remaining()));
         if (i >= 0) {
-            return compare(this.get(this.position() + i), that.get(this.position() + i));
+            return compare(this.get(this.position() + i), that.get(that.position() + i));
         }
         return this.remaining() - that.remaining();
     }