chonton commented on a change in pull request #55: URL: https://github.com/apache/maven-dependency-analyzer/pull/55#discussion_r813359903
########## File path: src/main/java/org/apache/maven/shared/dependency/analyzer/asm/ResultCollector.java ########## @@ -57,15 +57,24 @@ public void addName( String name ) } // decode arrays - if ( name.startsWith( "[L" ) && name.endsWith( ";" ) ) + if ( name.charAt( 0 ) == '[' ) { - name = name.substring( 2, name.length() - 1 ); + int i = 0; + do + { + ++i; + } + while ( name.charAt( i ) == '[' ); // could have array of array ... Review comment: name can contain any number of '[' - see [Field Descriptors](https://docs.oracle.com/javase/specs/jvms/se17/html/jvms-4.html#jvms-4.3.2) in jvm spec. Yes, we could have IndexOutOfBoundsException if class is malformed. Does it matter what sort of exception is thrown? -- 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-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org