mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-19 23:15: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:
parent
470de4e66b
commit
4ad7f81c23
1 changed files with 4 additions and 3 deletions
|
@ -464,10 +464,11 @@ public class ToolReference implements IToolReference {
|
|||
public String getToolCommand() {
|
||||
if (command == null) {
|
||||
// see if the parent has one
|
||||
if (parent != null) {
|
||||
return parent.getToolCommand();
|
||||
if (parent == null) {
|
||||
// bad reference
|
||||
return ""; // $NON-NLS-1$
|
||||
}
|
||||
return ""; // bad reference // $NON-NLS-1$
|
||||
return parent.getToolCommand();
|
||||
}
|
||||
return command;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue