omniCoder77 commented on code in PR #4548:
URL: https://github.com/apache/cassandra/pull/4548#discussion_r2682555643


##########
src/java/org/apache/cassandra/metrics/CassandraMetricsRegistry.java:
##########
@@ -1299,25 +1301,26 @@ public boolean hasScope()
          */
         public ObjectName getMBeanName()
         {
-
-            String mname = mBeanName;
-
-            if (mname == null)
-                mname = getMetricName();
+            ObjectName local = objectName;
+            if (local != null)
+                return local;
 
             try
             {
+                Hashtable<String, String> props = new Hashtable<>(4);

Review Comment:
   I picked 4 just to avoid the map resizing, but I can change that to the 
exact count (3 including the `type` property) or leave it default.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to