Skip to content

Commit 83fa400

Browse files
committed
fix: fixed some more code incompatioble with JDK 8
1 parent a74f7e1 commit 83fa400

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

src/main/java/org/codejive/jpm/Main.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public Integer call() throws Exception {
6868
if (!quietMixin.quiet) {
6969
printStats(stats);
7070
}
71-
return 0;
71+
return (Integer) 0;
7272
}
7373
}
7474

@@ -103,7 +103,7 @@ static class Sync implements Callable<Integer> {
103103
public Integer call() throws Exception {
104104
if (interactive || artifactPattern == null || artifactPattern.isEmpty()) {
105105
if (max == null) {
106-
max = 100;
106+
max = (Integer) 100;
107107
}
108108
try (Terminal terminal = TerminalBuilder.builder().build()) {
109109
while (true) {
@@ -154,14 +154,14 @@ public Integer call() throws Exception {
154154
}
155155
} else {
156156
if (max == null) {
157-
max = 20;
157+
max = (Integer) 20;
158158
}
159159
String[] artifactNames = search(artifactPattern);
160160
if (artifactNames.length > 0) {
161161
Arrays.stream(artifactNames).forEach(System.out::println);
162162
}
163163
}
164-
return 0;
164+
return (Integer) 0;
165165
}
166166

167167
String[] search(String artifactPattern) throws IOException {
@@ -255,7 +255,7 @@ public Integer call() throws Exception {
255255
if (!quietMixin.quiet) {
256256
printStats(stats);
257257
}
258-
return 0;
258+
return (Integer) 0;
259259
}
260260
}
261261

@@ -284,7 +284,7 @@ public Integer call() throws Exception {
284284
.collect(Collectors.joining(File.pathSeparator));
285285
System.out.print(classpath);
286286
}
287-
return 0;
287+
return (Integer) 0;
288288
}
289289
}
290290

@@ -333,9 +333,8 @@ static class QuietMixin {
333333
}
334334

335335
private static void printStats(SyncStats stats) {
336-
System.err.printf(
337-
"Artifacts new: %d, updated: %d, deleted: %d%n",
338-
stats.copied, stats.updated, stats.deleted);
336+
System.err.printf("Artifacts new: %d, updated: %d, deleted: %d%n",
337+
(Integer)stats.copied, (Integer)stats.updated, (Integer)stats.deleted);
339338
}
340339

341340
/**

0 commit comments

Comments
 (0)