SAX transaction parser cuts down multiline string attribute values.

Description

org.vfny.geoserver.wfs.requests.TransactionHanlder only takes the first line of a multiline attribute value. This is in tha famouse characters(char[], int, int) method.

Environment

None

Activity

Show:
codehaus
April 10, 2015, 3:47 PM

CodeHaus Comment From: groldan - Time: Sun, 26 Jun 2005 21:23:46 -0500
---------------------
<p>the other problematic class was TransactionFeatureHandler.

Changed a couple of things: lazy parsing of the actual attribute value (through AttributeType.parse()), the whole content is gathered into a StringBuffer first until we reach the end of the element's content, since characters(char[], int, int) is called many times until it provides the whole content.

Also did some slight speed optimizations, since there was a huge waste of resources constructing logging messages which were not to be used (added the tipical if(LOGGER.isLoggeable...) and avoid multiple creation of the String fragment by directly adding the sub-char-array to the string buffer.</p>

<p>Now we can insert huge Strings! I am inserting a couple megs strings in a postgres Text field with great success. </p>

Assignee

Unassigned

Reporter

codehaus

Triage

None

Fix versions

Affects versions

Components

Priority

High
Configure