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 32288 Details for
Bug 122234
bug in MSLSave.Escape.convert(String input) - escape strings overwrite input
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
correct implementation analogous to parent class (no patch)
MSLSave.Escape.txt (text/plain), 1.33 KB, created by
Henrik Rentz-Reichert
on 2005-12-28 04:53:08 EST
(
hide
)
Description:
correct implementation analogous to parent class (no patch)
Filename:
MIME Type:
Creator:
Henrik Rentz-Reichert
Created:
2005-12-28 04:53:08 EST
Size:
1.33 KB
patch
obsolete
> protected static class Escape > extends XMLSaveImpl.Escape { > > private static final char[] NOTHING = {}; > > public String convert(String input) { > boolean changed = false; > int inputLength = input.length(); > grow(inputLength); > int outputPos = 0; > int inputPos = 0; > char ch = 0; > while (inputLength-- > 0) { > ch = input.charAt(inputPos++); > switch (ch) { > case '&': > outputPos = append(outputPos, AMP, inputLength); > changed = true; > break; > case '<': > outputPos = append(outputPos, LESS, inputLength); > changed = true; > break; > case '"': > outputPos = append(outputPos, QUOTE, inputLength); > changed = true; > break; > case '\n': > outputPos = append(outputPos, LF, inputLength); > changed = true; > break; > case '\r': > outputPos = append(outputPos, CR, inputLength); > changed = true; > break; > case '\t': > outputPos = append(outputPos, TAB, inputLength); > changed = true; > break; > default: > if (ch < 0x20) { > // these characters are illegal in XML > outputPos = append(outputPos, NOTHING, inputLength); > changed = true; > } else { > value[outputPos] = ch; > outputPos++; > } > break; > } > } > > return changed ? new String(value, 0, outputPos) : input; > } > }
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 122234
: 32288 |
35258