You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by ea...@apache.org on 2007/07/29 00:33:13 UTC
svn commit: r560636 - in /incubator/uima/uimaj/trunk/uimaj-core/src/main:
java/org/apache/uima/cas/CASRuntimeException.java
java/org/apache/uima/cas/impl/FeatureStructureImpl.java
resources/org/apache/uima/UIMAException_Messages.properties
Author: eae
Date: Sat Jul 28 15:33:10 2007
New Revision: 560636
URL: http://svn.apache.org/viewvc?view=rev&rev=560636
Log:
UIMA-185 Handle SofaFS clone exception as per.
Modified:
incubator/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/CASRuntimeException.java
incubator/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/FeatureStructureImpl.java
incubator/uima/uimaj/trunk/uimaj-core/src/main/resources/org/apache/uima/UIMAException_Messages.properties
Modified: incubator/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/CASRuntimeException.java
URL: http://svn.apache.org/viewvc/incubator/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/CASRuntimeException.java?view=diff&rev=560636&r1=560635&r2=560636
==============================================================================
--- incubator/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/CASRuntimeException.java (original)
+++ incubator/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/CASRuntimeException.java Sat Jul 28 15:33:10 2007
@@ -172,7 +172,14 @@
*
*/
public static final String DISALLOW_CREATE_ANNOTATION_IN_BASE_CAS = "DISALLOW_CREATE_ANNOTATION_IN_BASE_CAS";
-
+
+ /**
+ * SofaFS may not be cloned.
+ *
+ */
+ public static final String CANNOT_CLONE_SOFA = "CANNOT_CLONE_SOFA";
+
+
public CASRuntimeException() {
super();
}
Modified: incubator/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/FeatureStructureImpl.java
URL: http://svn.apache.org/viewvc/incubator/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/FeatureStructureImpl.java?view=diff&rev=560636&r1=560635&r2=560636
==============================================================================
--- incubator/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/FeatureStructureImpl.java (original)
+++ incubator/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/FeatureStructureImpl.java Sat Jul 28 15:33:10 2007
@@ -642,10 +642,7 @@
public Object clone() throws CASRuntimeException {
if (getType().getName().equals(CAS.TYPE_NAME_SOFA)) {
- throw new CASRuntimeException(CASRuntimeException.INAPPROP_TYPE);
- // WTF? Internationlization?
- // TODO: fix this exception
- // e.addArgument("SofaFS may not be cloned");
+ throw new CASRuntimeException(CASRuntimeException.CANNOT_CLONE_SOFA);
}
CASImpl casImpl = this.getCASImpl();
Modified: incubator/uima/uimaj/trunk/uimaj-core/src/main/resources/org/apache/uima/UIMAException_Messages.properties
URL: http://svn.apache.org/viewvc/incubator/uima/uimaj/trunk/uimaj-core/src/main/resources/org/apache/uima/UIMAException_Messages.properties?view=diff&rev=560636&r1=560635&r2=560636
==============================================================================
--- incubator/uima/uimaj/trunk/uimaj-core/src/main/resources/org/apache/uima/UIMAException_Messages.properties (original)
+++ incubator/uima/uimaj/trunk/uimaj-core/src/main/resources/org/apache/uima/UIMAException_Messages.properties Sat Jul 28 15:33:10 2007
@@ -530,3 +530,4 @@
ANNOTATION_IN_WRONG_INDEX = Error - the Annotation "{0}" is over view "{1}" and cannot be added to indexes associated with the different view "{2}".
TYPE_NOT_IN_INDEX = Error accessing index "{0}" for type "{1}". Index "{0}" is over type "{2}", which is not a supertype of "{1}".
DISALLOW_CREATE_ANNOTATION_IN_BASE_CAS = The type "{0}", a subtype of AnnotationBase, can''t be created in the Base CAS.
+CANNOT_CLONE_SOFA = SofaFS may not be cloned.