4 ms·
They were both written by Joshua Bloch, while working at Google. The first was for TimSort, which he donated to Sun/OpenJDK. He then reused the rangeCheck code
by dminor 14y ago
They were both written by Joshua Bloch, while working at Google. The first was for TimSort, which he donated to Sun/OpenJDK. He then reused the rangeCheck code in Android.
- krakensden 14y agoThis sort of thing is a little scary. We can't know for certain whether he wrote the same code the same way twice, or if he copied and pasted it, but I can certainly imagine doing the former.
- duaneb 14y agoHe copied and pasted: Q. The rangecheck function: Did you copy the Sun code while working on Android? A. I did that while working on Timsort, and it was during the period I was employed at Google, but not for Google. It was something I wrote on my own for OpenJDK. [I had not heard of Timsort before; it's (apparently) a very efficient sort written by Tim Peters for Python (see Wikipedia), and ported by Bloch to Java.] [Timsort will come up again later. I'm somewhat appalled by how much fuss is being made over the trivial "rangecheck" function.] Q. Why did you copy the rangecheck function for Timsort? A. It's good engineering to reuse the same function if possible [The context here was that he expected to fold Timsort into a public version of Java, and at that point it would make sense to call the existing rangecheck function from the new code rather than writing a different one.]
- cullen 14y agoOracle is claiming infringement and damages for something they (Sun) didn't even pay for? That's a lot of gall.