1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-20 15:35:24 +02:00

Bug 491945 - Refactor ToolReference::getToolCommand()

The implementation of `ToolReference::getToolCommand()` different from its
neighbours by checking if the `parent` was non-null. Change this so it looks for
the `parent` being null and swap the bodies of the `if` statement around to
maintain compatibility.

Change-Id: I8a188b350f94db9b1bd9d240b7a7320a930280a2
Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
This commit is contained in:
Alex Blewitt 2016-04-18 23:45:20 +01:00
parent 470de4e66b
commit 4ad7f81c23

View file

@ -464,10 +464,11 @@ public class ToolReference implements IToolReference {
public String getToolCommand() { public String getToolCommand() {
if (command == null) { if (command == null) {
// see if the parent has one // see if the parent has one
if (parent != null) { if (parent == null) {
return parent.getToolCommand(); // bad reference
return ""; // $NON-NLS-1$
} }
return ""; // bad reference // $NON-NLS-1$ return parent.getToolCommand();
} }
return command; return command;
} }