Skip to content

hogehoge追加 #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
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
12 changes: 12 additions & 0 deletions lesson-3/src/main/java/lesson3/controllers/HelloController.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package lesson3.controllers;

import java.util.Objects;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
Expand All @@ -17,4 +18,15 @@ public String getHello() {

return "Hello!!!!";
}

@GetMapping("/hoge")
public String getHogeHoge() {
String message = null;

if (!Objects.isNull(message)) {
System.out.printf("文字数" + message.length());

Choose a reason for hiding this comment

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

[FindBugs] WARNING: NP: Null pointer dereference of message in lesson3.controllers.HelloController.getHogeHoge()

}

return "Hello!!!!";
}
}