Update ContextEncoder.java

Prevent serialization, deserialization and cloning