Skip to content
This repository was archived by the owner on Jul 6, 2021. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/main/java/devoxx/NullPointerDereference.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

public class NullPointerDereference {

public String special = "Antonio";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vulnerability Vulnerability: Make special a static final constant or non-public and provide accessors if needed. (squid:ClassVariableVisibilityCheck)

See it in SonarCloud


public int searchForAnimalID(String animal) {
String trimmedAnimal = trim(animal);
if (trimmedAnimal.equals("Antonio")) {
Expand Down