Skip to content

Commit 151354b

Browse files
committed
fix: Save changes to the startup model when InteractiveOtpMain starts up.
This is a regression. The bug was introduced when the controller was added. The startUpView is saved if the user start OTP, while the controller models are saved if changed.
1 parent 16108a9 commit 151354b

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/ext/java/org/opentripplanner/ext/interactivelauncher/InteractiveOtpMain.java

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ private void run() {
3131
}
3232

3333
private void startOtp() {
34+
model.save();
3435
startDebugControllerAndSetupRequestInterceptor();
3536

3637
System.out.println("Start OTP: " + model + "\n");

src/ext/java/org/opentripplanner/ext/interactivelauncher/Model.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ private static Model readFromFile() {
5555
}
5656
}
5757

58-
private void save() {
58+
void save() {
5959
try {
6060
var mapper = new ObjectMapper().configure(SerializationFeature.INDENT_OUTPUT, true);
6161
mapper.writeValue(MODEL_FILE, this);

0 commit comments

Comments
 (0)