Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: "Returning buffers" changed to "Exposing buffers" in Risk Assessment.

...

Code Block
bgColor#ccccff
final class Dup {
  CharBuffer cb;

  public Dup() {
    cb = CharBuffer.allocate(10);
    // Initialize
  }

  public CharBuffer getBufferCopy() {
    return cb.asReadOnlyBuffer();
  }
}

Risk Assessment

Returning Exposing buffers created using the wrap() or duplicate() methods may allow an untrusted caller to alter the contents of the original data.

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="41dce97d863482cf-8c018b72-4ea84b30-95b883e4-d6f93001a952a0cc6d49888c"><ac:plain-text-body><![CDATA[

[[API 2006

AA. Bibliography#API 06]]

class CharBuffer

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="28f0afbc51305fde-25fdc8bf-47354fc9-a8958f3b-a393a5e2f9a8c1b5882838f4"><ac:plain-text-body><![CDATA[

[[Hitchens 2002

AA. Bibliography#Hitchens 02]]

2.3 Duplicating Buffers

]]></ac:plain-text-body></ac:structured-macro>

...