Skip to content

Commit a7d0d4f

Browse files
committed
Reformatted based on Coding style.
1 parent 06ffef7 commit a7d0d4f

File tree

1 file changed

+34
-35
lines changed

1 file changed

+34
-35
lines changed

jenkins-client/src/main/java/com/offbytwo/jenkins/model/BuildWithDetails.java

Lines changed: 34 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@
1818
import static com.google.common.collect.Collections2.filter;
1919

2020
/**
21-
* This class represents build information with
22-
* details about what has been done like
23-
* duration start and of course the build result.
21+
* This class represents build information with details about what has been done
22+
* like duration start and of course the build result.
2423
*
2524
*/
2625
public class BuildWithDetails extends Build {
@@ -79,38 +78,38 @@ public boolean apply(Map<String, Object> action) {
7978

8079
private BuildCause convertToBuildCause(Map<String, Object> cause) {
8180
BuildCause cause_object = new BuildCause();
82-
83-
//TODO: Think about it. Can this be done more simpler?
84-
String description = (String) cause.get("shortDescription");
85-
if (!Strings.isNullOrEmpty(description)) {
86-
cause_object.setShortDescription(description);
87-
}
88-
89-
Integer upstreamBuild = (Integer) cause.get("upstreamBuild");
90-
if (upstreamBuild != null) {
91-
cause_object.setUpstreamBuild(upstreamBuild);
92-
}
93-
94-
String upstreamProject = (String) cause.get("upstreamProject");
95-
if (!Strings.isNullOrEmpty(upstreamProject)) {
96-
cause_object.setUpstreamProject(upstreamProject);
97-
}
98-
99-
String upstreamUrl = (String) cause.get("upstreamUrl");
100-
if (!Strings.isNullOrEmpty(upstreamProject)) {
101-
cause_object.setUpstreamUrl(upstreamUrl);
102-
}
103-
104-
String userId = (String) cause.get("userId");
105-
if (!Strings.isNullOrEmpty(userId)) {
106-
cause_object.setUserId(userId);
107-
}
108-
109-
String userName = (String) cause.get("userName");
110-
if (!Strings.isNullOrEmpty(userName)) {
111-
cause_object.setUserName(userName);
112-
}
113-
return cause_object;
81+
82+
// TODO: Think about it. Can this be done more simpler?
83+
String description = (String) cause.get("shortDescription");
84+
if (!Strings.isNullOrEmpty(description)) {
85+
cause_object.setShortDescription(description);
86+
}
87+
88+
Integer upstreamBuild = (Integer) cause.get("upstreamBuild");
89+
if (upstreamBuild != null) {
90+
cause_object.setUpstreamBuild(upstreamBuild);
91+
}
92+
93+
String upstreamProject = (String) cause.get("upstreamProject");
94+
if (!Strings.isNullOrEmpty(upstreamProject)) {
95+
cause_object.setUpstreamProject(upstreamProject);
96+
}
97+
98+
String upstreamUrl = (String) cause.get("upstreamUrl");
99+
if (!Strings.isNullOrEmpty(upstreamProject)) {
100+
cause_object.setUpstreamUrl(upstreamUrl);
101+
}
102+
103+
String userId = (String) cause.get("userId");
104+
if (!Strings.isNullOrEmpty(userId)) {
105+
cause_object.setUserId(userId);
106+
}
107+
108+
String userName = (String) cause.get("userName");
109+
if (!Strings.isNullOrEmpty(userName)) {
110+
cause_object.setUserName(userName);
111+
}
112+
return cause_object;
114113
}
115114

116115
public String getDescription() {

0 commit comments

Comments
 (0)