@Target(value={CONSTRUCTOR,FIELD,METHOD,PARAMETER,TYPE})
@Retention(value=RUNTIME)
public @interface Sensitive
toString
method on the
type, only the class name and hash code or the primitive type identifier will
be traced.
For example:
@Sensitive public String normalizePassword(@Sensitive String password) { if (password == null) { return ""; } return password; }will trace the input password as something like
<sensitive java.lang.String@abcd1234>
if the input
password was non-null or null
if it was null. The same pattern
will be applied to return values.
Additionally, this annotation can be used on sensitive types and fields to prevent them from being introspected during FFDC.