[
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
> [email protected]/jdk.internal.util.Preconditions$1.apply(Preconditions.java:55)
> at
> [email protected]/jdk.internal.util.Preconditions$1.apply(Preconditions.java:52)
> at
> [email protected]/jdk.internal.util.Preconditions$4.apply(Preconditions.java:213)
> at
> [email protected]/jdk.internal.util.Preconditions$4.apply(Preconditions.java:210)
> at
> [email protected]/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:98)
> at
> [email protected]/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:106)
> at
> [email protected]/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:302)
> at [email protected]/java.lang.String.checkIndex(String.java:4832)
> at [email protected]/java.lang.StringLatin1.charAt(StringLatin1.java:46)
> at [email protected]/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)