Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: added parasoft

According to The Java Language Specification, §15.8.3, "this" [JLS 2015]:

When used as a primary expression, the keyword this denotes a value that is a reference to the object for which the instance method was invoked (§15.12), or to the object being constructed....

The type of this is the class or interface type T within which the keyword this occurs....

At run time, the class of the actual object referred to may be T, if T is a class type, or a class that is a subtype of T.

...

Rule

Severity

Likelihood

Remediation Cost

Priority

Level

TSM01-J

Medium

Probable

High

P4

L3

Automated Detection

ToolVersionCheckerDescription
Parasoft Jtest9.5TRS.CTREImplemented

Bibliography

[Goetz 2002]

 

[Goetz 2006a]

Section 3.2, "Publication and Escape"

[Grand 2002]

Chapter 5, "Creational Patterns, Singleton"

[JLS 2015]§15.8.3, "this"

...