Skip to content

Commit 5e23bd8

Browse files
larsbeckclaude
andcommitted
fix(conference-scheduling): address remaining Copilot review findings
Unknown prerequisite talk codes now fail fast like every other reference, the dataset info span is closed properly, a stray jQuery .fail() argument is removed and DemoDataBuilderTest uses assertNull. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Qae2bExuXdkKjDJjFXynGi
1 parent a1c6ae3 commit 5e23bd8

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

use-cases/conference-scheduling/src/main/java/org/acme/conferencescheduling/service/ConferenceScheduleModelConvertor.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,7 @@ private static void applyPrerequisites(List<TalkDTO> talkDtos, Map<String, Talk>
193193
continue;
194194
}
195195
SequencedSet<Talk> prerequisites = dto.prerequisiteTalkCodes().stream()
196-
.map(talkMap::get)
197-
.filter(java.util.Objects::nonNull)
196+
.map(code -> require(talkMap, code, "prerequisite talk"))
198197
.collect(toCollection(LinkedHashSet::new));
199198
talkMap.get(dto.code()).setPrerequisiteTalks(prerequisites);
200199
}

use-cases/conference-scheduling/src/main/resources/META-INF/resources/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ function analyze() {
590590
+ " <b>Timefold Solver Enterprise Edition</b>, which is not on the classpath."
591591
+ " If the latter, reach out to Timefold, obtain your license,"
592592
+ " and then run the quickstart with an Enterprise profile to see Score analysis in action."));
593-
}, "text");
593+
});
594594
}
595595

596596
function getScoreComponents(score) {

use-cases/conference-scheduling/src/main/resources/META-INF/resources/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
<div class="sticky-top d-flex justify-content-center align-items-center" aria-live="polite" aria-atomic="true">
6464
<div id="notificationPanel" style="position: absolute; top: .5rem;"></div>
6565
</div>
66-
<blockquote id="datasetInfo">Generate the optimal schedule for your conference talks. <span id="info" class="fw-bold"></blockquote>
66+
<blockquote id="datasetInfo">Generate the optimal schedule for your conference talks. <span id="info" class="fw-bold"></span></blockquote>
6767

6868
<div id="solveControls" class="mb-2">
6969
<button id="solveButton" type="button" class="btn btn-success">

use-cases/conference-scheduling/src/test/java/org/acme/conferencescheduling/demo/DemoDataBuilderTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package org.acme.conferencescheduling.demo;
22

33
import static org.junit.jupiter.api.Assertions.assertEquals;
4+
import static org.junit.jupiter.api.Assertions.assertNull;
45
import static org.junit.jupiter.api.Assertions.assertNotNull;
56

67
import org.acme.conferencescheduling.dto.ConferenceScheduleInput;
@@ -19,8 +20,8 @@ void shouldBuildData() {
1920
assertEquals(15, problem.talks().size());
2021
problem.talks().forEach(talk -> {
2122
assertNotNull(talk.code());
22-
assertEquals(null, talk.timeslotId());
23-
assertEquals(null, talk.roomId());
23+
assertNull(talk.timeslotId());
24+
assertNull(talk.roomId());
2425
});
2526
}
2627
}

0 commit comments

Comments
 (0)