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 151630 Details for
Bug 294529
The Scanner sometimes ignores the given offset if larger than the EOF.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
a simple fix for the public API
scanner_fix.txt (text/plain), 986 bytes, created by
Dieter Kleinrath
on 2009-11-07 03:55:28 EST
(
hide
)
Description:
a simple fix for the public API
Filename:
MIME Type:
Creator:
Dieter Kleinrath
Created:
2009-11-07 03:55:28 EST
Size:
986 bytes
patch
obsolete
> >/* > To quickly fix the public API of the scanner I think this should work fine: >*/ > >public int getCurrentTokenEndPosition(){ >// CHANGED LINE: return this.currentPosition - 1; > return this.currentPosition > eofPosition ? eofPosition-1 : currentPosition-1; >} >public char[] getCurrentTokenSource() { > // Return the token REAL source (aka unicodes are precomputed) > > char[] result; > if (this.withoutUnicodePtr != 0) > // 0 is used as a fast test flag so the real first char is in position 1 > System.arraycopy( > this.withoutUnicodeBuffer, > 1, > result = new char[this.withoutUnicodePtr], > 0, > this.withoutUnicodePtr); > else { > int length; > System.arraycopy( > this.source, > this.startPosition, >// CHANGED LINE: result = new char[length = this.currentPosition - this.startPosition], > result = new char[length = (this.currentPosition > eofPosition ? eofPosition : currentPosition) - this.startPosition], > 0, > length); > } > return result; >}
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 Raw
Actions:
View
Attachments on
bug 294529
:
151630
|
152098