Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Here is the only piece of code Oracle accuses Google of copying, out of slightly under one million lines of code:

  private static void rangeCheck(int arrayLen, int fromIndex, int toIndex {
       if (fromIndex > toIndex)
            throw new IllegalArgumentException("fromIndex(" + fromIndex +
                 ") > toIndex(" + toIndex+")");
       if (fromIndex < 0) 
            throw new ArrayIndexOutOfBoundsException(fromIndex);
       if (toIndex > arrayLen) 
            throw new ArrayIndexOutOfBoundsException(toIndex);
  }
Note that of course "rangeCheck", "arrayLen", "fromIndex" and "toIndex" are part of the function signature, as is "ArrayIndexOutOfBoundsException" and "IllegalArgumentException".



Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: