|
18 | 18 | import static com.google.common.collect.Collections2.filter;
|
19 | 19 |
|
20 | 20 | /**
|
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. |
24 | 23 | *
|
25 | 24 | */
|
26 | 25 | public class BuildWithDetails extends Build {
|
@@ -79,38 +78,38 @@ public boolean apply(Map<String, Object> action) {
|
79 | 78 |
|
80 | 79 | private BuildCause convertToBuildCause(Map<String, Object> cause) {
|
81 | 80 | 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; |
114 | 113 | }
|
115 | 114 |
|
116 | 115 | public String getDescription() {
|
|
0 commit comments