Skip to content

Remove unchecked casts in TagPrefix#4559

Merged
TechLord22 merged 2 commits into1.20.1-v8.0.0from
tc/unchecked-tagprefix
Feb 8, 2026
Merged

Remove unchecked casts in TagPrefix#4559
TechLord22 merged 2 commits into1.20.1-v8.0.0from
tc/unchecked-tagprefix

Conversation

@TechLord22
Copy link
Copy Markdown
Member

What

Removes uncheck casts in TagPrefix. As a side effect, removes things being arrays when they did not need to be.

Also adds a few filter(Objects::nonNull) calls to some of the streams which would otherwise crash.

Implementation Details

Some of the streams interpreted ? as a locally captured wildcard instead of a general wildcard, so they had to be turned into for loops.

Outcome

Less suppressed warnings. More straightforward code which doesn't turn things into arrays only to turn the arrays into lists right after.

How Was This Tested

Only checked compilation and tests passing.

Potential Compatibility Issues

Changes some API to use Collection<T> instead of T[], though I don't know how widely it is used.

@TechLord22 TechLord22 requested a review from a team as a code owner February 6, 2026 23:13
@github-actions github-actions bot added the 1.20.1 label Feb 6, 2026
@TechLord22 TechLord22 added the type: refactor Suggestion to refactor a section of code label Feb 6, 2026
@github-actions github-actions bot added the Tests: Failed Game Tests have failed on this PR label Feb 6, 2026
@TechLord22 TechLord22 merged commit 0c36ee3 into 1.20.1-v8.0.0 Feb 8, 2026
3 of 4 checks passed
@TechLord22 TechLord22 deleted the tc/unchecked-tagprefix branch February 8, 2026 00:41
screret pushed a commit to screret/GregTech-Modern that referenced this pull request Feb 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.20.1 Tests: Failed Game Tests have failed on this PR type: refactor Suggestion to refactor a section of code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants