Issue Details (XML | Word | Printable)

Key: XALANJ-2220
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Brian Minchau
Reporter: Brian Minchau
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
XalanJ2

Serializer shouldn't know its own package (clean up)

Created: 28/Oct/05 01:34 AM   Updated: 11/Dec/07 04:33 PM
Return to search
Component/s: Serialization
Affects Version/s: 2.7
Fix Version/s: 2.7.1

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works 2220.patch1.txt 2005-10-28 04:34 AM Brian Minchau 10 kB

Xalan info: PatchAvailable
Reviewer: Yash Talwar
Resolution Date: 11/Jan/06 03:35 PM


 Description  « Hide
The serializer knows of its own package name, not just through hard
references, e.g. import statements, but through "soft" references in Strings.
For example the serializer's CharInfo.java has this code in it:
        public static final String XML_ENTITIES_RESOURCE
                  = "org.apache.xml.serializer.XMLEntities";


When Apache code is repackaged (e.g. by Sun or IBM) it is
sometimes has its package names changed. Repackaging would be
easier and safer if the code in the serializer was not aware of its own package
names in "soft" references in Strings. Hard references are easy to fix
at build time, soft references will show breakage at runtime. It would be
easier for repackagers, and safter if the serializer had not soft references
to its own package name.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Repository Revision Date User Message
ASF #367949 Wed Jan 11 06:34:19 UTC 2006 minchau Committing the patch in XALANJ-2220.
This reducest the serializer's knowledge of its own package
by replacing literal strings starting with:
  "org.apache.xml.serializer"
  "org/apache/xml/serializer"
with a constant that is derived from:
  SerializerBase.class.getName()

The patch was reviewed by Yash Talwar (see the Jira issue).
Files Changed
MODIFY /xalan/java/trunk/src/org/apache/xml/serializer/utils/Utils.java
MODIFY /xalan/java/trunk/src/org/apache/xalan/xsltc/compiler/Constants.java
MODIFY /xalan/java/trunk/src/org/apache/xml/serializer/Encodings.java
MODIFY /xalan/java/trunk/src/org/apache/xml/serializer/SerializerConstants.java
MODIFY /xalan/java/trunk/src/org/apache/xml/serializer/CharInfo.java
MODIFY /xalan/java/trunk/src/org/apache/xml/serializer/SerializerBase.java
MODIFY /xalan/java/trunk/src/org/apache/xml/serializer/OutputPropertiesFactory.java