Revision: 2652 http://archive-access.svn.sourceforge.net/archive-access/?rev=2652&view=rev Author: binzino Date: 2008-12-09 01:41:27 +0000 (Tue, 09 Dec 2008) Log Message: ----------- Modified call to String.split() so that only one '=' delimiter in key/value pair is used. This was a value can have a '=' character in it. Also fixed a type-o in a log message. Modified Paths: -------------- trunk/archive-access/projects/nutchwax/archive/src/plugin/index-nutchwax/src/java/org/archive/nutchwax/index/FieldSetter.java Modified: trunk/archive-access/projects/nutchwax/archive/src/plugin/index-nutchwax/src/java/org/archive/nutchwax/index/FieldSetter.java =================================================================== --- trunk/archive-access/projects/nutchwax/archive/src/plugin/index-nutchwax/src/java/org/archive/nutchwax/index/FieldSetter.java 2008-12-09 01:39:26 UTC (rev 2651) +++ trunk/archive-access/projects/nutchwax/archive/src/plugin/index-nutchwax/src/java/org/archive/nutchwax/index/FieldSetter.java 2008-12-09 01:41:27 UTC (rev 2652) @@ -95,7 +95,7 @@ for ( String field : s.split( "\\s+" ) ) { // Split: "foo:true:false=bar" into ["foo:true:false","bar"] - String[] fieldParts = field.split("="); + String[] fieldParts = field.split("=", 2); // Split: "foo:true:false" into ["foo","true","false"] String[] keyParts = fieldParts[0].split( "[:]" ); @@ -118,7 +118,7 @@ String value = fieldParts.length > 1 ? fieldParts[1] : null; - LOG.info( "Add field spetting: " + key + "[" + store + ":" + tokenize + "] = " + value ); + LOG.info( "Add field setting: " + key + "[" + store + ":" + tokenize + "] = " + value ); this.settings.add( new FieldSetting( key, store, tokenize, value ) ); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |