You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "risdenk (via GitHub)" <gi...@apache.org> on 2023/03/22 20:31:34 UTC

[GitHub] [solr] risdenk commented on a diff in pull request #1482: SOLR-16715: Replace new HashMap(int) and new HashSet(int) with CollectionUtil.newHashMap / CollectionUtil.newHashSet

risdenk commented on code in PR #1482:
URL: https://github.com/apache/solr/pull/1482#discussion_r1145376884


##########
solr/solrj/src/java/org/apache/solr/common/util/CommandOperation.java:
##########
@@ -223,7 +223,7 @@ public static List<CommandOperation> parse(InputStream in, Set<String> singleton
     List<CommandOperation> operations = new ArrayList<>();
 
     final HashMap<Object, Object> map =
-        new HashMap<>(0) {
+        new HashMap<>() {

Review Comment:
   If we want to enforce the size 0 - this needs to move to an real class that we can add suppressforbidden to. We can't add suppressforbidden to an anonymous class.



##########
solr/core/src/java/org/apache/solr/update/UpdateLog.java:
##########
@@ -2389,4 +2386,19 @@ public void seedBucketsWithHighestVersion(SolrIndexSearcher newSearcher) {
       versionInfo.unblockUpdates();
     }
   }
+
+  @SuppressForbidden(reason = "extends linkedhashmap")

Review Comment:
   This was moved here since SuppressForbidden doesn't work on the anonymous class



-- 
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@solr.apache.org

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


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