You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by pk...@apache.org on 2013/01/10 20:43:50 UTC
svn commit: r1431577 - in /uima/sandbox/TextMarker/trunk:
uimaj-ep-textmarker-addons/src/main/java/org/apache/uima/textmarker/testing/evaluator/
uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/builder/
uimaj-ep-textmarker-text...
Author: pkluegl
Date: Thu Jan 10 19:43:49 2013
New Revision: 1431577
URL: http://svn.apache.org/viewvc?rev=1431577&view=rev
Log:
UIMA-2563
- replaced String.isEmpty() by "".equals()
Modified:
uima/sandbox/TextMarker/trunk/uimaj-ep-textmarker-addons/src/main/java/org/apache/uima/textmarker/testing/evaluator/FeatureCasEvaluator.java
uima/sandbox/TextMarker/trunk/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/builder/TextMarkerProjectUtils.java
uima/sandbox/TextMarker/trunk/uimaj-ep-textmarker-textruler/src/main/java/org/apache/uima/textmarker/textruler/core/TextRulerBasicLearner.java
uima/sandbox/TextMarker/trunk/uimaj-ep-textmarker-textruler/src/main/java/org/apache/uima/textmarker/textruler/learner/lp2/BasicLP2.java
Modified: uima/sandbox/TextMarker/trunk/uimaj-ep-textmarker-addons/src/main/java/org/apache/uima/textmarker/testing/evaluator/FeatureCasEvaluator.java
URL: http://svn.apache.org/viewvc/uima/sandbox/TextMarker/trunk/uimaj-ep-textmarker-addons/src/main/java/org/apache/uima/textmarker/testing/evaluator/FeatureCasEvaluator.java?rev=1431577&r1=1431576&r2=1431577&view=diff
==============================================================================
--- uima/sandbox/TextMarker/trunk/uimaj-ep-textmarker-addons/src/main/java/org/apache/uima/textmarker/testing/evaluator/FeatureCasEvaluator.java (original)
+++ uima/sandbox/TextMarker/trunk/uimaj-ep-textmarker-addons/src/main/java/org/apache/uima/textmarker/testing/evaluator/FeatureCasEvaluator.java Thu Jan 10 19:43:49 2013
@@ -332,7 +332,7 @@ public class FeatureCasEvaluator impleme
String featureValue2 = a2.getFeatureValueAsString(eachFeature2);
- if ((featureValue2 == null || featureValue2.trim().isEmpty()) && (featureValue1 == null)) {
+ if ((featureValue2 == null || "".equals(featureValue2.trim())) && (featureValue1 == null)) {
// nothing to do
Modified: uima/sandbox/TextMarker/trunk/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/builder/TextMarkerProjectUtils.java
URL: http://svn.apache.org/viewvc/uima/sandbox/TextMarker/trunk/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/builder/TextMarkerProjectUtils.java?rev=1431577&r1=1431576&r2=1431577&view=diff
==============================================================================
--- uima/sandbox/TextMarker/trunk/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/builder/TextMarkerProjectUtils.java (original)
+++ uima/sandbox/TextMarker/trunk/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/builder/TextMarkerProjectUtils.java Thu Jan 10 19:43:49 2013
@@ -163,7 +163,7 @@ public class TextMarkerProjectUtils {
dataPath = "";
}
String addon = folder.getLocation().toPortableString();
- if (!dataPath.isEmpty()) {
+ if (!"".equals(dataPath)) {
dataPath += File.pathSeparator;
}
dataPath += addon;
@@ -176,7 +176,7 @@ public class TextMarkerProjectUtils {
return;
}
String path = folder.getLocation().toPortableString();
- if (!dataPath.isEmpty()) {
+ if (!"".equals(dataPath)) {
dataPath.replaceAll(path, "");
dataPath.replaceAll(File.pathSeparator + File.pathSeparator, "");
}
Modified: uima/sandbox/TextMarker/trunk/uimaj-ep-textmarker-textruler/src/main/java/org/apache/uima/textmarker/textruler/core/TextRulerBasicLearner.java
URL: http://svn.apache.org/viewvc/uima/sandbox/TextMarker/trunk/uimaj-ep-textmarker-textruler/src/main/java/org/apache/uima/textmarker/textruler/core/TextRulerBasicLearner.java?rev=1431577&r1=1431576&r2=1431577&view=diff
==============================================================================
--- uima/sandbox/TextMarker/trunk/uimaj-ep-textmarker-textruler/src/main/java/org/apache/uima/textmarker/textruler/core/TextRulerBasicLearner.java (original)
+++ uima/sandbox/TextMarker/trunk/uimaj-ep-textmarker-textruler/src/main/java/org/apache/uima/textmarker/textruler/core/TextRulerBasicLearner.java Thu Jan 10 19:43:49 2013
@@ -151,7 +151,7 @@ public abstract class TextRulerBasicLear
for (String string : missingTypes) {
missingString += string + ", ";
}
- if (!missingString.isEmpty()) {
+ if (!"".equals(missingString)) {
missingString = missingString.substring(0, missingString.length() - 2);
}
if (!result) {
Modified: uima/sandbox/TextMarker/trunk/uimaj-ep-textmarker-textruler/src/main/java/org/apache/uima/textmarker/textruler/learner/lp2/BasicLP2.java
URL: http://svn.apache.org/viewvc/uima/sandbox/TextMarker/trunk/uimaj-ep-textmarker-textruler/src/main/java/org/apache/uima/textmarker/textruler/learner/lp2/BasicLP2.java?rev=1431577&r1=1431576&r2=1431577&view=diff
==============================================================================
--- uima/sandbox/TextMarker/trunk/uimaj-ep-textmarker-textruler/src/main/java/org/apache/uima/textmarker/textruler/learner/lp2/BasicLP2.java (original)
+++ uima/sandbox/TextMarker/trunk/uimaj-ep-textmarker-textruler/src/main/java/org/apache/uima/textmarker/textruler/learner/lp2/BasicLP2.java Thu Jan 10 19:43:49 2013
@@ -581,7 +581,7 @@ public abstract class BasicLP2 extends T
for (String string : missingTypes) {
missingString += string + ", ";
}
- if (!missingString.isEmpty()) {
+ if (!"".equals(missingString)) {
missingString = missingString.substring(0, missingString.length() - 2);
}
if (!result) {
Re: svn commit: r1431577 - in /uima/sandbox/TextMarker/trunk: uimaj-ep-textmarker-addons/src/main/java/org/apache/uima/textmarker/testing/evaluator/
uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/builder/
uimaj-ep-textmarker-...
Posted by Peter Klügl <pk...@uni-wuerzburg.de>.
Thanks for the hint.
Peter
Am 10.01.2013 21:00, schrieb Richard Eckart de Castilho:
>> UIMA-2563
>> - replaced String.isEmpty() by "".equals()
> You may want to consider commons-lang StringUtils.isEmpty() or isBlank().
>
> -- Richard
>
Re: svn commit: r1431577 - in /uima/sandbox/TextMarker/trunk:
uimaj-ep-textmarker-addons/src/main/java/org/apache/uima/textmarker/testing/evaluator/
uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/builder/
uimaj-ep-textmarker-...
Posted by Richard Eckart de Castilho <ec...@ukp.informatik.tu-darmstadt.de>.
> UIMA-2563
> - replaced String.isEmpty() by "".equals()
You may want to consider commons-lang StringUtils.isEmpty() or isBlank().
-- Richard
--
-------------------------------------------------------------------
Richard Eckart de Castilho
Technical Lead
Ubiquitous Knowledge Processing Lab (UKP-TUD)
FB 20 Computer Science Department
Technische Universität Darmstadt
Hochschulstr. 10, D-64289 Darmstadt, Germany
phone [+49] (0)6151 16-7477, fax -5455, room S2/02/B117
eckart@ukp.informatik.tu-darmstadt.de
www.ukp.tu-darmstadt.de
Web Research at TU Darmstadt (WeRC) www.werc.tu-darmstadt.de
-------------------------------------------------------------------