mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-25 18:05:33 +02:00
Fix Unit test for bug 365718
make getTreeRoot correctly throw an exception if called for non tree nodes. Change-Id: Ief34c469c504cddc0212750bf98f4823774d1990 Reviewed-on: https://git.eclipse.org/r/5969 Reviewed-by: Doug Schaefer <dschaefer@qnx.com> IP-Clean: Doug Schaefer <dschaefer@qnx.com> Tested-by: Doug Schaefer <dschaefer@qnx.com>
This commit is contained in:
parent
12d73e274c
commit
bd57216cbf
1 changed files with 3 additions and 3 deletions
|
@ -2975,6 +2975,9 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
|
|||
|
||||
@Override
|
||||
public ITreeRoot getTreeRoot() throws BuildException {
|
||||
if (getValueType() != TREE) {
|
||||
throw new BuildException(ManagedMakeMessages.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
|
||||
}
|
||||
if (treeRoot == null) {
|
||||
if (superClass != null) {
|
||||
return superClass.getTreeRoot();
|
||||
|
@ -2982,9 +2985,6 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
|
|||
return null;
|
||||
}
|
||||
}
|
||||
if (getValueType() != TREE) {
|
||||
throw new BuildException(ManagedMakeMessages.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
return treeRoot;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue