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 30238 Details for
Bug 112371
Performance and memory improvements for the three producer Common Base Event implementations.
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.
XmlUtilityPerformancePatch.txt
XmlUtilityPerformancePatch.txt (text/plain), 6.54 KB, created by
Paul Slauenwhite
on 2005-11-18 11:51:10 EST
(
hide
)
Description:
XmlUtilityPerformancePatch.txt
Filename:
MIME Type:
Creator:
Paul Slauenwhite
Created:
2005-11-18 11:51:10 EST
Size:
6.54 KB
patch
obsolete
>Index: XmlUtility.java >=================================================================== >RCS file: /cvsroot/tptp/platform/org.eclipse.hyades.logging.core/src/org/eclipse/hyades/logging/core/XmlUtility.java,v >retrieving revision 1.5 >diff -u -r1.5 XmlUtility.java >--- XmlUtility.java 14 Apr 2005 18:37:09 -0000 1.5 >+++ XmlUtility.java 18 Nov 2005 16:51:46 -0000 >@@ -1137,80 +1137,126 @@ > return (""); > } > >+ char[] characters = string.toCharArray(); > StringBuffer normalizedString = new StringBuffer(stringLength); >- char character; >- >+ int marker = 0; >+ int counter = 0; >+ > //Check if any characters require normalization or replacement of > //invalid characters: >- for (int counter = 0; counter < stringLength; counter++) { >- >- character = string.charAt(counter); >+ while (counter < stringLength) { > >- //0x003C: >- if (character == '<') { >- normalizedString.append("<"); >- } >+ //Only check non-alpha and non-numeric characters >+ if ((characters[counter] < 0x0028) || ((characters[counter] > 0x003B) && (characters[counter] < 0x003F)) || (characters[counter] > 0x007E)) { > >- //0x003E: >- else if (character == '>') { >- normalizedString.append(">"); >- } >- >- //0x0026: >- else if (character == '&') { >- normalizedString.append("&"); >- } >- >- //0x0022: >- else if (character == '"') { >- normalizedString.append("""); >- } >- >- //0x0027: >- else if (character == '\'') { >- normalizedString.append("'"); >- } >- >- //0x0009: >- else if (character == '\t') { >- normalizedString.append("	"); >- } >- >- //0x000A: >- else if (character == '\n') { >- normalizedString.append("
"); >- } >- >- //0x000D: >- else if (character == '\r') { >- normalizedString.append("
"); >- } >- >- /* >- * //0x0020: else if (character == ' '){ >- * normalizedString.append(" "); } >- */ >- >- //Handle valid UTF-16 character range: >- else if (((character >= 0x0020) && (character <= 0xD7FF)) || ((character >= 0xE000) && (character <= 0xFFFD))) { >- normalizedString.append(character); >- } >- >- /* >- * Handle valid UTF-32 character range: >- * else if ((character >= 0x0001) && (character <= 0x0010) && ((counter + 1) < stringLength)) { >- * >- * normalizedString.append(character); >- * >- * normalizedString.append(string.charAt(++counter)); >- * } >- */ >- >- else { >- normalizedString.append('?'); >- } >+ //0x003C: >+ if (characters[counter] == '<') { >+ >+ normalizedString.append(characters,marker,(counter - marker)); >+ marker = (counter + 1); >+ >+ normalizedString.append("<"); >+ } >+ >+ //0x003E: >+ else if (characters[counter] == '>') { >+ >+ normalizedString.append(characters,marker,(counter - marker)); >+ marker = (counter + 1); >+ >+ normalizedString.append(">"); >+ } >+ >+ //0x0026: >+ else if (characters[counter] == '&') { >+ >+ normalizedString.append(characters,marker,(counter - marker)); >+ marker = (counter + 1); >+ >+ normalizedString.append("&"); >+ } >+ >+ //0x0022: >+ else if (characters[counter] == '"') { >+ >+ normalizedString.append(characters,marker,(counter - marker)); >+ marker = (counter + 1); >+ >+ normalizedString.append("""); >+ } >+ >+ //0x0027: >+ else if (characters[counter] == '\'') { >+ >+ normalizedString.append(characters,marker,(counter - marker)); >+ marker = (counter + 1); >+ >+ normalizedString.append("'"); >+ } >+ >+ //0x0009: >+ else if (characters[counter] == '\t') { >+ >+ normalizedString.append(characters,marker,(counter - marker)); >+ marker = (counter + 1); >+ >+ normalizedString.append("	"); >+ } >+ >+ //0x000A: >+ else if (characters[counter] == '\n') { >+ >+ normalizedString.append(characters,marker,(counter - marker)); >+ marker = (counter + 1); >+ >+ normalizedString.append("
"); >+ } >+ >+ //0x000D: >+ else if (characters[counter] == '\r') { >+ >+ normalizedString.append(characters,marker,(counter - marker)); >+ marker = (counter + 1); >+ >+ normalizedString.append("
"); >+ } >+ >+ /* >+ * //0x0020: else if (character == ' '){ >+ * normalizedString.append(" "); } >+ */ >+ >+ //Handle valid UTF-16 character range: >+ else if (!(((characters[counter] >= 0x0020) && (characters[counter] <= 0xD7FF)) || ((characters[counter] >= 0xE000) && (characters[counter] <= 0xFFFD)))) { >+ >+ normalizedString.append(characters,marker,(counter - marker)); >+ marker = (counter + 1); >+ >+ normalizedString.append('?'); >+ } >+ >+ /* >+ * Handle valid UTF-32 character range: >+ * else if ((characters[counter] >= 0x0001) && (characters[counter] <= 0x0010) && ((counter + 1) < stringLength)) { >+ * >+ * normalizedString.append(characters[counter]); >+ * >+ * normalizedString.append(string.charAt(++counter)); >+ * } >+ */ >+ } >+ >+ counter++; > } > >+ if(marker == 0){ >+ return string; >+ } >+ >+ if(marker < counter){ >+ normalizedString.append(characters,marker,(counter - marker)); >+ } >+ > return (normalizedString.toString()); > } >
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 112371
:
28271
|
30229
|
30238