Skip to content

Commit c5a1260

Browse files
committed
- reverts defensive programming on option value as null values are valid
1 parent 7b7458a commit c5a1260

2 files changed

Lines changed: 0 additions & 9 deletions

File tree

‎src/main/java/com/microsoft/graph/options/Option.java‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,6 @@ protected Option(@Nonnull final String name, @Nonnull final Object value) {
4949
if(name == null || name == "") {
5050
throw new IllegalArgumentException("name should not be null or empty");
5151
}
52-
if(value == null) {
53-
throw new IllegalArgumentException("value should not be null");
54-
}
5552
this.name = name;
5653
this.value = value;
5754
}

‎src/test/java/com/microsoft/graph/options/OptionTests.java‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,6 @@ public void testOption() {
3838
} catch(Exception ex) {
3939
assertTrue("exception is IllegalArgument", ex.getClass() == IllegalArgumentException.class);
4040
}
41-
try {
42-
new Option("onion", null);
43-
fail("should fail on null value");
44-
} catch(Exception ex) {
45-
assertTrue("exception is IllegalArgument", ex.getClass() == IllegalArgumentException.class);
46-
}
4741
}
4842

4943
}

0 commit comments

Comments
 (0)