Author: cwiklik Date: Fri Jun 14 16:09:39 2013 New Revision: 1493137 URL: http://svn.apache.org/r1493137 Log: UIMA-2492 fixed out of bounds exception in code producing unique name for performance metrics
Modified: uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/PrimitiveAnalysisEngineController_impl.java Modified: uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/PrimitiveAnalysisEngineController_impl.java URL: http://svn.apache.org/viewvc/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/PrimitiveAnalysisEngineController_impl.java?rev=1493137&r1=1493136&r2=1493137&view=diff ============================================================================== --- uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/PrimitiveAnalysisEngineController_impl.java (original) +++ uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/PrimitiveAnalysisEngineController_impl.java Fri Jun 14 16:09:39 2013 @@ -501,7 +501,8 @@ public class PrimitiveAnalysisEngineCont // org.apache.uima:type=ee.jms.services,s=Top Level Aggregate TAE Uima EE Service,p0=Top Level Aggregate TAE Components,p1=SecondLevelAggregateCM Components,p2=ThirdLevelAggregateCM Components,name=Multiplier1 if ( aem.getUniqueMBeanName().indexOf("p0=") > -1 ) { // check id the parent aggregate has been scaled up by looking at the last char in its name. If it is a number strip it from the name - if ( Character.isDigit(uimaFullyQualifiedAEContext.charAt(uimaFullyQualifiedAEContext.length()-1) )) { + if ( Character.isDigit(uimaFullyQualifiedAEContext.charAt(uimaFullyQualifiedAEContext.length()-1) ) && + uimaFullyQualifiedAEContext.lastIndexOf(" ") > -1 ) { String indx = uimaFullyQualifiedAEContext.substring(uimaFullyQualifiedAEContext.lastIndexOf(" ")); if ( indx != null ) { int value = -1; @@ -961,7 +962,7 @@ public class PrimitiveAnalysisEngineCont after.getUniqueName(), after.getAnalysisTime()- before.getAnalysisTime(), after.getNumProcessed()); -// System.out.println("********************"+metrics.getUniqueName()); + //System.out.println("********************"+metrics.getUniqueName()); // System.out.println("********************"+metrics.getName()); performanceList.add(metrics); break;