Using Java 8 code in (some) modules results in ArrayOutOfBoundsException

Steps to reproduce

Steps to reproduce:
1. Add Java 8 code somewhere. For example, create a Stream somewhere.
2. Build using maven.

Actual Results:

java.lang.ArrayIndexOutOfBoundsException: 18
at aQute.lib.osgi.Clazz.parseClassFile(Clazz.java:179)
at aQute.lib.osgi.Clazz.parseClassFile(Clazz.java:102)
at aQute.lib.osgi.Clazz.parseClassFileWithCollector(Clazz.java:91)
at aQute.lib.osgi.Clazz.parseClassFile(Clazz.java:80)
at aQute.lib.osgi.Analyzer.analyzeJar(Analyzer.java:1361)
at aQute.lib.osgi.Analyzer.analyzeBundleClasspath(Analyzer.java:1276)
at aQute.lib.osgi.Analyzer.analyze(Analyzer.java:105)
at aQute.lib.osgi.Builder.analyze(Builder.java:198)
at aQute.lib.osgi.Analyzer.calcManifest(Analyzer.java:283)
at aQute.lib.osgi.Builder.build(Builder.java:78)
at org.apache.felix.bundleplugin.BundlePlugin.buildOSGiBundle(BundlePlugin.java:395)
at org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:286)
at org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:240)
at org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:231)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:955)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:194)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)

Expected Results:

It should build fine, the compiler plugin already sets the language level to 8.

Workaround (if any):

The solution is to increase the maven-bundle-plugin version. A PR doing that follows.

Assignee

Unassigned

Reporter

Philipp Middendorf

Severity

Build Error

Tags (folksonomy)

None

Components

Affects versions

Priority

Minor
Configure