commit | 730ed9f125b27b132829e6d54c57650fdcdebc3c | [log] [tgz] |
---|---|---|
author | Ingo Weigelt <iw@wglt.de> | Tue Dec 16 17:14:38 2014 +0100 |
committer | Ingo Weigelt <iw@wglt.de> | Tue Dec 16 17:14:38 2014 +0100 |
tree | c62846876b8b049daff697708d6e557b555f3754 | |
parent | a196ed9a207e98feff8401a1905ffd5e9189e66f [diff] |
allow null value if operator is IS_SET or IS_NOT_SET
diff --git a/org.eclipse.rmf.reqif10.search/src/org/eclipse/rmf/reqif10/search/filter/AbstractTextFilter.java b/org.eclipse.rmf.reqif10.search/src/org/eclipse/rmf/reqif10/search/filter/AbstractTextFilter.java index 226cc00..e92ddec 100644 --- a/org.eclipse.rmf.reqif10.search/src/org/eclipse/rmf/reqif10/search/filter/AbstractTextFilter.java +++ b/org.eclipse.rmf.reqif10.search/src/org/eclipse/rmf/reqif10/search/filter/AbstractTextFilter.java
@@ -87,7 +87,7 @@ "This filter does not support the " + operator.toString() + " operation"); } - if (null == value){ + if (null == value && operator != Operator.IS_SET && operator != Operator.IS_NOT_SET ){ throw new IllegalArgumentException( "Value can not be null"); }
diff --git a/org.eclipse.rmf.reqif10.search/src/org/eclipse/rmf/reqif10/search/filter/EnumFilter.java b/org.eclipse.rmf.reqif10.search/src/org/eclipse/rmf/reqif10/search/filter/EnumFilter.java index 5f6f44d..637c39d 100644 --- a/org.eclipse.rmf.reqif10.search/src/org/eclipse/rmf/reqif10/search/filter/EnumFilter.java +++ b/org.eclipse.rmf.reqif10.search/src/org/eclipse/rmf/reqif10/search/filter/EnumFilter.java
@@ -49,7 +49,7 @@ }; // ensure that value1 is not null - if (null == value){ + if (null == value && operator != Operator.IS_SET && operator != Operator.IS_NOT_SET ){ throw new IllegalArgumentException( "value1 can not be null"); }
diff --git a/org.eclipse.rmf.reqif10.search/src/org/eclipse/rmf/reqif10/search/filter/NumberFilter.java b/org.eclipse.rmf.reqif10.search/src/org/eclipse/rmf/reqif10/search/filter/NumberFilter.java index 16fdcfc..437221d 100644 --- a/org.eclipse.rmf.reqif10.search/src/org/eclipse/rmf/reqif10/search/filter/NumberFilter.java +++ b/org.eclipse.rmf.reqif10.search/src/org/eclipse/rmf/reqif10/search/filter/NumberFilter.java
@@ -78,7 +78,7 @@ }; // ensure that value1 is not null - if (null == value1){ + if (null == value1 && operator != Operator.IS_SET && operator != Operator.IS_NOT_SET ){ throw new IllegalArgumentException( "value1 can not be null"); }