You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Raymond Augé (JIRA)" <ji...@apache.org> on 2016/05/26 12:55:12 UTC

[jira] [Created] (FELIX-5263) java.lang.ArrayIndexOutOfBoundsException: -1

Raymond Augé created FELIX-5263:
-----------------------------------

             Summary: java.lang.ArrayIndexOutOfBoundsException: -1
                 Key: FELIX-5263
                 URL: https://issues.apache.org/jira/browse/FELIX-5263
             Project: Felix
          Issue Type: Bug
          Components: Resolver
            Reporter: Raymond Augé


In a specific scenario where duplicate resources are provided to the resolver it produces the error bellow:

{code}
java.lang.ArrayIndexOutOfBoundsException: -1
	at org.apache.felix.resolver.util.CopyOnWriteList.set(CopyOnWriteList.java:57)
	at org.apache.felix.resolver.Candidates.prepare(Candidates.java:946)
	at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:232)
	at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:179)
	at biz.aQute.resolve.ResolverValidator.resolve(ResolverValidator.java:124)
	at biz.aQute.resolve.ResolverValidator.validateResources(ResolverValidator.java:81)
	at biz.aQute.resolve.ResolverValidator.validate(ResolverValidator.java:75)
	at biz.aQute.resolve.ValidatorTest.testDuplicateIndexAgainstLargeTargetPlatform_whyDoesThisFail(ValidatorTest.java:188)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at junit.framework.TestCase.runTest(TestCase.java:176)
	at junit.framework.TestCase.runBare(TestCase.java:141)
	at junit.framework.TestResult$1.protect(TestResult.java:122)
	at junit.framework.TestResult.runProtected(TestResult.java:142)
	at junit.framework.TestResult.run(TestResult.java:125)
	at junit.framework.TestCase.run(TestCase.java:129)
	at junit.framework.TestSuite.runTest(TestSuite.java:255)
	at junit.framework.TestSuite.run(TestSuite.java:250)
	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
{code}

Since the reproduction is complex I've provided one as a unit test in a PR to the bnd project. https://github.com/bndtools/bnd/pull/1472



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)