https://www.bbc.co.uk/news/technology-56639088 - commonly considered that Oracle bought Sun to get hold of Java so they could sue for copyright infringement. Sun was much more open-minded (except when Microsoft attempted to destroy Java by embrace-extend-extinguish)...
The US Supreme Court has handed Google a major win in a decade-long battle over copied code.