Is the upvoting from a cynicism that the legal disclaimers are 10x the code? :D It is a compelling situation, on the other hand, I have been generally impressed that Oracle has their house in order, for sure. Thanks for posting this, though!
That's assuming this sort of example code is even copyrightable.
[1] http://sam.zoy.org/wtfpl/(I really don't like this practice of cross-posting stuff from Proggit, i've seen it a lot, even from top HNers)
Edit: Seen your update... yes, obviously. What i was referring to is, instead, similar to the practice discussed a while ago of "bot-posting" stuff from popular sources. I'm happy to see you are not one of them.