isapego commented on a change in pull request #8730:
URL: https://github.com/apache/ignite/pull/8730#discussion_r567830577



##########
File path: 
modules/core/src/main/java/org/apache/ignite/binary/BinaryBasicNameMapper.java
##########
@@ -87,6 +87,18 @@ public BinaryBasicNameMapper setSimpleName(boolean 
isSimpleName) {
     private static String simpleName(String clsName) {
         assert clsName != null;
 
+        // .NET generic, not valid for Java class name. Clean up every generic 
part recursively.
+        // Example: Foo.Bar`1[[Baz.Qux`1[[System.String],[System.Int32]]]]
+        int genericIdx = clsName.indexOf("[[");
+
+        if (genericIdx > 0)
+            clsName = clsName.substring(0, genericIdx + 2) + 
simpleName(clsName.substring(genericIdx + 2));
+
+        genericIdx = clsName.indexOf("],[", genericIdx);
+
+        if (genericIdx > 0)
+            clsName = clsName.substring(0, genericIdx + 3) + 
simpleName(clsName.substring(genericIdx + 3));
+

Review comment:
       Consider extract this as a separate function that can be tested 
separately on simple strings.




----------------------------------------------------------------
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]


Reply via email to