Author: ab Date: Mon Aug 18 17:42:07 2008 New Revision: 686910 URL: http://svn.apache.org/viewvc?rev=686910&view=rev Log: NUTCH-645 Parse-swf unit test failing - fix.
Modified: lucene/nutch/trunk/CHANGES.txt lucene/nutch/trunk/src/plugin/parse-swf/sample/test1.txt lucene/nutch/trunk/src/plugin/parse-swf/sample/test2.txt lucene/nutch/trunk/src/plugin/parse-swf/src/java/org/apache/nutch/parse/swf/SWFParser.java Modified: lucene/nutch/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/lucene/nutch/trunk/CHANGES.txt?rev=686910&r1=686909&r2=686910&view=diff ============================================================================== --- lucene/nutch/trunk/CHANGES.txt (original) +++ lucene/nutch/trunk/CHANGES.txt Mon Aug 18 17:42:07 2008 @@ -258,6 +258,8 @@ 94. NUTCH-641 - IndexSorter inorrectly copies stored fields (ab) +95. NUTCH-645 - Parse-swf unit test failing (ab) + Release 0.9 - 2007-04-02 Modified: lucene/nutch/trunk/src/plugin/parse-swf/sample/test1.txt URL: http://svn.apache.org/viewvc/lucene/nutch/trunk/src/plugin/parse-swf/sample/test1.txt?rev=686910&r1=686909&r2=686910&view=diff ============================================================================== --- lucene/nutch/trunk/src/plugin/parse-swf/sample/test1.txt (original) +++ lucene/nutch/trunk/src/plugin/parse-swf/sample/test1.txt Mon Aug 18 17:42:07 2008 @@ -1,60 +1,60 @@ -------- -Help -javascript:openCrosslinkWindow('/go/adobeacquisition') -Macromedia Home +/go/gnav_cart +/go/gnav_company +/go/gnav_devnet +/go/gnav_downloads +/go/gnav_fl_minmessage +/go/gnav_help +/go/gnav_mm_home +/go/gnav_products /go/gnav_search?loc=en_us -MovieClip -solutions /go/gnav_showcase -_sans -rollOut -To ensure the best possible Internet Experience, please download the latest version of the free +/go/gnav_solutions /go/gnav_store +/go/gnav_support +/go/gnav_your_account +Acquisition Info +Adobe Home +AppleGothic +Array +Company +Developers +Downloads +Help +Home International +LocaleManager +Macromedia Flash Player +Macromedia Home +MovieClip Products +Showcase +Solutions +Store +String +Support +TextFormat +To ensure the best possible Internet Experience, please download the latest version of the free +Verdana +_sans +active +bluePill +button +color +company devnet +downloads en_us -/go/gnav_products -AppleGothic -Macromedia Flash Player -active +home +javascript:openCrosslinkWindow('/go/adobeacquisition') +javascript:openCrosslinkWindow('/go/gnav_adobe_home') products -String -Store -downloads +rollOut rollOver -Adobe Home -/go/gnav_your_account -/go/gnav_downloads -Showcase -bluePill -/go/gnav_company -/go/gnav_support -/go/gnav_help -javascript:openCrosslinkWindow('/go/gnav_adobe_home') -home -Home -Array -/go/gnav_fl_minmessage -textColor -Developers -Support -color -support +selected showcase -button -/go/gnav_mm_home +solutions +support tabHolder -selected -Solutions -LocaleManager -Verdana -/go/gnav_devnet -Acquisition Info -/go/gnav_cart -Company -/go/gnav_solutions -company -Downloads -TextFormat +textColor Modified: lucene/nutch/trunk/src/plugin/parse-swf/sample/test2.txt URL: http://svn.apache.org/viewvc/lucene/nutch/trunk/src/plugin/parse-swf/sample/test2.txt?rev=686910&r1=686909&r2=686910&view=diff ============================================================================== --- lucene/nutch/trunk/src/plugin/parse-swf/sample/test2.txt (original) +++ lucene/nutch/trunk/src/plugin/parse-swf/sample/test2.txt Mon Aug 18 17:42:07 2008 @@ -1,5 +1,5 @@ Impact Impact Impact Arial Arial Arial Webdings Webdings Webdings Verdana Verdana Verdana CourierNew CourierNew CourierNew Bimini Bimini Bimini -------- -font -color TextFormat +color +font Modified: lucene/nutch/trunk/src/plugin/parse-swf/src/java/org/apache/nutch/parse/swf/SWFParser.java URL: http://svn.apache.org/viewvc/lucene/nutch/trunk/src/plugin/parse-swf/src/java/org/apache/nutch/parse/swf/SWFParser.java?rev=686910&r1=686909&r2=686910&view=diff ============================================================================== --- lucene/nutch/trunk/src/plugin/parse-swf/src/java/org/apache/nutch/parse/swf/SWFParser.java (original) +++ lucene/nutch/trunk/src/plugin/parse-swf/src/java/org/apache/nutch/parse/swf/SWFParser.java Mon Aug 18 17:42:07 2008 @@ -178,10 +178,11 @@ public String getActionText() { StringBuffer res = new StringBuffer(); - Iterator it = actionStrings.iterator(); - while (it.hasNext()) { - if (res.length() > 0) res.append('\n'); - res.append(it.next()); + String[] strings = (String[])actionStrings.toArray(new String[actionStrings.size()]); + Arrays.sort(strings); + for (int i = 0; i < strings.length; i++) { + if (i > 0) res.append('\n'); + res.append(strings[i]); } return res.toString(); }