Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix annotation test for null marked inner classes #11826

Conversation

yannicklamprecht
Copy link
Contributor

@yannicklamprecht yannicklamprecht commented Dec 25, 2024

Currently NullMarked inner classes are not detected right by the annotation test. Only when the outer class is annotated the test suceeds. Something like the following fails.

package com.destroystokyo.paper;

import org.jspecify.annotations.NullMarked;

public interface SkinParts {

    boolean hasCapeEnabled();

    boolean hasJacketEnabled();

    boolean hasLeftSleeveEnabled();

    boolean hasRightSleeveEnabled();

    boolean hasLeftPantsEnabled();

    boolean hasRightPantsEnabled();

    boolean hasHatsEnabled();

    int getRaw();

    @NullMarked
    interface Builder {
        Builder withCape(boolean cape);
        Builder withJacket(boolean jacket);
        Builder withLeftSleeve(boolean leftSleeve);
        Builder withRightSleeve(boolean rightSleeve);
        Builder withLeftPants(boolean leftPants);
        Builder withRightPants(boolean rightPants);
        Builder withHat(boolean hat);
        SkinParts build();
    }
}

@yannicklamprecht yannicklamprecht requested a review from a team as a code owner December 25, 2024 23:41
@yannicklamprecht yannicklamprecht force-pushed the fix/annotation-test-skip-null-marked-inner-classes branch from 9ab0f9a to ffc9256 Compare December 26, 2024 15:31
@Machine-Maker Machine-Maker merged commit a14c06b into PaperMC:main Dec 26, 2024
3 checks passed
@yannicklamprecht yannicklamprecht deleted the fix/annotation-test-skip-null-marked-inner-classes branch December 26, 2024 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

3 participants