src/share/classes/com/sun/corba/se/impl/encoding/CDROutputStream_1_0.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1997, 2004, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1997, 2011, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 1900,1932 **** // If they sharing the same ByteBuffer we need to ensure only // one of those ByteBuffers are released to the ByteBufferPool. if (getByteBufferWithInfo() != null && getByteBuffer() != null) { - int bbHash = System.identityHashCode(bbwi.byteBuffer); MessageMediator messageMediator = parent.getMessageMediator(); if (messageMediator != null) { CDRInputObject inputObj = (CDRInputObject)messageMediator.getInputObject(); if (inputObj != null) { ! ByteBuffer inputBb = inputObj.getByteBuffer(); ! ! int iBbHash = 0; ! if (inputBb != null) { - iBbHash = System.identityHashCode(inputBb); - if (bbHash == iBbHash) // shared? - { // Set InputStream's ByteBuffer and bbwi to null // so its ByteBuffer cannot be released to the pool inputObj.setByteBuffer(null); inputObj.setByteBufferWithInfo(null); } } - } } // release this stream's ByteBuffer to the pool ByteBufferPool byteBufferPool = orb.getByteBufferPool(); if (debug) --- 1900,1924 ---- // If they sharing the same ByteBuffer we need to ensure only // one of those ByteBuffers are released to the ByteBufferPool. if (getByteBufferWithInfo() != null && getByteBuffer() != null) { MessageMediator messageMediator = parent.getMessageMediator(); if (messageMediator != null) { CDRInputObject inputObj = (CDRInputObject)messageMediator.getInputObject(); if (inputObj != null) { ! if (inputObj.isSharing(getByteBuffer())) { // Set InputStream's ByteBuffer and bbwi to null // so its ByteBuffer cannot be released to the pool inputObj.setByteBuffer(null); inputObj.setByteBufferWithInfo(null); } } } // release this stream's ByteBuffer to the pool ByteBufferPool byteBufferPool = orb.getByteBufferPool(); if (debug)