Skip to content

Commit b9348fc

Browse files
committed
Restore binary compatibility with previous versions
The change breaks maven-shared-utils
1 parent f5a9b92 commit b9348fc

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/main/java/org/fusesource/jansi/AnsiConsole.java

+8-8
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ public class AnsiConsole {
167167
* @deprecated this field will be made private in a future release, use {@link #out()} instead
168168
*/
169169
@Deprecated
170-
public static AnsiPrintStream out;
170+
public static PrintStream out;
171171
/**
172172
* @deprecated this field will be made private in a future release, use {@link #sysErr()} instead
173173
*/
@@ -177,7 +177,7 @@ public class AnsiConsole {
177177
* @deprecated this field will be made private in a future release, use {@link #err()} instead
178178
*/
179179
@Deprecated
180-
public static AnsiPrintStream err;
180+
public static PrintStream err;
181181

182182
static final boolean IS_WINDOWS = System.getProperty("os.name").toLowerCase(Locale.ENGLISH).contains("win");
183183

@@ -412,7 +412,7 @@ static boolean getBoolean(String name) {
412412
*/
413413
public static AnsiPrintStream out() {
414414
initStreams();
415-
return out;
415+
return (AnsiPrintStream) out;
416416
}
417417

418418
/**
@@ -434,7 +434,7 @@ public static PrintStream sysOut() {
434434
*/
435435
public static AnsiPrintStream err() {
436436
initStreams();
437-
return err;
437+
return (AnsiPrintStream) err;
438438
}
439439

440440
/**
@@ -456,8 +456,8 @@ synchronized static public void systemInstall() {
456456
if (installed == 1) {
457457
initStreams();
458458
try {
459-
out.install();
460-
err.install();
459+
((AnsiPrintStream) out).install();
460+
((AnsiPrintStream) err).install();
461461
} catch (IOException e) {
462462
throw new IOError(e);
463463
}
@@ -482,8 +482,8 @@ synchronized public static void systemUninstall() {
482482
installed--;
483483
if (installed == 0) {
484484
try {
485-
out.uninstall();
486-
err.uninstall();
485+
((AnsiPrintStream) out).uninstall();
486+
((AnsiPrintStream) err).uninstall();
487487
} catch (IOException e) {
488488
throw new IOError(e);
489489
}

0 commit comments

Comments
 (0)