mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-29 20:05:35 +02:00
added null check for macro name and alllow null value
This commit is contained in:
parent
c998734235
commit
4aecba2e95
1 changed files with 4 additions and 1 deletions
|
@ -22,8 +22,11 @@ public class MacroEntry extends APathEntry implements IMacroEntry {
|
|||
|
||||
public MacroEntry (IPath path, IPath baseRef, String macroName, String macroValue, IPath[] exclusionPatterns, boolean isExported) {
|
||||
super(IMacroEntry.CDT_MACRO, null, baseRef, path, exclusionPatterns, isExported);
|
||||
if ( macroName == null) {
|
||||
throw new IllegalArgumentException("Macro name cannot be null"); //$NON-NLS-1$
|
||||
}
|
||||
this.macroName = macroName;
|
||||
this.macroValue = macroValue;
|
||||
this.macroValue = macroValue == null ? "" : macroValue; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue