⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

#8519 | adding warning messages on mutable methods initialised from List.of#9124

Open
naren2605 wants to merge 1 commit intoapache:masterfrom
naren2605:warnings-on-immutable-list
Open

#8519 | adding warning messages on mutable methods initialised from List.of#9124
naren2605 wants to merge 1 commit intoapache:masterfrom
naren2605:warnings-on-immutable-list

Conversation

@naren2605
Copy link

warning hints on mutable methods used with immutable collections

warning hints on mutable methods used with immutable collections

Details it would be good to have hints showing some warning message("mutable method xyz cannot be used on immutable collection") when immutable collections are used with mutable methods.

example:

var immutableList = List.of(10,20);
      immutableList.add(20);
var immutableList = List.of(10,20);
      immutableList.remove(20);

@mbien as 8519 has been closed earlier with the reasons you have mentioned, i just want to bring up this pr once again and see if this meets the requirements or if still you see if this won't be possible, let me know.

cc: @lahodaj @jlahoda

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.

1 participant