Update InputValidator.java

Prevent serialization, deserialization and cloning