This repository was archived by the owner on Jan 23, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +13
-10
lines changed
src/main/java/com/appirio/service/challengefeeder/manager Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -143,16 +143,19 @@ public void pushChallengeFeeder(ChallengeFeederParam param) throws SupplyExcepti
143
143
requirement = challenge .getStudioDetailRequirements ();
144
144
}
145
145
146
- String introduction = challenge .getIntroduction () != null ? "" : challenge .getIntroduction ();
147
- if (challenge .getRound1Introduction () != null ) {
148
- if (challenge .getRound1Introduction () != null ) {
149
- introduction += String .format (ROUND_HEADER_HTML , "1" ) + challenge .getRound1Introduction ();
150
- introduction += "\n " ;
151
- }
152
- }
153
-
154
- if (challenge .getRound2Introduction () != null ) {
155
- introduction += String .format (ROUND_HEADER_HTML , "2" ) + challenge .getRound2Introduction ();
146
+ String introduction = challenge .getIntroduction () == null ? "" : challenge .getIntroduction ();
147
+ String round1Introduction = challenge .getRound1Introduction () == null ? "" : challenge .getRound1Introduction ();
148
+ String round2Introduction = challenge .getRound2Introduction () == null ? "" : challenge .getRound2Introduction ();
149
+
150
+ if (round1Introduction != "" && round2Introduction != "" ) {
151
+ // two rounds
152
+ introduction += "\n " +
153
+ String .format (ROUND_HEADER_HTML , "1" ) + round1Introduction + "\n "
154
+ + String .format (ROUND_HEADER_HTML , "2" ) + round2Introduction ;
155
+ } else if (round1Introduction != "" ) {
156
+ introduction += "\n " + round1Introduction ;
157
+ } else if (round2Introduction != "" ) {
158
+ introduction += "\n " + round2Introduction ;
156
159
}
157
160
158
161
challenge .setIntroduction (introduction );
You can’t perform that action at this time.
0 commit comments