Author: schor
Date: Mon Nov  2 20:39:50 2015
New Revision: 1712149

URL: http://svn.apache.org/viewvc?rev=1712149&view=rev
Log:
[UIMA-4663] remove items related to heap initialization, change toString to 
work with subclasses

Modified:
    
uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/util/CasCreationUtils.java

Modified: 
uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/util/CasCreationUtils.java
URL: 
http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/util/CasCreationUtils.java?rev=1712149&r1=1712148&r2=1712149&view=diff
==============================================================================
--- 
uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/util/CasCreationUtils.java
 (original)
+++ 
uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/util/CasCreationUtils.java
 Mon Nov  2 20:39:50 2015
@@ -561,13 +561,6 @@ public class CasCreationUtils {
     } catch (InvalidXMLException e) {
       throw new ResourceInitializationException(e);
     }
-
-    // get initial heap size
-    String initialHeapSizeStr = null;
-    if (aPerformanceTuningSettings != null) {
-      initialHeapSizeStr = aPerformanceTuningSettings
-          .getProperty(UIMAFramework.CAS_INITIAL_HEAP_SIZE);
-    }
     
     // Check Jcas cache performance setting.  Defaults to true.
     boolean useJcasCache = true;
@@ -582,18 +575,11 @@ public class CasCreationUtils {
     // create CAS using either aTypeSystem or aTypeSystemDesc
     CASMgr casMgr;
     if (aTypeSystem != null) {
-      if (initialHeapSizeStr != null) {
-        casMgr = CASFactory.createCAS(Integer.parseInt(initialHeapSizeStr), 
aTypeSystem, useJcasCache);
-      } else {
-        casMgr = CASFactory.createCAS(aTypeSystem, useJcasCache);
-      }
+      casMgr = CASFactory.createCAS(aTypeSystem, useJcasCache);
     } else // no TypeSystem to reuse - create a new one
     {
-      if (initialHeapSizeStr != null) {
-        casMgr = CASFactory.createCAS(Integer.parseInt(initialHeapSizeStr), 
useJcasCache);
-      } else {
-        casMgr = CASFactory.createCAS(CASImpl.DEFAULT_INITIAL_HEAP_SIZE, 
useJcasCache);
-      }
+      casMgr = CASFactory.createCAS();
+ 
       // install type system
       setupTypeSystem(casMgr, aTypeSystemDesc);
       // Commit the type system
@@ -1784,7 +1770,7 @@ public class CasCreationUtils {
 
     @Override
     public String toString() {
-      return "MetaDataCacheKey [resourceSpecifier=" + resourceSpecifier + ", 
rmClassLoader="
+      return this.getClass().getSimpleName() + " [resourceSpecifier=" + 
resourceSpecifier + ", rmClassLoader="
           + rmClassLoader + ", rmDataPath=" + rmDataPath + "]";
     }
   }


Reply via email to