Skip to content

Commit 0a0e37c

Browse files
authored
Merge pull request #911 from sagarbhavsar4328/myfirstbug
Issue:#845, added 'null' string check to allow to pass null values in…
2 parents 718c810 + eb9a575 commit 0a0e37c

File tree

1 file changed

+5
-1
lines changed
  • util/src/main/java/io/kubernetes/client/util

1 file changed

+5
-1
lines changed

util/src/main/java/io/kubernetes/client/util/Yaml.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,11 @@ private byte[] constructByteArray(ScalarNode node) {
350350
}
351351

352352
private Object constructDateTime(ScalarNode node) {
353-
return new DateTime(((ScalarNode) node).getValue(), DateTimeZone.UTC);
353+
if (node.getValue() == null || "null".equalsIgnoreCase(node.getValue())) {
354+
return null;
355+
} else {
356+
return new DateTime(node.getValue(), DateTimeZone.UTC);
357+
}
354358
}
355359
}
356360

0 commit comments

Comments
 (0)