The standard implementation of Java is free, and there's nothing that Oracle can do about that. The code is GPLv2, and there is a separate patent grant that grants impunity to users as long as they stick to the standard. Google made their own version of Java, and hence is not immune to patent suits.
Java is not a "trap" because of the GPLv2 and explicit patent grants for standard Java.
I forget where I was reading it (maybe here), but an author made a great point: Oracles open source projects are perfectly fine to use. There is nothing they can do because of the OS licenses and patent grants. However, developing for Oracle projects (or forking them for your own one) gives no such protection.