Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
There is no way for the wrap method to reliably work across the board without the hint type, because of the fact that we may be searching for a particular interface type, of which the concrete item may implement several reasonable options for. If Java had runtime generic reflection, we could get away with this as is, but unfortunately, as it does not, we have to provide the type hint ourselves. This will still eliminate the few casts that were in some places, and is generally better practice than returning <T> T anyways. I still have to go through and update all the classes that used the wrap method, but that will be included in a separate commit.
- Loading branch information
1 parent
de8c8af
commit 2cfdd16
Showing
6 changed files
with
57 additions
and
56 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.