Skip to content

Commit 8c861a5

Browse files
committed
Avoid warnings
1 parent 5c21bfe commit 8c861a5

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/main/java/org/bigml/binding/LocalEnsemble.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -832,8 +832,8 @@ private HashMap<String, Object> predictOperating(JSONObject inputData,
832832
String positiveClass = (String) operating[2];
833833

834834
if (!Arrays.asList(OPERATING_POINT_KINDS).contains(kind)) {
835-
throw new IllegalArgumentException(String.format(
836-
"Allowed operating kinds are %", OPERATING_POINT_KINDS));
835+
throw new IllegalArgumentException(
836+
String.format("Allowed operating kinds are %", (Object[]) OPERATING_POINT_KINDS));
837837
}
838838

839839
JSONArray predictions = null;
@@ -896,8 +896,8 @@ private HashMap<String, Object> predictOperatingKind(JSONObject inputData,
896896
}
897897

898898
if (!Arrays.asList(OPERATING_POINT_KINDS).contains(kind)) {
899-
throw new IllegalArgumentException(String.format(
900-
"Allowed operating kinds are %", OPERATING_POINT_KINDS));
899+
throw new IllegalArgumentException(
900+
String.format("Allowed operating kinds are %", (Object[]) OPERATING_POINT_KINDS));
901901
}
902902

903903
JSONArray predictions = null;

src/main/java/org/bigml/binding/LocalFusion.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public LocalFusion(
116116
String type = model.split("/")[0];
117117
if (!Arrays.asList(LOCAL_SUPERVISED).contains(type)) {
118118
throw new IllegalArgumentException(
119-
String.format("The resource %s has not an allowed supervised model type.", OPERATING_POINT_KINDS));
119+
String.format("The resource %s has not an allowed supervised model type.", (Object[]) OPERATING_POINT_KINDS));
120120
}
121121
}
122122

@@ -387,7 +387,7 @@ private HashMap<String, Object> predictOperating(
387387

388388
if (!Arrays.asList(OPERATING_POINT_KINDS).contains(kind)) {
389389
throw new IllegalArgumentException(
390-
String.format("Allowed operating kinds are %", OPERATING_POINT_KINDS));
390+
String.format("Allowed operating kinds are %", (Object[]) OPERATING_POINT_KINDS));
391391
}
392392

393393
JSONArray predictions = predictProbability(

src/main/java/org/bigml/binding/LocalPredictiveModel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -944,7 +944,7 @@ private Prediction predictOperatingKind(
944944
String kind = operatingKind.toLowerCase();
945945
if (!Arrays.asList(OPERATING_POINT_KINDS).contains(kind)) {
946946
throw new IllegalArgumentException(
947-
String.format("Allowed operating kinds are %", OPERATING_POINT_KINDS));
947+
String.format("Allowed operating kinds are %", (Object[]) OPERATING_POINT_KINDS));
948948
}
949949

950950
JSONArray predictions = null;

0 commit comments

Comments
 (0)