Skip to content

Commit

Permalink
Restore binary compatibility with previous versions
Browse files Browse the repository at this point in the history
The change breaks maven-shared-utils
  • Loading branch information
gnodet committed Dec 14, 2020
1 parent f5a9b92 commit b9348fc
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/main/java/org/fusesource/jansi/AnsiConsole.java
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public class AnsiConsole {
* @deprecated this field will be made private in a future release, use {@link #out()} instead
*/
@Deprecated
public static AnsiPrintStream out;
public static PrintStream out;
/**
* @deprecated this field will be made private in a future release, use {@link #sysErr()} instead
*/
Expand All @@ -177,7 +177,7 @@ public class AnsiConsole {
* @deprecated this field will be made private in a future release, use {@link #err()} instead
*/
@Deprecated
public static AnsiPrintStream err;
public static PrintStream err;

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

Expand Down Expand Up @@ -412,7 +412,7 @@ static boolean getBoolean(String name) {
*/
public static AnsiPrintStream out() {
initStreams();
return out;
return (AnsiPrintStream) out;
}

/**
Expand All @@ -434,7 +434,7 @@ public static PrintStream sysOut() {
*/
public static AnsiPrintStream err() {
initStreams();
return err;
return (AnsiPrintStream) err;
}

/**
Expand All @@ -456,8 +456,8 @@ synchronized static public void systemInstall() {
if (installed == 1) {
initStreams();
try {
out.install();
err.install();
((AnsiPrintStream) out).install();
((AnsiPrintStream) err).install();
} catch (IOException e) {
throw new IOError(e);
}
Expand All @@ -482,8 +482,8 @@ synchronized public static void systemUninstall() {
installed--;
if (installed == 0) {
try {
out.uninstall();
err.uninstall();
((AnsiPrintStream) out).uninstall();
((AnsiPrintStream) err).uninstall();
} catch (IOException e) {
throw new IOError(e);
}
Expand Down

0 comments on commit b9348fc

Please sign in to comment.