Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 353f9bb

Browse filesBrowse files
committed
pointless null check since the with method already does it
1 parent ccfe3ad commit 353f9bb
Copy full SHA for 353f9bb

File tree

Expand file treeCollapse file tree

1 file changed

+3
-9
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-9
lines changed

‎src/main/java/org/kohsuke/github/GHReleaseBuilder.java

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHReleaseBuilder.java
+3-9Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ public GHReleaseBuilder(GHRepository ghRepository, String tag) {
2121
* @param body The release notes body.
2222
*/
2323
public GHReleaseBuilder body(String body) {
24-
if (body != null) {
25-
builder.with("body", body);
26-
}
24+
builder.with("body", body);
2725
return this;
2826
}
2927

@@ -35,9 +33,7 @@ public GHReleaseBuilder body(String body) {
3533
* already exists.
3634
*/
3735
public GHReleaseBuilder commitish(String commitish) {
38-
if (commitish != null) {
39-
builder.with("target_commitish", commitish);
40-
}
36+
builder.with("target_commitish", commitish);
4137
return this;
4238
}
4339

@@ -56,9 +52,7 @@ public GHReleaseBuilder draft(boolean draft) {
5652
* @param name the name of the release
5753
*/
5854
public GHReleaseBuilder name(String name) {
59-
if (name != null) {
60-
builder.with("name", name);
61-
}
55+
builder.with("name", name);
6256
return this;
6357
}
6458

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.