Author: pkluegl
Date: Fri Dec 21 14:36:48 2018
New Revision: 1849482

URL: http://svn.apache.org/viewvc?rev=1849482&view=rev
Log:
avoid warning

Modified:
    
uima/ruta/trunk/ruta-core/src/test/java/org/apache/uima/ruta/expression/resource/WordTableStringExpressionTest.java

Modified: 
uima/ruta/trunk/ruta-core/src/test/java/org/apache/uima/ruta/expression/resource/WordTableStringExpressionTest.java
URL: 
http://svn.apache.org/viewvc/uima/ruta/trunk/ruta-core/src/test/java/org/apache/uima/ruta/expression/resource/WordTableStringExpressionTest.java?rev=1849482&r1=1849481&r2=1849482&view=diff
==============================================================================
--- 
uima/ruta/trunk/ruta-core/src/test/java/org/apache/uima/ruta/expression/resource/WordTableStringExpressionTest.java
 (original)
+++ 
uima/ruta/trunk/ruta-core/src/test/java/org/apache/uima/ruta/expression/resource/WordTableStringExpressionTest.java
 Fri Dec 21 14:36:48 2018
@@ -21,7 +21,11 @@ package org.apache.uima.ruta.expression.
 
 import static org.junit.Assert.assertEquals;
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
 
 import org.apache.uima.cas.CAS;
 import org.apache.uima.cas.FSIterator;
@@ -37,19 +41,18 @@ import org.junit.Test;
 
 public class WordTableStringExpressionTest {
 
-
   @Test
   public void test() throws Exception {
     String document = "Kluegl Schor Kottmann";
 
-    String script="STRING s = \"org/apache/uima/ruta/action/\";\n";
-    script +="WORDTABLE table = s + \"table.csv\";\n";
-    script +="MARKTABLE(Person, 1, table, true, 0, \"-.,\", 10, \"firstname\" 
= 2, \"system\" = 3);\n";
-    
+    String script = "STRING s = \"org/apache/uima/ruta/action/\";\n";
+    script += "WORDTABLE table = s + \"table.csv\";\n";
+    script += "MARKTABLE(Person, 1, table, true, 0, \"-.,\", 10, \"firstname\" 
= 2, \"system\" = 3);\n";
+
     Map<String, String> complexTypes = new TreeMap<String, String>();
     String typeName = "org.apache.uima.Person";
     complexTypes.put(typeName, "uima.tcas.Annotation");
-    
+
     Map<String, List<TestFeature>> features = new TreeMap<String, 
List<TestFeature>>();
     List<TestFeature> list = new ArrayList<RutaTestUtils.TestFeature>();
     features.put(typeName, list);
@@ -58,12 +61,12 @@ public class WordTableStringExpressionTe
     String fn2 = "system";
     list.add(new TestFeature(fn2, "", "uima.cas.String"));
 
-    Map<String, Object> map = new HashMap();
+    Map<String, Object> map = new HashMap<>();
     map.put(RutaEngine.PARAM_DICT_REMOVE_WS, true);
 
     CAS cas = RutaTestUtils.getCAS(document, complexTypes, features);
     Ruta.apply(cas, script, map);
-    
+
     Type t = null;
     AnnotationIndex<AnnotationFS> ai = null;
     FSIterator<AnnotationFS> iterator = null;
@@ -74,46 +77,46 @@ public class WordTableStringExpressionTe
     Feature f1 = t.getFeatureByBaseName(fn1);
     Feature f2 = t.getFeatureByBaseName(fn2);
     ai = cas.getAnnotationIndex(t);
-    
+
     assertEquals(3, ai.size());
     iterator = ai.iterator();
-    
+
     next = iterator.next();
     v1 = next.getStringValue(f1);
     v2 = next.getStringValue(f2);
     assertEquals("Peter", v1);
     assertEquals("Ruta", v2);
-    
+
     next = iterator.next();
     v1 = next.getStringValue(f1);
     v2 = next.getStringValue(f2);
     assertEquals("Marshall", v1);
     assertEquals("UIMA", v2);
-    
+
     next = iterator.next();
     v1 = next.getStringValue(f1);
     v2 = next.getStringValue(f2);
     assertEquals("Joern", v1);
     assertEquals("CAS Editor", v2);
-    
-    cas.release();    
+
+    cas.release();
 
   }
-  
+
   @Test
   public void testInBlock() throws Exception {
     String document = "Kluegl Schor Kottmann";
 
-    String script="STRING s = \"org/apache/uima/ruta/action/\";\n";
-    script +="BLOCK(block) Document{}{\n";
-    script +="WORDTABLE table = s + \"table.csv\";\n";
-    script +="MARKTABLE(Person, 1, table, true, 0, \"-.,\", 10, \"firstname\" 
= 2, \"system\" = 3);\n";
-    script +="}\n";
-    
+    String script = "STRING s = \"org/apache/uima/ruta/action/\";\n";
+    script += "BLOCK(block) Document{}{\n";
+    script += "WORDTABLE table = s + \"table.csv\";\n";
+    script += "MARKTABLE(Person, 1, table, true, 0, \"-.,\", 10, \"firstname\" 
= 2, \"system\" = 3);\n";
+    script += "}\n";
+
     Map<String, String> complexTypes = new TreeMap<String, String>();
     String typeName = "org.apache.uima.Person";
     complexTypes.put(typeName, "uima.tcas.Annotation");
-    
+
     Map<String, List<TestFeature>> features = new TreeMap<String, 
List<TestFeature>>();
     List<TestFeature> list = new ArrayList<RutaTestUtils.TestFeature>();
     features.put(typeName, list);
@@ -127,7 +130,7 @@ public class WordTableStringExpressionTe
 
     CAS cas = RutaTestUtils.getCAS(document, complexTypes, features);
     Ruta.apply(cas, script, map);
-    
+
     Type t = null;
     AnnotationIndex<AnnotationFS> ai = null;
     FSIterator<AnnotationFS> iterator = null;
@@ -138,30 +141,30 @@ public class WordTableStringExpressionTe
     Feature f1 = t.getFeatureByBaseName(fn1);
     Feature f2 = t.getFeatureByBaseName(fn2);
     ai = cas.getAnnotationIndex(t);
-    
+
     assertEquals(3, ai.size());
     iterator = ai.iterator();
-    
+
     next = iterator.next();
     v1 = next.getStringValue(f1);
     v2 = next.getStringValue(f2);
     assertEquals("Peter", v1);
     assertEquals("Ruta", v2);
-    
+
     next = iterator.next();
     v1 = next.getStringValue(f1);
     v2 = next.getStringValue(f2);
     assertEquals("Marshall", v1);
     assertEquals("UIMA", v2);
-    
+
     next = iterator.next();
     v1 = next.getStringValue(f1);
     v2 = next.getStringValue(f2);
     assertEquals("Joern", v1);
     assertEquals("CAS Editor", v2);
-    
-    cas.release();    
+
+    cas.release();
 
   }
-  
+
 }


Reply via email to