equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
312 |
312 |
313 public $Type$Buffer put($Type$Buffer src) { |
313 public $Type$Buffer put($Type$Buffer src) { |
314 #if[rw] |
314 #if[rw] |
315 if (src instanceof Direct$Type$Buffer$BO$) { |
315 if (src instanceof Direct$Type$Buffer$BO$) { |
316 if (src == this) |
316 if (src == this) |
317 throw new IllegalArgumentException(); |
317 throw createSameBufferException(); |
318 Direct$Type$Buffer$RW$$BO$ sb = (Direct$Type$Buffer$RW$$BO$)src; |
318 Direct$Type$Buffer$RW$$BO$ sb = (Direct$Type$Buffer$RW$$BO$)src; |
319 |
319 |
320 int spos = sb.position(); |
320 int spos = sb.position(); |
321 int slim = sb.limit(); |
321 int slim = sb.limit(); |
322 assert (spos <= slim); |
322 assert (spos <= slim); |