You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by sc...@apache.org on 2015/11/01 14:14:38 UTC
svn commit: r1711753 -
/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/FSTypeConstraintImpl.java
Author: schor
Date: Sun Nov 1 13:14:37 2015
New Revision: 1711753
URL: http://svn.apache.org/viewvc?rev=1711753&view=rev
Log:
[UIMA-4673][UIMA-4663]
Modified:
uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/FSTypeConstraintImpl.java
Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/FSTypeConstraintImpl.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/FSTypeConstraintImpl.java?rev=1711753&r1=1711752&r2=1711753&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/FSTypeConstraintImpl.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/FSTypeConstraintImpl.java Sun Nov 1 13:14:37 2015
@@ -43,9 +43,9 @@ class FSTypeConstraintImpl implements FS
private transient TypeSystem ts;
public boolean match(FeatureStructure fs) {
- compile(((FeatureStructureImpl) fs).getCAS().getTypeSystem());
- final FeatureStructureImpl fsi = (FeatureStructureImpl) fs;
- final int typeCode = fsi.getCASImpl().getHeapValue(fsi.getAddress());
+ final FeatureStructureImplC fsi = (FeatureStructureImplC) fs;
+ compile(fsi.getCAS().getTypeSystem());
+ final int typeCode = fsi._getTypeCode();
TypeSystemImpl tsi = (TypeSystemImpl) this.ts;
for (int i = 0; i < typeSet.size(); i++) {
if (tsi.subsumes(typeSet.get(i), typeCode)) {
@@ -65,9 +65,7 @@ class FSTypeConstraintImpl implements FS
for (String typeName : nameSet) {
typeCode = tsi.ll_getCodeForTypeName(typeName);
if (typeCode < tsi.getSmallestType()) {
- CASRuntimeException e = new CASRuntimeException(
- CASRuntimeException.UNKNOWN_CONSTRAINT_TYPE, new String[] { typeName });
- throw e;
+ throw new CASRuntimeException(CASRuntimeException.UNKNOWN_CONSTRAINT_TYPE, typeName);
}
typeSet.add(typeCode);
}