-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add bundled signature of unsafe (default time zone) APIs of Joda-Time library #121
Comments
We did this for Java 8's java.time API. I think signatures should look similar. But as with ICU4J, it is hard to maintain the signatures for those ever-changing libraries. It would be better to have them on Maven central separately and just use Maven coordinates to refer to them from builds. It is possible with forbiddenapis to host signatures on Maven Central, it is just somebody needed who maintains them. I am looking forward to remove commons-io signatures for the same reason, but I have no plan yet. |
We use Joda Time as well, and have our own list of these already. Here's what we've found so far. :) Note that Joda Time also has a really insidious date formatting API where you build the formatter by calling
|
Java 8's time API is similar, but the types are much better and a IMHO, JodaTime is separate and maybe the signatures should be published as separate Maven Central artifacts. I am planning to do the same with commons-io signatures. As there are many different versions of joda.time out there, it is hard to maintain all this inside forbidden-apis. So I am thinking about opening separate github repos to maintain those external libs. FYI, the Maven Plugin already allows to "configure" signatures using their Maven coordinates. If you have a signatures file on Central you can use it in your build by just listing it. For Gradle you can do the same by adding another dependency type and refer to it using FileCollections or URLs. |
@trejkaz there are also two |
There are 10... I don't use that class so I can't say which ones are bad yet. |
The most complete list to my knowledge is
|
Looking at
But hang on,
Now you have "non-forbidden" code but which hasn't actually solved the problem - there is still no time zone being passed in. My guess is that, because So to resolve that, I would prohibit The other 4 which take an |
No description provided.
The text was updated successfully, but these errors were encountered: