You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Util.report("See " + VERSION_MISMATCH + " for further details.");
}
} catch (java.lang.NoSuchFieldErrornsfe) {
// given our large user base and SLF4J's commitment to backward
// compatibility, we cannot cry here. Only for implementations
// which willingly declare a REQUESTED_API_VERSION field do we
// emit compatibility warnings.
} catch (Throwablee) {
// we should never reach here
Util.report("Unexpected problem occurred during version sanity check", e);
}
}
I was wondering why the comment references REQUESTED_API_VERSION, while there's no such thing in the try.
I found the change that invalidated that catch, and I'm still baffled as to why Java does not complain about a checked exception being not used I see why javac didn't alert: it's an Error, not checked!.
The text was updated successfully, but these errors were encountered:
I think the NoSuchFieldError can no longer occur and it makes no sense to check for it. As for the compiler not complaining, it is a good question but beyond the scope of SLF4J. ☺️
While reading slf4j2 code to figure out how
bindingsproviders work, I came across a line that confused me:catch(NoSuchFieldError)
inLoggerFactory
slf4j/slf4j-api/src/main/java/org/slf4j/LoggerFactory.java
Lines 364 to 388 in 216459e
I was wondering why the comment references
REQUESTED_API_VERSION
, while there's no such thing in thetry
.I found the change that invalidated that
catch
, andI'm still baffled as to why Java does not complain about a checked exception being not usedI see why javac didn't alert: it's anError
, not checked!.The text was updated successfully, but these errors were encountered: