for more than ten years Sun encouraged
Yes, and they acknowledged as such. Clearly Oracle waited until they had a big fish wriggling on the hook and they've been trying to reel Google in ever since. But in turn Google can argue some bad faith, since they offered to license and were turned down.
I didn't ignore it; unlike trademarks, a failure to enforce rights under copyright doesn't invalidate them if later asserted. 'Squatters' rights' don't apply.
It's a stretch of imagination for some, but it's possible to believe that one party to a case should win on the particular merits while thinking they should lose on legal principle.