Project

General

Profile

« Previous | Next » 

Revision 2352

Added by sgarg almost 20 years ago

Fixed a bug in previous commit. Moved normalization function before the string size is counted so that size change due to normalization is taken into account.

View differences:

src/edu/ucsb/nceas/metacat/DBSAXHandler.java
839 839
        if (strBuffer == null || node == null) { return nodeId; }
840 840
        boolean moredata = true;
841 841
        String data = null;
842

  
843
        String normalizedData = strBuffer.toString();
844
        strBuffer = new StringBuffer(MetaCatUtil.normalize(normalizedData));
845

  
842 846
        int bufferSize = strBuffer.length();
843 847
        int start = 0;
844 848

  
......
862 866
                }
863 867

  
864 868
                // Write the content of the node to the database
865
                nodeId = node.writeChildNodeToDB("TEXT", null,
866
                                                 MetaCatUtil.normalize(data),
867
                                                 docid);
869
                nodeId = node.writeChildNodeToDB("TEXT", null, data, docid);
868 870
            }//while
869 871
        }//if
870 872
        return nodeId;

Also available in: Unified diff