Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 323422 - [launcher] --launcher.overrideVmargs/appendVmArgs incorrectly consumed
Summary: [launcher] --launcher.overrideVmargs/appendVmArgs incorrectly consumed
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Framework (show other bugs)
Version: 3.6   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.7 M2   Edit
Assignee: equinox.framework-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-23 14:16 EDT by Andrew Niefer CLA
Modified: 2010-08-30 16:13 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Niefer CLA 2010-08-23 14:16:29 EDT
Main processes the program arguments  to set some system properties and remove other launcher specific arguments.

If the last argument is a flag without a value, then it does not get processed.  This is because we check flags at args[i - 1] but only loop to i < args.length
Comment 1 Andrew Niefer CLA 2010-08-23 14:23:29 EDT
Sorry, I was wrong about this.

This is a bug in the way we are consuming the --launcher.overrideVmargs and appendVmargs specifically.  These arguments are handled where we are expecting a parameter, they need to be handled earlier when we are checking for flags.
Comment 2 Andrew Niefer CLA 2010-08-23 14:42:10 EDT
fixed
Comment 3 Thomas Watson CLA 2010-08-24 12:01:22 EDT
This is a flag the check so the [i-1] is incorrect and causes this:

java.lang.ArrayIndexOutOfBoundsException: -1
	at org.eclipse.equinox.launcher.Main.processCommandLine(Main.java:1496)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:542)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1409)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1385)
Comment 4 Andrew Niefer CLA 2010-08-30 16:13:45 EDT
this was fixed in v20100824b