[ https://issues.apache.org/jira/browse/OOZIE-2914?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16052860#comment-16052860 ]
Hadoop QA commented on OOZIE-2914: ---------------------------------- Testing JIRA OOZIE-2914 Cleaning local git workspace ---------------------------- {color:green}+1 PATCH_APPLIES{color} {color:green}+1 CLEAN{color} {color:green}+1 RAW_PATCH_ANALYSIS{color} . {color:green}+1{color} the patch does not introduce any @author tags . {color:green}+1{color} the patch does not introduce any tabs . {color:green}+1{color} the patch does not introduce any trailing spaces . {color:green}+1{color} the patch does not introduce any line longer than 132 . {color:green}+1{color} the patch does adds/modifies 1 testcase(s) {color:green}+1 RAT{color} . {color:green}+1{color} the patch does not seem to introduce new RAT warnings {color:green}+1 JAVADOC{color} . {color:green}+1{color} the patch does not seem to introduce new Javadoc warnings . {color:red}WARNING{color}: the current HEAD has 6 Javadoc warning(s) {color:green}+1 COMPILE{color} . {color:green}+1{color} HEAD compiles . {color:green}+1{color} patch compiles . {color:green}+1{color} the patch does not seem to introduce new javac warnings {color:green}+1{color} There are no new bugs found in total. {color:green}+1 BACKWARDS_COMPATIBILITY{color} . {color:green}+1{color} the patch does not change any JPA Entity/Colum/Basic/Lob/Transient annotations . {color:green}+1{color} the patch does not modify JPA files {color:green}+1 TESTS{color} . Tests run: 1971 . Tests rerun: 79 . Tests failed at first run: org.apache.oozie.action.hadoop.TestJavaActionExecutor,org.apache.oozie.jms.TestJMSJobEventListener,org.apache.oozie.action.hadoop.TestLauncherAM, {color:green}+1 DISTRO{color} . {color:green}+1{color} distro tarball builds with the patch ---------------------------- {color:green}*+1 Overall result, good!, no -1s*{color} {color:red}. There is at least one warning, please check{color} The full output of the test-patch run is available at . https://builds.apache.org/job/oozie-trunk-precommit-build/3902/ > Consolidate Trim > ----------------- > > Key: OOZIE-2914 > URL: https://issues.apache.org/jira/browse/OOZIE-2914 > Project: Oozie > Issue Type: Bug > Reporter: Peter Cseh > Assignee: Jan Hentschel > Labels: newbie > Attachments: OOZIE-2914-1.patch > > > There are some [tTrim] functions across our codebase: > {code} > 171- * @return the formatted time string. > >> [350] 14:20 : oozie (cdh6.x) :: ack -C8 --type=java "[tT]rim\(String" > core/src/main/java/org/apache/oozie/action/hadoop/CredentialsProviderFactory.java > 89- } > 90- > 91- /** > 92- * To trim string > 93- * > 94- * @param str > 95- * @return trim string > 96- */ > 97: public String trim(String str) { > 98- if (str != null) { > 99- str = str.replaceAll("\\n", ""); > 100- str = str.replaceAll("\\t", ""); > 101- str = str.trim(); > 102- } > 103- return str; > 104- } > 105-} > core/src/main/java/org/apache/oozie/action/hadoop/DistcpActionExecutor.java > 81- } > 82- > 83- /** > 84- * To trim string > 85- * > 86- * @param str > 87- * @return trim string > 88- */ > 89: public static String Trim(String str) { > 90- if (str != null) { > 91- str = str.replaceAll("\\n", ""); > 92- str = str.replaceAll("\\t", ""); > 93- str = str.trim(); > 94- } > 95- return str; > 96- } > 97- > {code} > The purpose of these functions is to clean up input from xml files. > They should be consolidated to one place. > There might be a similar method in Hadoop, we should use that. -- This message was sent by Atlassian JIRA (v6.4.14#64029)