Jansi is a small java library that allows you to use ANSI escape sequences to format your console output which works even on windows.
1.11k
stars
140
forks
source link
NullPointerException thrown during systemUninstall #214
Closed
guylabs closed 3 years ago
This originated from https://issues.apache.org/jira/browse/MNG-7161 and we saw that out of these changes https://github.com/fusesource/jansi/commit/63bd892b2bdfc253ec119a57bdd42df5e80fd859#diff-d59db8655d9ae2d11948e2b411c34fc9e8513f29065d82c978d7128dafbe3bafR414-R420 it can happen that the referenced outputstreams can be
null
and cause aNullPointerException
.This happens when other libraries get a hold of the
System.out
orSystem.err
and then close the outputstreams before Jansi can close them.A possible fix would be to check if they have already been disposed and then skip the
uninstall()
call.