You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "sabi0 (via GitHub)" <gi...@apache.org> on 2024/01/29 15:36:57 UTC

[PR] Replace `new HashSet<>(Arrays.asList())` with `EnumSet.of()` [lucene]

sabi0 opened a new pull request, #13051:
URL: https://github.com/apache/lucene/pull/13051

   (no comment)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Replace `new HashSet<>(Arrays.asList())` with `EnumSet.of()` [lucene]

Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler merged PR #13051:
URL: https://github.com/apache/lucene/pull/13051


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Replace `new HashSet<>(Arrays.asList())` with `EnumSet.of()` [lucene]

Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #13051:
URL: https://github.com/apache/lucene/pull/13051#issuecomment-1915761017

   When backporting this to Lucene 9.x, it confliced because the sets have different contents in older version. I fixed this.
   
   Nevertheless, the static final constants should be unmodifiable sets, so we should possibly use Java 9+ `Set.of()` instead of `EnumSet.of()`(which is modifiable) or wrap the `EnumSet` with `Collections.unmodifiableSet()`.
   
   Could you open an issue about this?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Replace `new HashSet<>(Arrays.asList())` with `EnumSet.of()` [lucene]

Posted by "sabi0 (via GitHub)" <gi...@apache.org>.
sabi0 commented on PR #13051:
URL: https://github.com/apache/lucene/pull/13051#issuecomment-1916363126

   > static final constants should be unmodifiable sets
   > Could you open an issue about this?
   
   #13055


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org