Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 51548 Details for
Bug 160025
CharOperation fails with AIOOBE when replaced array contains the same chars
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix
patch_charOperation.txt (text/plain), 1.25 KB, created by
Olivier Thomann
on 2006-10-06 10:56:27 EDT
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2006-10-06 10:56:27 EDT
Size:
1.25 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/core/compiler/CharOperation.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/CharOperation.java,v >retrieving revision 1.74 >diff -u -r1.74 CharOperation.java >--- compiler/org/eclipse/jdt/core/compiler/CharOperation.java 17 May 2006 16:30:19 -0000 1.74 >+++ compiler/org/eclipse/jdt/core/compiler/CharOperation.java 6 Oct 2006 14:57:38 -0000 >@@ -2862,13 +2862,11 @@ > > if (!equals(toBeReplaced, replacementChars)) { > >- next : for (int i = 0; i < max; i++) { >- int j = 0; >- while (j < replacedLength) { >- if (i + j == max) >- continue next; >- if (array[i + j] != toBeReplaced[j++]) >- continue next; >+ next : for (int i = 0; i < max;) { >+ int index = indexOf(toBeReplaced, array, true, i); >+ if (index == -1) { >+ i++; >+ continue next; > } > if (occurrenceCount == starts.length) { > System.arraycopy( >@@ -2878,7 +2876,8 @@ > 0, > occurrenceCount); > } >- starts[occurrenceCount++] = i; >+ starts[occurrenceCount++] = index; >+ i = index + replacedLength; > } > } > if (occurrenceCount == 0)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 160025
: 51548