private String createErrorMsg ( JspLineId jspLineId , int errorLineNr ) { StringBuffer compilerOutput = new StringBuffer ( ) ; if ( jspLineId . getSourceLineCount ( ) <= 1 ) { Object [ ] objArray = new Object [ ] { new Integer ( jspLineId . getStartSourceLineNum ( ) ) , jspLineId . getFilePath ( ) } ; if ( jspLineId . getFilePath ( ) . equals ( jspLineId . getParentFile ( ) ) ) { compilerOutput . append ( separatorString + JspCoreException . getMsg ( "jsp.error.single.line.number" , objArray ) ) ; // Defect 211450 } else { compilerOutput . append ( separatorString + JspCoreException . getMsg ( "jsp.error.single.line.number.included.file" , objArray ) ) ; // Defect 211450 } } else { // compute exact JSP line number int actualLineNum = jspLineId . getStartSourceLineNum ( ) + ( errorLineNr - jspLineId . getStartGeneratedLineNum ( ) ) ; if ( actualLineNum >= jspLineId . getStartSourceLineNum ( ) && actualLineNum <= ( jspLineId . getStartSourceLineNum ( ) + jspLineId . getSourceLineCount ( ) - 1 ) ) { Object [ ] objArray = new Object [ ] { new Integer ( actualLineNum ) , jspLineId . getFilePath ( ) } ; if ( jspLineId . getFilePath ( ) . equals ( jspLineId . getParentFile ( ) ) ) { compilerOutput . append ( separatorString + JspCoreException . getMsg ( "jsp.error.single.line.number" , objArray ) ) ; // Defect 211450 } else { compilerOutput . append ( separatorString + JspCoreException . getMsg ( "jsp.error.single.line.number.included.file" , objArray ) ) ; // Defect 211450 } } else { Object [ ] objArray = new Object [ ] { new Integer ( jspLineId . getStartSourceLineNum ( ) ) , new Integer ( ( jspLineId . getStartSourceLineNum ( ) ) + jspLineId . getSourceLineCount ( ) - 1 ) , jspLineId . getFilePath ( ) } ; if ( jspLineId . getFilePath ( ) . equals ( jspLineId . getParentFile ( ) ) ) { compilerOutput . append ( separatorString + // Defect 211450 JspCoreException . getMsg ( "jsp.error.multiple.line.number" , objArray ) ) ; } else { compilerOutput . append ( separatorString + // Defect 211450 JspCoreException . getMsg ( "jsp.error.multiple.line.number.included.file" , objArray ) ) ; } } } compilerOutput . append ( separatorString + JspCoreException . getMsg ( "jsp.error.corresponding.servlet" , new Object [ ] { jspLineId . getParentFile ( ) } ) ) ; // Defect 211450 //152470 starts if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINER ) ) { logger . logp ( Level . FINER , CLASS_NAME , "createErrorMsg" , "The value of the JSP attribute jdkSourceLevel is [" + jdkSourceLevel + "]" ) ; } //152470 ends return compilerOutput . toString ( ) ; }
name of parent file