public CharBuffer decode(ByteBuffer bb) { try { CharsetDecoder decoder = (CharsetDecoder) cachedDecoder.get(); if (decoder == null) { decoder = newDecoder().onMalformedInput(CodingErrorAction.REPLACE).onUnmappableCharacter(CodingErrorAction.REPLACE); cachedDecoder.set(decoder);
public final CharBuffer decode (ByteBuffer bb) { try {     synchronized (Charset.class) { if (cachedDecoder == null) { cachedDecoder = newDecoder () .onMalformedInput (CodingErrorAction.REPLACE) .onUnmappableCharacter (CodingErrorAction.REPLACE); }  return cachedDecoder.decode (bb); }
	public CharBuffer decode(ByteBuffer bb) {		try {			CharsetDecoder decoder = (CharsetDecoder) cachedDecoder.get();			if (decoder == null) {				decoder = newDecoder().onMalformedInput(CodingErrorAction.REPLACE).onUnmappableCharacter(CodingErrorAction.REPLACE);				cachedDecoder.set(decoder);			}			decoder.reset();			return decoder.decode(bb);		} catch (CharacterCodingException e) {			throw new AssertionError(e);		}	}