Skip to content

Commit 3fbdb30

Browse files
committed
minor: Rename 'JsonUtils' into 'JSONUtils'
Rename the class this way to stick to the 'org.json' library naming rules.
1 parent 2f7f1c7 commit 3fbdb30

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

lkql_jit/cli/src/main/java/com/adacore/lkql_jit/GNATCheckWorker.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ protected int executeScript(Context.Builder contextBuilder) {
179179
// If a LKQL rule config file has been provided, parse it and display the result
180180
if (this.args.lkqlConfigFile != null) {
181181
System.out.println(
182-
JsonUtils.serializeInstances(parseLKQLRuleFile(this.args.lkqlConfigFile)));
182+
JSONUtils.serializeInstances(parseLKQLRuleFile(this.args.lkqlConfigFile)));
183183
return 0;
184184
}
185185

@@ -259,7 +259,7 @@ protected int executeScript(Context.Builder contextBuilder) {
259259
instances.putAll(parseLKQLRuleFile(rulesFrom));
260260
}
261261
}
262-
contextBuilder.option("lkql.ruleInstances", JsonUtils.serializeInstances(instances));
262+
contextBuilder.option("lkql.ruleInstances", JSONUtils.serializeInstances(instances));
263263

264264
contextBuilder.engine(
265265
Engine.newBuilder()

lkql_jit/cli/src/main/java/com/adacore/lkql_jit/LKQLChecker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ protected int executeScript(Context.Builder contextBuilder) {
223223
// Pass the rule instances to the LKQL engine
224224
try {
225225
contextBuilder.option(
226-
"lkql.ruleInstances", JsonUtils.serializeInstances(this.getRuleInstances()));
226+
"lkql.ruleInstances", JSONUtils.serializeInstances(this.getRuleInstances()));
227227
} catch (Exception e) {
228228
System.err.println(e.getMessage());
229229
}

lkql_jit/language/src/main/java/com/adacore/lkql_jit/LKQLContext.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,7 @@ public Map<String, RuleInstance> getRuleInstances() {
599599
if (this.ruleInstances == null) {
600600
try {
601601
this.ruleInstances =
602-
JsonUtils.deserializeInstances(
602+
JSONUtils.deserializeInstances(
603603
this.env.getOptions().get(LKQLLanguage.ruleInstances));
604604
} catch (Exception e) {
605605
// Since the LKQL option is internal, the user cannot provide a raw value so this

lkql_jit/options/src/main/java/com/adacore/lkql_jit/JsonUtils.java renamed to lkql_jit/options/src/main/java/com/adacore/lkql_jit/JSONUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import org.json.JSONTokener;
1313

1414
/** This class contains all util functions to handle JSON */
15-
public final class JsonUtils {
15+
public final class JSONUtils {
1616

1717
/** Serialize the given rule instance map to a JSON string. */
1818
public static String serializeInstances(final Map<String, RuleInstance> instances) {

0 commit comments

Comments
 (0)