Skip to content

Commit 5aeeffa

Browse files
'property' -> 'parameter'
1 parent ba8e563 commit 5aeeffa

File tree

8 files changed

+20
-20
lines changed

8 files changed

+20
-20
lines changed

src/main/java/org/opentripplanner/standalone/OTPMain.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,9 @@ private static void startOTPServer(CommandLineParameters cli) {
180180
* Optionally, check if the config is valid and if not abort the startup process.
181181
*/
182182
private static void detectUnusedConfigParams(CommandLineParameters cli, ConfigModel config) {
183-
if (cli.abortOnUnknownConfig && config.hasUnknownProperties()) {
183+
if (cli.abortOnUnknownConfig && config.hasUnknownParameters()) {
184184
throw new OtpAppException(
185-
"Configuration contains invalid properties (see above for details). " +
185+
"Configuration contains unknown parameters (see above for details). " +
186186
"Please fix your configuration or remove --abortOnUnknownConfig from your OTP CLI parameters."
187187
);
188188
}

src/main/java/org/opentripplanner/standalone/config/BuildConfig.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -728,9 +728,9 @@ public NodeAdapter asNodeAdapter() {
728728
}
729729

730730
/**
731-
* Checks if any unknown or invalid properties were encountered while loading the configuration.
731+
* Checks if any unknown or invalid parameters were encountered while loading the configuration.
732732
*/
733-
public boolean hasUnknownProperties() {
734-
return root.hasUnknownProperties();
733+
public boolean hasUnknownParameters() {
734+
return root.hasUnknownParameters();
735735
}
736736
}

src/main/java/org/opentripplanner/standalone/config/CommandLineParameters.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ public class CommandLineParameters {
135135

136136
@Parameter(
137137
names = { "--abortOnUnknownConfig" },
138-
description = "Abort the startup if configuration files are found to be invalid."
138+
description = "Abort the startup if configuration files are found to contain unknown parameters."
139139
)
140140
public boolean abortOnUnknownConfig = false;
141141

src/main/java/org/opentripplanner/standalone/config/ConfigModel.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,13 @@ public static void initializeOtpFeatures(OtpConfig otpConfig) {
107107
}
108108

109109
/**
110-
* Checks if any unknown or invalid properties were encountered while loading the configuration.
110+
* Checks if any unknown or invalid parameters were encountered while loading the configuration.
111111
*/
112-
public boolean hasUnknownProperties() {
112+
public boolean hasUnknownParameters() {
113113
return (
114-
otpConfig.hasUnknownProperties() ||
115-
buildConfig.hasUnknownProperties() ||
116-
routerConfig.hasUnknownProperties()
114+
otpConfig.hasUnknownParameters() ||
115+
buildConfig.hasUnknownParameters() ||
116+
routerConfig.hasUnknownParameters()
117117
);
118118
}
119119
}

src/main/java/org/opentripplanner/standalone/config/OtpConfig.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ public OtpConfig(NodeAdapter nodeAdapter, boolean logUnusedParams) {
7373
}
7474

7575
/**
76-
* Checks if any unknown or invalid properties were encountered while loading the configuration.
76+
* Checks if any unknown or invalid parameters were encountered while loading the configuration.
7777
*/
78-
public boolean hasUnknownProperties() {
79-
return root.hasUnknownProperties();
78+
public boolean hasUnknownParameters() {
79+
return root.hasUnknownParameters();
8080
}
8181
}

src/main/java/org/opentripplanner/standalone/config/RouterConfig.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,9 @@ public String toString() {
152152
}
153153

154154
/**
155-
* Checks if any unknown or invalid properties were encountered while loading the configuration.
155+
* Checks if any unknown or invalid parameters were encountered while loading the configuration.
156156
*/
157-
public boolean hasUnknownProperties() {
158-
return root.hasUnknownProperties();
157+
public boolean hasUnknownParameters() {
158+
return root.hasUnknownParameters();
159159
}
160160
}

src/main/java/org/opentripplanner/standalone/config/framework/json/NodeAdapter.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ public void logAllWarnings(Consumer<String> logger) {
175175
/**
176176
* Checks if any unknown or invalid properties were encountered while loading the configuration.
177177
*/
178-
public boolean hasUnknownProperties() {
178+
public boolean hasUnknownParameters() {
179179
return !unusedParams().isEmpty() || !allWarnings().toList().isEmpty();
180180
}
181181

src/test/java/org/opentripplanner/standalone/config/framework/json/NodeAdapterTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ void invalidProperties() {
569569
// When: Access ONLY parameter 'a', but not 'b'
570570
subject.of("foo").asObject().of("a").asBoolean();
571571

572-
assertTrue(subject.hasUnknownProperties());
572+
assertTrue(subject.hasUnknownParameters());
573573
}
574574

575575
@Test
@@ -581,7 +581,7 @@ void valid() {
581581
object.of("a").asBoolean();
582582
object.of("b").asBoolean();
583583

584-
assertFalse(subject.hasUnknownProperties());
584+
assertFalse(subject.hasUnknownParameters());
585585
}
586586
}
587587

0 commit comments

Comments
 (0)