Skip to content

0.8 regression: IndexOutOfBoundsException when collecting dependencies #110

Closed

Description

Working on trying to figure out which file it sees this on

Caused by: java.lang.IndexOutOfBoundsException: Index 1 out of bounds for length 1
        at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:100)
        at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:106)
        at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:302)
        at java.base/java.util.Objects.checkIndex(Objects.java:385)
        at java.base/java.util.ArrayList.get(ArrayList.java:427)
        at cash.grammar.kotlindsl.utils.DependencyExtractor.findIdentifier(DependencyExtractor.kt:253)
        at cash.grammar.kotlindsl.utils.DependencyExtractor.parseDependencyDeclaration(DependencyExtractor.kt:154)
        at cash.grammar.kotlindsl.utils.DependencyExtractor.collectDependencies(DependencyExtractor.kt:48)
        at com.squareup.sort.kotlin.KotlinSorter.enterNamedBlock(KotlinSorter.kt:84)
        at com.squareup.cash.grammar.KotlinParser$NamedBlockContext.enterRule(KotlinParser.java:1491)
        at org.antlr.v4.runtime.tree.ParseTreeWalker.enterRule(ParseTreeWalker.java:50)
        at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:33)
        at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:36)
        at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:36)
        at cash.grammar.kotlindsl.parse.Parser.listener(Parser.kt:96)
        at com.squareup.sort.kotlin.KotlinSorter$Companion.of(KotlinSorter.kt:182)
        at com.squareup.sort.Sorter$Companion.of(Sorter.kt:20)
        at com.squareup.sort.SortCommand$sort$1.invoke(SortCommand.kt:118)
        at com.squareup.sort.SortCommand$sort$1.invoke(SortCommand.kt:116)
        at com.squareup.sort.SortCommand.sort$lambda$0(SortCommand.kt:116)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglang:kotlinKotlin DSL

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions