Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In returning a reference to the ht hash table, this example also hinders efficient garbage collection. See rule "OBJ11-J. Write garbage-collection-friendly code" for more information.

Compliant Solution (Shallow Copy)

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="aa27b62bb51b8680-9b15732b-43da4ff4-9952a8b9-38662778a2add916cf7b0156"><ac:plain-text-body><![CDATA[

[[API 2006

AA. Bibliography#API 06]]

[method clone()

http://java.sun.com/javase/6/docs/api/java/lang/Object.html#clone()]

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

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="a77c14639a8c3008-ff8b6ab8-4b6f436f-bfd1b291-8581dd57b7caba335dc1a4c8"><ac:plain-text-body><![CDATA[

[[Bloch 2008

AA. Bibliography#Bloch 08]]

Item 39: Make defensive copies when needed

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

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="ffb43a4f233fa41b-a097bb33-408047b7-959e8422-9b2c1b0df34022d8c744084c"><ac:plain-text-body><![CDATA[

[[Goetz 2006

AA. Bibliography#Goetz 06]]

3.2. Publication and Escape: Allowing Internal Mutable State to Escape

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

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="4c7fbbc239570c98-b332c8d3-420e4c7b-b2a9ba61-0ed5b7fa5c095f2d8aa56d0c"><ac:plain-text-body><![CDATA[

[[Gong 2003

AA. Bibliography#Gong 03]]

9.4 Private Object State and Object Immutability

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

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="49cf5f122c975a35-9c6701bb-43a048d8-8ed39457-06bc709068e2257134c61b42"><ac:plain-text-body><![CDATA[

[[Haggar 2000

AA. Bibliography#Haggar 00]]

[Practical Java Praxis 64: Use clone for Immutable Objects When Passing or Receiving Object References to Mutable Objects

http://www.informit.com/articles/article.aspx?p=20530]

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

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="e599e4cb352d59f9-b7d6bcab-4945419c-86d59ec5-1b68a577955c35b91d27e533"><ac:plain-text-body><![CDATA[

[[Security 2006

AA. Bibliography#Security 06]]

 

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

...