updt java.rb for new caveats DSL
Merge pull request #2508 from rolandwalker/java_caveats

updt java.rb for new caveats DSL