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 2011/08/15 00:21:49 UTC
svn commit: r1157679 -
/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/impl/Util.java
Author: schor
Date: Sun Aug 14 22:21:48 2011
New Revision: 1157679
URL: http://svn.apache.org/viewvc?rev=1157679&view=rev
Log:
[UIMA-2211] set the component info into the CAS which has the sofa mappings, before calling the getView to get the initial view, which depends on these mappings.
Modified:
uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/impl/Util.java
Modified: uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/impl/Util.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/impl/Util.java?rev=1157679&r1=1157678&r2=1157679&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/impl/Util.java (original)
+++ uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/impl/Util.java Sun Aug 14 22:21:48 2011
@@ -36,14 +36,16 @@ public class Util {
// if this is a sofa-aware component, give it the Base CAS
// if it is a sofa-unaware component, give it whatever view maps to the _InitialView
CASImpl ci;
+ // need to set the componentInfo for the getView to find the sofa mappings
+ // Do this *before* the getView call below
+ // note: this is in a shared view part of the CAS
+ cas.setCurrentComponentInfo(componentInfo);
if (sofaAware) {
ci = ((CASImpl) cas).getBaseCAS();
} else {
ci = (CASImpl) cas.getView(CAS.NAME_DEFAULT_SOFA);
}
- // set the component info, so the CAS knows the proper sofa mappings
- ci.setCurrentComponentInfo(componentInfo);
return ci;
}