8010814: More buffers are stored or returned without cloning

Reviewed-by: lancea
This commit is contained in:
Xue-Lei Andrew Fan 2013-05-16 04:30:45 -07:00
parent 9b4403735d
commit 9681f58b21
3 changed files with 5 additions and 3 deletions

View File

@ -42,7 +42,7 @@ public final class BerDecoder extends Ber {
*/
public BerDecoder(byte buf[], int offset, int bufsize) {
this.buf = buf;
this.buf = buf; // shared buffer, be careful to use this class
this.bufsize = bufsize;
this.origOffset = offset;

View File

@ -99,7 +99,7 @@ public final class BerEncoder extends Ber {
if (curSeqIndex != 0) {
throw new IllegalStateException("BER encode error: Unbalanced SEQUENCEs.");
}
return buf;
return buf; // shared buffer, be careful to use this method.
}
/**

View File

@ -134,7 +134,9 @@ final public class StartTlsResponseImpl extends StartTlsResponse {
* @see #negotiate
*/
public void setEnabledCipherSuites(String[] suites) {
this.suites = suites;
// The impl does accept null suites, although the spec requires
// a non-null list.
this.suites = suites == null ? null : suites.clone();
}
/**