[ 
https://issues.apache.org/jira/browse/JOSHUA-342?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16837980#comment-16837980
 ] 

bd2019us commented on JOSHUA-342:
---------------------------------

Remodified the patch to undo the changes which broke the tests. These tests now 
all pass, as seen in the Github Pull Request

Diff from the master to the fixed branch -> [^JOSHUA-342-adjusted.patch]

> Use replace() instead of replaceAll() when no regex pattern is used
> -------------------------------------------------------------------
>
>                 Key: JOSHUA-342
>                 URL: https://issues.apache.org/jira/browse/JOSHUA-342
>             Project: Joshua
>          Issue Type: Improvement
>            Reporter: bd2019us
>            Priority: Minor
>              Labels: pull-request-available
>         Attachments: JOSHUA-342-adjusted.patch, JOSHUA-342.patch
>
>
> ReplaceAll() has extra unneeded overhead when it is used without a regex 
> argument. Use replace() instead to remove this overhead.
> Affected files:
> * src/main/java/org/apache/joshua/util/FormatUtils.java
> * src/main/java/org/apache/joshua/corpus/syntax/ArraySyntaxTree.java
> * src/main/java/org/apache/joshua/decoder/ff/FeatureVector.java
> * src/main/java/org/apache/joshua/mira/MIRACore.java
> * src/main/java/org/apache/joshua/zmert/MertCore.java



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to