You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by re...@apache.org on 2021/01/25 11:38:11 UTC

[uima-uimaj] branch NO-JIRA-Align-code-with-changes-on-main-branch created (now edec46b)

This is an automated email from the ASF dual-hosted git repository.

rec pushed a change to branch NO-JIRA-Align-code-with-changes-on-main-branch
in repository https://gitbox.apache.org/repos/asf/uima-uimaj.git.


      at edec46b  [No Jira] Align code with changes on main branch

This branch includes the following new commits:

     new edec46b  [No Jira] Align code with changes on main branch

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[uima-uimaj] 01/01: [No Jira] Align code with changes on main branch

Posted by re...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rec pushed a commit to branch NO-JIRA-Align-code-with-changes-on-main-branch
in repository https://gitbox.apache.org/repos/asf/uima-uimaj.git

commit edec46b52e0247147a78adeb02300c8a00a6f563
Author: Richard Eckart de Castilho <re...@apache.org>
AuthorDate: Mon Jan 25 12:38:02 2021 +0100

    [No Jira] Align code with changes on main branch
---
 .../resource/metadata/impl/Import_implTest.java    |  6 ++---
 .../metadata/impl/MetaDataObject_implTest.java     | 30 +++++++++++-----------
 2 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/uimaj-core/src/test/java/org/apache/uima/resource/metadata/impl/Import_implTest.java b/uimaj-core/src/test/java/org/apache/uima/resource/metadata/impl/Import_implTest.java
index d286125..165a5ea 100644
--- a/uimaj-core/src/test/java/org/apache/uima/resource/metadata/impl/Import_implTest.java
+++ b/uimaj-core/src/test/java/org/apache/uima/resource/metadata/impl/Import_implTest.java
@@ -28,8 +28,6 @@ import java.net.URL;
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
 
-import junit.framework.TestCase;
-
 import org.apache.uima.UIMAFramework;
 import org.apache.uima.analysis_engine.impl.AnalysisEngineDescription_impl;
 import org.apache.uima.resource.ResourceManager;
@@ -38,6 +36,8 @@ import org.apache.uima.util.InvalidXMLException;
 import org.apache.uima.util.XMLInputSource;
 import org.w3c.dom.Document;
 
+import junit.framework.TestCase;
+
 public class Import_implTest extends TestCase {
 
   /**
@@ -127,7 +127,7 @@ public class Import_implTest extends TestCase {
       importObj = new Import_impl();
       importObj.setName("TypeSystemDescriptionImplTest.TestTypeSystem");
       String workingDir = JUnitExtension.getFile("TypeSystemDescriptionImplTest").getParentFile()
-      		.getAbsolutePath();
+            .getAbsolutePath();
       ResourceManager resMgr = UIMAFramework.newDefaultResourceManager();
       resMgr.setDataPath(workingDir);
       absUrl = importObj.findAbsoluteUrl(resMgr);
diff --git a/uimaj-core/src/test/java/org/apache/uima/resource/metadata/impl/MetaDataObject_implTest.java b/uimaj-core/src/test/java/org/apache/uima/resource/metadata/impl/MetaDataObject_implTest.java
index 484a10e..04cc122 100644
--- a/uimaj-core/src/test/java/org/apache/uima/resource/metadata/impl/MetaDataObject_implTest.java
+++ b/uimaj-core/src/test/java/org/apache/uima/resource/metadata/impl/MetaDataObject_implTest.java
@@ -29,9 +29,6 @@ import java.util.Set;
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
 
-import org.junit.Assert;
-import junit.framework.TestCase;
-
 import org.apache.uima.UIMAFramework;
 import org.apache.uima.internal.util.SerializationUtils;
 import org.apache.uima.resource.metadata.ConfigurationParameterSettings;
@@ -43,6 +40,9 @@ import org.apache.uima.util.XMLParser;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
+import org.junit.Assert;
+import junit.framework.TestCase;
+
 /**
  * Tests the MetaDataObject_impl class.
  * 
@@ -70,25 +70,25 @@ public class MetaDataObject_implTest extends TestCase {
     apple1 = new TestFruitObject();
     apple1.setAttributeValue("name", "Apple");
     apple1.setAttributeValue("color", "red");
-    apple1.setAttributeValue("avgWeightLbs", Float.valueOf(0.3F));
-    apple1.setAttributeValue("avgCostCents", Integer.valueOf(40));
-    apple1.setAttributeValue("citrus", Boolean.valueOf(false));
+    apple1.setAttributeValue("avgWeightLbs", 0.3F);
+    apple1.setAttributeValue("avgCostCents", 40);
+    apple1.setAttributeValue("citrus", Boolean.FALSE);
     apple1.setAttributeValue("commonUses", new String[] { "baking", "snack" });
 
     apple2 = new TestFruitObject();
     apple2.setAttributeValue("name", "Apple");
     apple2.setAttributeValue("color", "red");
-    apple2.setAttributeValue("avgWeightLbs", Float.valueOf(0.3F));
-    apple2.setAttributeValue("avgCostCents", Integer.valueOf(40));
-    apple2.setAttributeValue("citrus", Boolean.valueOf(false));
+    apple2.setAttributeValue("avgWeightLbs", 0.3F);
+    apple2.setAttributeValue("avgCostCents", 40);
+    apple2.setAttributeValue("citrus", Boolean.FALSE);
     apple2.setAttributeValue("commonUses", new String[] { "baking", "snack" });
 
     orange = new TestFruitObject();
     orange.setAttributeValue("name", "Orange");
     orange.setAttributeValue("color", "orange");
-    orange.setAttributeValue("avgWeightLbs", Float.valueOf(0.2F));
-    orange.setAttributeValue("avgCostCents", Integer.valueOf(50));
-    orange.setAttributeValue("citrus", Boolean.valueOf(true));
+    orange.setAttributeValue("avgWeightLbs", 0.2F);
+    orange.setAttributeValue("avgCostCents", 50);
+    orange.setAttributeValue("citrus", Boolean.TRUE);
     orange.setAttributeValue("commonUses", new String[] { "snack", "juice" });
 
     // create a fruit bag containing these three objects
@@ -119,9 +119,9 @@ public class MetaDataObject_implTest extends TestCase {
    */
   public void testGetAttributes() throws Exception {
     try {
-      HashSet<MetaDataAttr> apple1Attrs = new HashSet<MetaDataAttr>(Arrays.asList(apple1.getAttributes()));
-      HashSet<MetaDataAttr> orangeAttrs = new HashSet<MetaDataAttr>(Arrays.asList(orange.getAttributes()));
-      HashSet<MetaDataAttr> bagAttrs = new HashSet<MetaDataAttr>(Arrays.asList(fruitBag.getAttributes()));
+      HashSet<MetaDataAttr> apple1Attrs = new HashSet<>(Arrays.asList(apple1.getAttributes()));
+      HashSet<MetaDataAttr> orangeAttrs = new HashSet<>(Arrays.asList(orange.getAttributes()));
+      HashSet<MetaDataAttr> bagAttrs = new HashSet<>(Arrays.asList(fruitBag.getAttributes()));
       
       Set<MetaDataAttr> r = TestFruitObject.getMetaDataAttrSet();
       for (MetaDataAttr r1 : r) {