/[classpath]/classpath/java/lang/String.java
ViewVC logotype

Diff of /classpath/java/lang/String.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.76 by abalkiss, Tue Nov 8 16:04:49 2005 UTC revision 1.77 by twisti, Tue Dec 6 18:52:25 2005 UTC
# Line 273  public final class String implements Ser Line 273  public final class String implements Ser
273        throw new StringIndexOutOfBoundsException("offset: " + offset);        throw new StringIndexOutOfBoundsException("offset: " + offset);
274      if (count < 0)      if (count < 0)
275        throw new StringIndexOutOfBoundsException("count: " + count);        throw new StringIndexOutOfBoundsException("count: " + count);
276      if (offset + count < 0 || offset + count > ascii.length)      // equivalent to: offset + count < 0 || offset + count > ascii.length
277        if (ascii.length - offset < count)
278        throw new StringIndexOutOfBoundsException("offset + count: "        throw new StringIndexOutOfBoundsException("offset + count: "
279                                                  + (offset + count));                                                  + (offset + count));
280      value = new char[count];      value = new char[count];
# Line 338  public final class String implements Ser Line 339  public final class String implements Ser
339        throw new StringIndexOutOfBoundsException("offset: " + offset);        throw new StringIndexOutOfBoundsException("offset: " + offset);
340      if (count < 0)      if (count < 0)
341        throw new StringIndexOutOfBoundsException("count: " + count);        throw new StringIndexOutOfBoundsException("count: " + count);
342      if (offset + count < 0 || offset + count > data.length)      // equivalent to: offset + count < 0 || offset + count > data.length
343        if (data.length - offset < count)
344        throw new StringIndexOutOfBoundsException("offset + count: "        throw new StringIndexOutOfBoundsException("offset + count: "
345                                                  + (offset + count));                                                  + (offset + count));
346      try      try
# Line 418  public final class String implements Ser Line 420  public final class String implements Ser
420        throw new StringIndexOutOfBoundsException("offset: " + offset);        throw new StringIndexOutOfBoundsException("offset: " + offset);
421      if (count < 0)      if (count < 0)
422        throw new StringIndexOutOfBoundsException("count: " + count);        throw new StringIndexOutOfBoundsException("count: " + count);
423      if (offset + count < 0 || offset + count > data.length)      // equivalent to: offset + count < 0 || offset + count > data.length
424        if (data.length - offset < count)
425        throw new StringIndexOutOfBoundsException("offset + count: "        throw new StringIndexOutOfBoundsException("offset + count: "
426                                                  + (offset + count));                                                  + (offset + count));
427      int o, c;      int o, c;
# Line 533  public final class String implements Ser Line 536  public final class String implements Ser
536        throw new StringIndexOutOfBoundsException("offset: " + offset);        throw new StringIndexOutOfBoundsException("offset: " + offset);
537      if (count < 0)      if (count < 0)
538        throw new StringIndexOutOfBoundsException("count: " + count);        throw new StringIndexOutOfBoundsException("count: " + count);
539      if (offset + count < 0 || offset + count > data.length)      // equivalent to: offset + count < 0 || offset + count > data.length
540        if (data.length - offset < count)
541        throw new StringIndexOutOfBoundsException("offset + count: "        throw new StringIndexOutOfBoundsException("offset + count: "
542                                                  + (offset + count));                                                  + (offset + count));
543      if (dont_copy)      if (dont_copy)

Legend:
Removed from v.1.76  
changed lines
  Added in v.1.77

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26