Bug 71134 - Managed Make: String list command outputs null
Summary: Managed Make: String list command outputs null
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-build (show other bugs)
Version: 1.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 2.0.1   Edit
Assignee: Sean Evoy CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-29 18:58 EDT by PalmSource Eclipse Bug Tracker CLA
Modified: 2004-08-16 17:01 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description PalmSource Eclipse Bug Tracker CLA 2004-07-29 18:58:46 EDT
If no command attribute is specified for a String List Tool in a managed make 
ManagedBuildInfo definition, then a call to ToolReference.getToolFlags() will 
add "null" to the tool flags string buffer.  In that method, string lists 
commands should be handled similarly to Strings, that is don't append it if 
null:

case IOption.STRING_LIST :
		String cmd = option.getCommand();
		String[] list = option.getStringListValue();
		for (int j = 0; j < list.length; j++) {
			String temp = list[j];
--			buf.append(cmd + temp + WHITE_SPACE);
++			if (cmd != null) buf.append(cmd);
++			buf.append(temp + WHITE_SPACE);
		}
		break;

It is possible to have a string list option without a command prefix; we're 
using it for an "additional flags" option where the command is already in the 
value.
Comment 1 PalmSource Eclipse Bug Tracker CLA 2004-08-05 00:17:55 EDT
Note: the same affliction affects Tool.getToolFlags() and its StringList, so 
there's two total places to fix this problem.
Comment 2 Sean Evoy CLA 2004-08-16 17:01:39 EDT
Fixed in 2.0.1 and head. Simple change to avoid putting 'null' on the command 
line.