내가 쓴 나에게 다음과 같은 출력 준 다음 코드 :스크립트는 몇 가지 더있는 경우가없는 코드를 실행하지 않습니다 - 절 또는 유사한
if(bodytoUpper.contains(currentfield)){
int index = bodytoUpper.lastIndexOf(currentfield + "\n")//finds the last appearance of the field value
log.debug("Index try if Abfrage: ")
log.debug(index)
int nextindex = bodytoUpper.lastIndexOf(nextfield, index)//finds the index of the next field
log.debug("nextindex: ")
log.debug(nextindex)
value = currentbody.substring(index+currentfield.length(), nextindex);//sets the value to everything between the two indexes
log.debug("Rückgabewert: ")
log.debug(value)
}
그 부분의 출력은 다음 로그입니다 :
를2017-12-22 11:24:52,853 DEBUG [acme.CreateSubtask]: Index try if Abfrage:
2017-12-22 11:24:52,853 DEBUG [acme.CreateSubtask]: 18
일부 로그가 누락되어 있으며 코드도 실행되지 않지만 오류 메시지가 출력되지 않는 문제가 있습니다.
'nextfield'의 값은 무엇입니까? 로그에 예외가 있습니까? (/ 예외를 삼키고 있습니까?) –
Nextfield는이 경우 문자열 "STATUS"입니다. 나는 그것이 정말로 그것이라고 테스트했다. 로그에 예외가 없습니다. nextfield를 "STATUS"로 바꾸는 것도 도움이되지 못했습니다. –