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 149689 Details for
Bug 292471
[parser] XMLSourceParser#regionMatches should compensate for offset
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Fix Patch
292471_XMLSourceParser.txt (text/plain), 2.54 KB, created by
Ian Tewksbury
on 2009-10-15 17:46:29 EDT
(
hide
)
Description:
Fix Patch
Filename:
MIME Type:
Creator:
Ian Tewksbury
Created:
2009-10-15 17:46:29 EDT
Size:
2.54 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.wst.xml.core >Index: src/org/eclipse/wst/xml/core/internal/parser/XMLSourceParser.java >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/XMLSourceParser.java,v >retrieving revision 1.19 >diff -u -r1.19 XMLSourceParser.java >--- src/org/eclipse/wst/xml/core/internal/parser/XMLSourceParser.java 12 Mar 2009 05:14:12 -0000 1.19 >+++ src/org/eclipse/wst/xml/core/internal/parser/XMLSourceParser.java 15 Oct 2009 21:49:15 -0000 >@@ -483,18 +483,19 @@ > if (stringToCompare == null) > return false; > >+ int ajustedOffset = fOffset + offset; > boolean result = false; > if (fCharSequenceSource != null && fCharSequenceSource instanceof IRegionComparible) { >- result = ((IRegionComparible) fCharSequenceSource).regionMatches(offset, length, stringToCompare); >+ result = ((IRegionComparible) fCharSequenceSource).regionMatches(ajustedOffset, length, stringToCompare); > } > else { > // old fashioned ways > String test = null; > if (fCharSequenceSource != null) { >- test = fCharSequenceSource.subSequence(offset, offset + length).toString(); >+ test = fCharSequenceSource.subSequence(ajustedOffset, ajustedOffset + length).toString(); > } > else if (fStringInput != null) { >- test = fStringInput.substring(offset, offset + length); >+ test = fStringInput.substring(ajustedOffset, ajustedOffset + length); > } > result = stringToCompare.equals(test); > } >@@ -506,18 +507,19 @@ > if (stringToCompare == null) > return false; > >+ int ajustedOffset = fOffset + offset; > boolean result = false; > if (fCharSequenceSource != null && fCharSequenceSource instanceof IRegionComparible) { >- result = ((IRegionComparible) fCharSequenceSource).regionMatchesIgnoreCase(offset, length, stringToCompare); >+ result = ((IRegionComparible) fCharSequenceSource).regionMatchesIgnoreCase(ajustedOffset, length, stringToCompare); > } > else { > // old fashioned ways > String test = null; > if (fCharSequenceSource != null) { >- test = fCharSequenceSource.subSequence(offset, offset + length).toString(); >+ test = fCharSequenceSource.subSequence(ajustedOffset, ajustedOffset + length).toString(); > } > else if (fStringInput != null) { >- test = fStringInput.substring(offset, offset + length); >+ test = fStringInput.substring(ajustedOffset, ajustedOffset + length); > } > result = stringToCompare.equalsIgnoreCase(test); > }
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 292471
: 149689