You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opennlp.apache.org by jk...@apache.org on 2014/03/26 03:12:14 UTC

svn commit: r1581627 - /opennlp/trunk/opennlp-uima/src/main/java/opennlp/uima/util/AnnotatorUtil.java

Author: jkosin
Date: Wed Mar 26 02:12:13 2014
New Revision: 1581627

URL: http://svn.apache.org/r1581627
Log:
OPENNLP-669 Fixed @throws for the correct exception thrown.  This file needs more review... some seem like they are throwing a different exception.

Modified:
    opennlp/trunk/opennlp-uima/src/main/java/opennlp/uima/util/AnnotatorUtil.java

Modified: opennlp/trunk/opennlp-uima/src/main/java/opennlp/uima/util/AnnotatorUtil.java
URL: http://svn.apache.org/viewvc/opennlp/trunk/opennlp-uima/src/main/java/opennlp/uima/util/AnnotatorUtil.java?rev=1581627&r1=1581626&r2=1581627&view=diff
==============================================================================
--- opennlp/trunk/opennlp-uima/src/main/java/opennlp/uima/util/AnnotatorUtil.java (original)
+++ opennlp/trunk/opennlp-uima/src/main/java/opennlp/uima/util/AnnotatorUtil.java Wed Mar 26 02:12:13 2014
@@ -72,7 +72,7 @@ public final class AnnotatorUtil {
    * @param feature
    * @param expectedType
    * 
-   * @throws AnnotatorConfigurationException - if type does not match
+   * @throws AnalysisEngineProcessException - if type does not match
    */
   private static void checkFeatureType(Feature feature, String expectedType) 
       throws AnalysisEngineProcessException {
@@ -107,7 +107,7 @@ public final class AnnotatorUtil {
    * @param rangeType the expected range type
    * @return the requested parameter
    * 
-   * @throws AnnotatorConfigurationException
+   * @throws AnalysisEngineProcessException
    */
   public static Feature getRequiredFeature(Type type, String featureName,
       String rangeType) throws AnalysisEngineProcessException {
@@ -170,8 +170,7 @@ public final class AnnotatorUtil {
    * @param parameter
    * @return the requested parameter
    * 
-   * @throws AnnotatorConfigurationException
-   * @throws AnnotatorInitializationException 
+   * @throws ResourceInitializationException 
    */
   public static String getRequiredStringParameter(UimaContext context,
       String parameter) 
@@ -191,8 +190,7 @@ public final class AnnotatorUtil {
    * @param parameter
    * @return the requested parameter
    * 
-   * @throws AnnotatorConfigurationException
-   * @throws AnnotatorInitializationException 
+   * @throws ResourceInitializationException 
    */
   public static Integer getRequiredIntegerParameter(UimaContext context,
       String parameter) 
@@ -212,8 +210,7 @@ public final class AnnotatorUtil {
    * @param parameter
    * @return the requested parameter
    * 
-   * @throws AnnotatorConfigurationException
-   * @throws AnnotatorInitializationException 
+   * @throws ResourceInitializationException 
    */
   public static Float getRequiredFloatParameter(UimaContext context,
       String parameter) 
@@ -233,8 +230,7 @@ public final class AnnotatorUtil {
    * @param parameter
    * @return the requested parameter
    * 
-   * @throws AnnotatorConfigurationException
-   * @throws AnnotatorInitializationException 
+   * @throws ResourceInitializationException 
    */
   public static Boolean getRequiredBooleanParameter(UimaContext context,
       String parameter) 
@@ -310,8 +306,7 @@ public final class AnnotatorUtil {
    * @param parameter
    * @return the parameter or null if not set
    * 
-   * @throws AnnotatorConfigurationException
-   * @throws AnnotatorInitializationException 
+   * @throws ResourceInitializationException 
    */
   public static String getOptionalStringParameter(UimaContext context,
       String parameter) 
@@ -355,8 +350,7 @@ public final class AnnotatorUtil {
     * @param parameter
     * @return the parameter or null if not set
     * 
-    * @throws AnnotatorConfigurationException
-    * @throws AnnotatorInitializationException
+    * @throws ResourceInitializationException
     */
   public static Integer getOptionalIntegerParameter(UimaContext context,
       String parameter) 
@@ -384,8 +378,7 @@ public final class AnnotatorUtil {
    * @param parameter
    * @return the parameter or null if not set
    * 
-   * @throws AnnotatorConfigurationException
-   * @throws AnnotatorInitializationException 
+   * @throws ResourceInitializationException 
    */
   public static Float getOptionalFloatParameter(UimaContext context,
       String parameter) 
@@ -414,8 +407,7 @@ public final class AnnotatorUtil {
    * @param parameter
    * @return the parameter or null if not set
    * 
-   * @throws AnnotatorConfigurationException
-   * @throws AnnotatorInitializationException 
+   * @throws ResourceInitializationException 
    */
   public static Boolean getOptionalBooleanParameter(UimaContext context,
       String parameter) 
@@ -459,7 +451,7 @@ public final class AnnotatorUtil {
    * @param name
    * @return the stream
    * 
-   * @throws AnnotatorConfigurationException
+   * @throws ResourceInitializationException
    */
   public static InputStream getResourceAsStream(UimaContext context, String name)
       throws ResourceInitializationException {