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

Issue #8801: Support for all Token Types as a Property Type for Module Metadata #8804

Merged
merged 1 commit into from
Sep 9, 2020

Conversation

gaurabdg
Copy link
Contributor

@gaurabdg gaurabdg commented Sep 7, 2020

Copy link
Member

@romani romani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

items:

@gaurabdg gaurabdg force-pushed the meta-alltokentype branch 6 times, most recently from 651a905 to 73fec10 Compare September 7, 2020 18:05
@romani
Copy link
Member

romani commented Sep 7, 2020

from Teamcity IDEA inspection:

src/main/java/com/puppycrawl/tools/checkstyle/meta
MetadataGeneratorUtil.java (1)
109: fetchAllTokens() Cast from 'double' to int may result in loss of precision 

not sure why you do asDoubleStream

    public static List<String> fetchAllTokens() {
        return Arrays.stream(TokenUtil.getAllTokenIds()).asDoubleStream()
                .mapToObj(tokenId -> TokenUtil.getTokenName((int) tokenId))

public static int[] getAllTokenIds() {
final int[] safeCopy = new int[TOKEN_IDS.length];

Copy link
Member

@romani romani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

items:

Copy link
Member

@romani romani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok to merge ones CI pass

@romani romani merged commit 39b02e1 into checkstyle:master Sep 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants