Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Codemod sonar:java/replace-stream-collectors-to-list-s6204 may break code #349

Open
@andrecsilva

Description

Despite the recommendation from the associated sonar rule to replace:

List<Integer> numbers = someStream.collect(Collectors.toList());
List<Integer> numbers = someStream.toList();

These are not the same. The second one results in a guaranteed unmodifiable list while the first one doesn't guarantee anything but the current implementation return a modifiable list.

In fact, this kind of change breaks our own code. See PR #348.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /