Only use DatatypeConverter as a fallback
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
@@ -59,27 +59,10 @@ public final class SkinFix implements Fix, URLStreamHandlerFactory {
|
||||
|
||||
@Override
|
||||
public boolean isApplicable(Parameters params) {
|
||||
if (!isSupported()) {
|
||||
Log.warning("Using Java 8 will probably fix this");
|
||||
Log.warning("Alternatively, turning off legacy skin fix in Settings > Miscellaneous will silence the warnings");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean isSupported() {
|
||||
// check for DatatypeConverter first
|
||||
// most users will just be annoyed by the big stacktrace
|
||||
try {
|
||||
Class.forName("javax.xml.bind.DatatypeConverter");
|
||||
} catch (ClassNotFoundException e) {
|
||||
Log.warning("Cannot find DatatypeConverter - required for skin fix");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!UrlUtils.isSupported()) {
|
||||
Log.warning("Cannot access the necessary Java internals for skin fix");
|
||||
Log.warning("Using an older Java version will probably fix this");
|
||||
Log.warning("Alternatively, turning off legacy skin fix in Settings > Miscellaneous will silence the warnings");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user