Versions Compared

Key

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

...

This malicious BigInteger class is clearly mutable because of the setValue() method. Furthermore, the modPow() method is subject to precision loss. (See rules "NUM00-J. Detect or prevent integer overflow," "NUM11-J. Check floating-point inputs for exceptional values," "NUM15-J. Ensure conversions of numeric types to narrower types do not result in lost or misinterpreted data," and "NUM17-J. Beware of precision loss when converting primitive integers to floating-point" for more information.) Any code that receives an object of this class and assumes that the object is immutable will have unexpected behavior. This is particularly important because the BigInteger.modPow() method has several useful cryptographic applications.

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="285cf0b90442f6c8-6f11fc89-4cf04f25-9a10bf64-37dbf7fd8af013c337e603bb"><ac:plain-text-body><![CDATA[

[[API 2006

AA. Bibliography#API 06]]

Class BigInteger

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

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="f08f9bf90cb325f0-c76e37b2-4422438b-827bb31d-5ce398664f1cb9f356f2a30e"><ac:plain-text-body><![CDATA[

[[Bloch 2008

AA. Bibliography#Bloch 08]]

Item 1: "Consider static factory methods instead of constructors"

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

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="eab3cc174576fa1b-07a696e1-409e47d5-ae84ad01-9e3e8aacc40ae7b4e5d64480"><ac:plain-text-body><![CDATA[

[[Gong 2003

AA. Bibliography#Gong 03]]

Chapter 6: "Enforcing Security Policy"

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

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="24fcb1737552646e-d57905e9-45044a74-b04bb56f-39067a3a219383c0218157f9"><ac:plain-text-body><![CDATA[

[[Lai 2008

AA. Bibliography#Lai 08]]

Java Insecurity: Accounting for Subtleties That Can Compromise Code

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

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="8d2f2636516e1da6-29a37875-42684f52-af5ebbaf-5f291c483eba0fb77be403d5"><ac:plain-text-body><![CDATA[

[[McGraw 1999

AA. Bibliography#McGraw 99]]

Chapter Seven Rule 3: "Make Everything Final, Unless There's a Good Reason Not To"

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

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="e13f15fd9c3037b7-25220bc6-4e014dd1-b5139cab-5b699691e170b459b241ad3f"><ac:plain-text-body><![CDATA[

[[SCG 2009

AA. Bibliography#SCG 09]]

Guideline 1-2 Limit the extensibility of classes and methods

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

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="7809a478bed79888-405b5e9f-47824905-be6596fd-c4229c1cc21dabcef1b2c419"><ac:plain-text-body><![CDATA[

[[Ware 2008

AA. Bibliography#Ware 08]]

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

...