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 2020/02/03 07:44:59 UTC

[uima-uimafit] branch origin/feature/UIMA-6186-Factory-methods-for-resource-instances created (now 6e65312)

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

rec pushed a change to branch origin/feature/UIMA-6186-Factory-methods-for-resource-instances
in repository https://gitbox.apache.org/repos/asf/uima-uimafit.git.


      at 6e65312  [UIMA-6186] Factory methods for resource instances

This branch includes the following new commits:

     new 6e65312  [UIMA-6186] Factory methods for resource instances

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-uimafit] 01/01: [UIMA-6186] Factory methods for resource instances

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

rec pushed a commit to branch origin/feature/UIMA-6186-Factory-methods-for-resource-instances
in repository https://gitbox.apache.org/repos/asf/uima-uimafit.git

commit 6e65312005ec4ee07629ecb2da471c5f4cba4235
Author: Richard Eckart de Castilho <re...@apache.org>
AuthorDate: Mon Feb 3 08:44:47 2020 +0100

    [UIMA-6186] Factory methods for resource instances
    
    - Adjusted name from createExternalResource to createResource since the latter would be the preferred name for uimaFIT v3.
---
 .../java/org/apache/uima/fit/factory/ExternalResourceFactory.java   | 6 +++---
 .../org/apache/uima/fit/factory/ResourceManagerFactoryTest.java     | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/uimafit-core/src/main/java/org/apache/uima/fit/factory/ExternalResourceFactory.java b/uimafit-core/src/main/java/org/apache/uima/fit/factory/ExternalResourceFactory.java
index 46abee8..ad4745e 100644
--- a/uimafit-core/src/main/java/org/apache/uima/fit/factory/ExternalResourceFactory.java
+++ b/uimafit-core/src/main/java/org/apache/uima/fit/factory/ExternalResourceFactory.java
@@ -1273,9 +1273,9 @@ public final class ExternalResourceFactory {
    * @throws ResourceInitializationException
    *           if there was a problem instantiating the resource.
    */
-  public static <R> R createExternalResource(Class<? extends Resource> resourceClass,
+  public static <R> R createResource(Class<? extends Resource> resourceClass,
           Object... params) throws ResourceInitializationException {
-    return createExternalResource(resourceClass, null, params);
+    return createResource(resourceClass, null, params);
   }
 
   /**
@@ -1295,7 +1295,7 @@ public final class ExternalResourceFactory {
    *           if there was a problem instantiating the resource.
    */
   @SuppressWarnings("unchecked")
-  public static <R> R createExternalResource(Class<? extends Resource> resourceClass,
+  public static <R> R createResource(Class<? extends Resource> resourceClass,
           ResourceManager resMgr, Object... params) throws ResourceInitializationException {
     ExternalResourceDescription res = createExternalResourceDescription(resourceClass, params);
     return (R) produceResource(resourceClass, res.getResourceSpecifier(), resMgr, emptyMap());
diff --git a/uimafit-core/src/test/java/org/apache/uima/fit/factory/ResourceManagerFactoryTest.java b/uimafit-core/src/test/java/org/apache/uima/fit/factory/ResourceManagerFactoryTest.java
index efd65a6..e489301 100644
--- a/uimafit-core/src/test/java/org/apache/uima/fit/factory/ResourceManagerFactoryTest.java
+++ b/uimafit-core/src/test/java/org/apache/uima/fit/factory/ResourceManagerFactoryTest.java
@@ -18,7 +18,7 @@
  */
 package org.apache.uima.fit.factory;
 
-import static org.apache.uima.fit.factory.ExternalResourceFactory.createExternalResource;
+import static org.apache.uima.fit.factory.ExternalResourceFactory.createResource;
 import static org.assertj.core.api.Assertions.assertThat;
 
 import org.apache.uima.fit.component.Resource_ImplBase;