nizhikov commented on a change in pull request #8937:
URL: https://github.com/apache/ignite/pull/8937#discussion_r604841835
##########
File path:
modules/core/src/main/java/org/apache/ignite/internal/processors/metric/impl/MetricUtils.java
##########
@@ -63,10 +63,11 @@ public static String metricName(String... names) {
* @return Array consist of registry name and metric name.
*/
public static T2<String, String> fromFullName(String name) {
- return new T2<>(
- name.substring(0, name.lastIndexOf(SEPARATOR)),
- name.substring(name.lastIndexOf(SEPARATOR) + 1)
- );
+ int i = name.lastIndexOf(SEPARATOR);
Review comment:
`assert` required to ensure some method contract.
It useful if ongoing exception (like NPE in the middle of internals) will
not hint developer what is going wrong.
Right here - we will get the same exception as `AssertionException` on the
next line so I don't think this assert useful.
Let's get rid of it?
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]