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
a stack trace is printed, after which a default new UTCProvider() is returned. This can lead to stack traces being printed to STDERR while no exception is actually thrown by Joda Time. For example, on Android, when running JVM unit tests, this can happen, e.g. see dlew/joda-time-android#148. (Joda Time Android uses Joda Time).
The solution for that issue is to set the default new UTCProvider() before using Joda Time in tests. This is not user friendly. It would be better if there was a way to get a provider without a stacktrace being printed, or to check if a provider is available before getting it (which is a bit silly, probably).
The proposed solution is to default to not printing the stack trace on the line linked above, or make the stack trace printing opt in through some kind of configuration. Alternatively, there could be a method to check if there is a provider, so that the user can provide their own if there is none.
The text was updated successfully, but these errors were encountered:
It would be possible to change the notzdb version of Joda-Time to contain the UTC provider. It would be a fair bit of work solely for an edge case of Android users, so its not something I'm rushing to do.
Here
joda-time/src/main/java/org/joda/time/DateTimeZone.java
Line 558 in 124fd32
a stack trace is printed, after which a default
new UTCProvider()
is returned. This can lead to stack traces being printed to STDERR while no exception is actually thrown by Joda Time. For example, on Android, when running JVM unit tests, this can happen, e.g. see dlew/joda-time-android#148. (Joda Time Android uses Joda Time).The solution for that issue is to set the default
new UTCProvider()
before using Joda Time in tests. This is not user friendly. It would be better if there was a way to get a provider without a stacktrace being printed, or to check if a provider is available before getting it (which is a bit silly, probably).The proposed solution is to default to not printing the stack trace on the line linked above, or make the stack trace printing opt in through some kind of configuration. Alternatively, there could be a method to check if there is a provider, so that the user can provide their own if there is none.
The text was updated successfully, but these errors were encountered: