You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Slawomir Jaranowski (Jira)" <ji...@apache.org> on 2024/05/19 18:15:00 UTC

[jira] [Closed] (MSHARED-1398) StringIndexOutOfBoundsException processing record classes

     [ https://issues.apache.org/jira/browse/MSHARED-1398?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Slawomir Jaranowski closed MSHARED-1398.
----------------------------------------
    Resolution: Fixed

> StringIndexOutOfBoundsException processing record classes
> ---------------------------------------------------------
>
>                 Key: MSHARED-1398
>                 URL: https://issues.apache.org/jira/browse/MSHARED-1398
>             Project: Maven Shared Components
>          Issue Type: Bug
>          Components: maven-dependency-analyzer
>    Affects Versions: maven-dependency-analyzer-1.14.0
>            Reporter: Jared Stehler
>            Assignee: Slawomir Jaranowski
>            Priority: Major
>             Fix For: maven-dependency-analyzer-next-release
>
>
> Processing classes with records results in an index out of bounds exception:
> {code:java}
> Caused by: java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
> 	at java.base@21.0.3/jdk.internal.util.Preconditions$1.apply(Preconditions.java:55)
> 	at java.base@21.0.3/jdk.internal.util.Preconditions$1.apply(Preconditions.java:52)
> 	at java.base@21.0.3/jdk.internal.util.Preconditions$4.apply(Preconditions.java:213)
> 	at java.base@21.0.3/jdk.internal.util.Preconditions$4.apply(Preconditions.java:210)
> 	at java.base@21.0.3/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:98)
> 	at java.base@21.0.3/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:106)
> 	at java.base@21.0.3/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:302)
> 	at java.base@21.0.3/java.lang.String.checkIndex(String.java:4832)
> 	at java.base@21.0.3/java.lang.StringLatin1.charAt(StringLatin1.java:46)
> 	at java.base@21.0.3/java.lang.String.charAt(String.java:1555)
> 	at app//org.objectweb.asm.Type.getReturnTypeOffset(Type.java:378)
> 	at app//org.objectweb.asm.Type.getReturnType(Type.java:355)
> 	at app//org.apache.maven.shared.dependency.analyzer.asm.ResultCollector.addMethodDesc(ResultCollector.java:112) {code}
> I have a reproducible test case here: https://github.com/jaredstehler/maven-dependency-analyzer/tree/js-repro-record-error



--
This message was sent by Atlassian Jira
(v8.20.10#820010)