java.lang.IndexOutOfBoundsException

index (-1) must not be negative

Solutions on the web7058

  • index (-1) must not be negative
  • index (-1) must not be negative
  • via Atlassian JIRA by Gustavo Refosco [Atlassian], 11 months ago
    index (-1) must not be negative
  • Stack trace

    • java.lang.IndexOutOfBoundsException: index (-1) must not be negative at com.google.common.base.Preconditions.checkElementIndex(Preconditions.java:301)[guava-11.0.2-atlassian-01.jar:na] at com.google.common.base.Preconditions.checkElementIndex(Preconditions.java:280)[guava-11.0.2-atlassian-01.jar:na] at com.google.common.collect.RegularImmutableList.get(RegularImmutableList.java:91)[guava-11.0.2-atlassian-01.jar:na] at com.atlassian.stash.internal.branch.model.version.BranchVersion.componentAt(BranchVersion.java:155)[stash-branch-utils-3.2.0_1406717432000.jar:na] at com.atlassian.stash.internal.branch.model.version.BranchVersion.compareTo(BranchVersion.java:67)[stash-branch-utils-3.2.0_1406717432000.jar:na] at com.atlassian.stash.internal.branch.model.version.VersionedBranch.compareTo(VersionedBranch.java:84)[stash-branch-utils-3.2.0_1406717432000.jar:na] at com.atlassian.stash.internal.branch.model.version.VersionedBranch$4.apply(VersionedBranch.java:77)[stash-branch-utils-3.2.0_1406717432000.jar:na] at com.atlassian.stash.internal.branch.model.version.VersionedBranch$4.apply(VersionedBranch.java:74)[stash-branch-utils-3.2.0_1406717432000.jar:na] at com.google.common.base.Predicates$AndPredicate.apply(Predicates.java:338)[guava-11.0.2-atlassian-01.jar:na] at com.google.common.collect.Iterators$7.computeNext(Iterators.java:649)[guava-11.0.2-atlassian-01.jar:na] at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)[guava-11.0.2-atlassian-01.jar:na] at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)[guava-11.0.2-atlassian-01.jar:na] at com.google.common.collect.Lists.newArrayList(Lists.java:138)[guava-11.0.2-atlassian-01.jar:na] at com.google.common.collect.Lists.newArrayList(Lists.java:119)[guava-11.0.2-atlassian-01.jar:na] at com.google.common.collect.NaturalOrdering.sortedCopy(NaturalOrdering.java:57)[guava-11.0.2-atlassian-01.jar:na] at com.google.common.collect.Ordering.immutableSortedCopy(Ordering.java:534)[guava-11.0.2-atlassian-01.jar:na] at com.atlassian.stash.util.Chainable.sort(Chainable.java:102)[stash-util-3.2.0.jar:na] at com.atlassian.stash.internal.branch.model.SimpleBranchModel.getMergePath(SimpleBranchModel.java:72)[stash-branch-utils-3.2.0_1406717432000.jar:na] at com.atlassian.stash.internal.branch.automerge.DefaultAutoMergeService$$anonfun$getDownstreamBranches$2.apply(DefaultAutoMergeService.scala:44)[stash-branch-utils-3.2.0_1406717432000.jar:na] at com.atlassian.stash.internal.branch.automerge.DefaultAutoMergeService$$anonfun$getDownstreamBranches$2.apply(DefaultAutoMergeService.scala:44)[stash-branch-utils-3.2.0_1406717432000.jar:na] at scala.util.Either$RightProjection.map(Either.scala:536)[scala-2.10-provider-plugin-0.5.jar:na] at com.atlassian.stash.internal.branch.automerge.DefaultAutoMergeService.getDownstreamBranches(DefaultAutoMergeService.scala:44)[stash-branch-utils-3.2.0_1406717432000.jar:na] at com.atlassian.stash.internal.branch.automerge.DefaultAutoMergeService.getAutoMerge(DefaultAutoMergeService.scala:16)[stash-branch-utils-3.2.0_1406717432000.jar:na] at com.atlassian.stash.internal.branch.automerge.rest.AutoMergeResource.getMergePath(AutoMergeResource.java:59)[stash-branch-utils-3.2.0_1406717432000.jar:na] at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:25)[applinks-plugin-4.2.2_1406629200000.jar:na] at com.atlassian.stash.internal.spring.security.StashAuthenticationFilter.doFilter(StashAuthenticationFilter.java:86)[StashAuthenticationFilter.class:na] at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doInsideSpringSecurityChain(BeforeLoginPluginAuthenticationFilter.java:111)[BeforeLoginPluginAuthenticationFilter.class:na] at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:77)[BeforeLoginPluginAuthenticationFilter.class:na] at com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:100)[atlassian-trusted-apps-core-3.0.6.jar:na] at com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:69)[atlassian-oauth-service-provider-plugin-1.9.2_1406629200000.jar:na] at com.atlassian.analytics.client.filter.DefaultAnalyticsFilter.doFilter(DefaultAnalyticsFilter.java:33)[analytics-client-3.35_1406629204000.jar:na] at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)[atlassian-core-4.6.15.jar:na] at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doBeforeBeforeLoginFilters(BeforeLoginPluginAuthenticationFilter.java:89)[BeforeLoginPluginAuthenticationFilter.class:na] at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:75)[BeforeLoginPluginAuthenticationFilter.class:na] at com.atlassian.stash.internal.request.DefaultRequestManager.doAsRequest(DefaultRequestManager.java:84)[stash-service-impl-3.2.0.jar:na] at com.hazelcast.web.WebFilter.doFilter(WebFilter.java:446)[hazelcast-wm-3.3-RC2.jar:3.3-RC2] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[na:1.7.0_51] at java.lang.Thread.run(Thread.java:744)[na:1.7.0_51]

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    You are the first who have seen this exception. Write a tip to help other users and build your expert profile.