Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Parasoft Jtest 2021.1

...

Mixing generic and nongeneric code can produce unexpected results and exceptional conditions.

Rule

Severity

Likelihood

Remediation Cost

Priority

Level

OBJ03-J

Low

Probable

Medium

P4

L3

Automated Detection

ToolVersionCheckerDescription
Parasoft Jtest
9.5CODSTA.EPC.AGBPTImplemented
Include Page
Parasoft_V
Parasoft_V
CERT.OBJ03.AGBPTAvoid conversions from parameterized types to raw types

Bibliography

[Bloch 2008]

Item 23, "Don't Use Raw Types in New Code"

[Bloch 2007]
 

[Bloch 2005]

Puzzle 88, "Raw Deal"

[Darwin 2004]

Section 8.3, "Avoid Casting by Using Generics"

[JavaGenerics 2004]

 


[Java Tutorials]

"Heap Pollution"

[JLS 2015]

§4.8, "Raw Types"
§4.12.2, "Variables of Reference Type"
Chapter 5, "Conversions and Promotions"

§5.1.9, "Unchecked Conversion"

[Langer 2008]

Topic 3, "Coping with Legacy"

[Naftalin 2006]

Chapter 8, "Effective Generics"

[Naftalin 2006b]

"Principle of Indecent Exposure"

[Schildt 2007]

"Create a Checked Collection"

...


...