Skip to main content

Google's chief Java architect: it's 'likely' I copied Sun code found in Android, 'I'm sorry' if I did

Google's chief Java architect: it's 'likely' I copied Sun code found in Android, 'I'm sorry' if I did


Google's "Java guru" took the stand in the infringement trial between Google and Oracle, where he admitted that he was "perfectly willing to believe" he may have accessed copyright Sun code when working no Java files implemented in Android.

Share this story

Tim Lindholm wasn't the only witness to have something interesting to say on the stand today in Google and Oracle's ongoing trial. Google's "Java guru" Joshua Bloch also spoke, getting into the nitty gritty of Java code and APIs, and admitting via previously-taped deposition testimony that it was likely that some of the code he contributed to Android was indeed copied. Bloch worked at Sun for eight years before moving to Google in 2004; his LinkedIn page refers to him as the company's Chief Java Architect, though during his testimony Bloch said the title was merely an unofficial one. Oracle's attorneys focused particularly on nine specific lines of code, constituting a method called rangeCheck — basically, a routine that checks to ensure if a given array of numbers are within a certain defined range. Bloch testified that he wrote the original rangeCheck code, present in a file called, back in 1997. In court documents, Sun claims a copyright date of 2004 in connection with the rangeCheck code.

The exact same nine lines are also present in an Android file named, which Bloch testified he wrote in 2007. When asked if he had copied the copyrighted Sun code directly for, Bloch initially responded "I don't recall." In a playback of his 2011 deposition, however, Bloch states that "the same order and same name is a strong indicator that it is likely that I did." However, he noted that it was a good engineering practice to use the same method, and that he not only contributed the code to Android, but to the Java Development Kit as well ( is now part of Java SE 7).

How clean was the Android clean room?

While the amount of code unto itself may seem trivial, it does hold implications for Google's assertions that it used a "clean room" when creating Android — in this case, ensuring that engineers working on the project didn't have access to copyrighted code from Sun or Oracle. Google CEO Larry Page himself said Tuesday that the company would take any copying or pasting of code "very seriously," but according to Bloch, nobody at Google ever spoke with him about whether it was appropriate for him to work on Android given his prior employment at Sun. While Bloch stated that he didn't recall accessing any copyrighted Sun or Oracle code, he admitted that "under the circumstances I wrote the code, yes, I'm perfectly willing to believe it."

"If I did, it was a mistake," Bloch said, "and I'm sorry I did it." The nine lines of rangeCheck code were removed from Android in version 4.0 of the operating system.