[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [cp-patches] RFC: StringIndexOutOfBoundsException fixes inString con
From: |
Jeroen Frijters |
Subject: |
RE: [cp-patches] RFC: StringIndexOutOfBoundsException fixes inString contructors |
Date: |
Wed, 2 Nov 2005 12:50:27 +0100 |
Christian Thalinger wrote:
> + if (offset + count < 0 || offset + count > ascii.length)
You can write this more efficiently as:
if (ascii.length - offset < count)
(This assumes that offset and count have previously been checked to be
non-negative.)
Regards,
Jeroen
- RE: [cp-patches] RFC: StringIndexOutOfBoundsException fixes inString contructors,
Jeroen Frijters <=