Housekeeping: deprecate, replace or remove archaic utilities classes.#6670
Merged
Conversation
eccdb57 to
ebbf61b
Compare
ebbf61b to
24c10f9
Compare
APickledWalrus
requested changes
Jun 6, 2024
Member
APickledWalrus
left a comment
There was a problem hiding this comment.
My primary concerns with these changes are that the Java-equivalent classes have methods for function composition. For any classes implementing these now deprecated classes, they now have these methods which may not be properly implemented (or work how one might expect)
Closed
APickledWalrus
requested changes
Dec 20, 2024
Member
APickledWalrus
left a comment
There was a problem hiding this comment.
Great work. This is a necessary step for us to take. There are a few instances where deprecated classes (that have Java equivalents) should have Javadocs with the deprecated tag pointing to the replacement.
Member
|
fix conflicts please |
sovdeeth
requested changes
Dec 26, 2024
sovdeeth
approved these changes
Dec 27, 2024
Efnilite
approved these changes
Dec 28, 2024
APickledWalrus
approved these changes
Dec 31, 2024
Make closeable an auto-closeable and allow try-with-resources. Deprecate unused case insensitive strings for removal.
* Mark VectorMath as internal * Replace usages
* Make Setter a Consumer. * Remove Setter from Option. * Remove setter from entry validator. * Remove setter from enum entry validator. * Remove setter from parsed entry validator. * Remove setter from parsed section validator.
* Make checker a Java predicate. * Deprecate unused Njol predicate for removal. * Make checker extensions use predicate directly. * Remove checker from expression. * Remove checker from utils. * Deprecate Checker for removal. * Abstract checker to predicate from simple syntax * Remove remaining uses of checker.
* Mark Validate as internal * Schedule for removal + change usages * Use preconditions
cc774b0 to
bf70e64
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
A lot of utility types were left over from Java 6.
Most of these weren't used at all, but a few are still being used in place of the proper equivalent in legacy code.
This pull request is a bulk group task to deprecate all of these for removal, and to replace internal uses of them all with a better thing.
Where possible, compatibility is perfectly preserved, but in some obscure cases (e.g. constructors) parameters have to be changed.
Legacy libraries
Some legacy libraries have been removed, moved, or just deprecated for removal.
Stubs for each one have been left behind (so technically nothing still using them will break).
Legacy functional interfaces
We have a legacy equivalent of Predicate, Consumer and Function, along with some others.
A lot of these can be replaced without any breaking changes. For some, where a method signature has changed, a plugin extending the method would need to be recompiled but wouldn't require any changes: for example, a method accepting
Predicate<T>will also accept the deprecatedChecker<T>because that is now a predicate itself.The process is as follows:
Checker<T> extends Predicate<T>)Unused classes
Unused classes have been marked as Deprecated (not for removal), as to encourage addon owners to copy this over to their own addon, so we don't have to deal with it.
Unused methods
Some unused methods have been removed in this PR. A later PR will follow with more targeted deprecated method removal.
Target Minecraft Versions: any
Requirements: none
Related Issues: none