From be164675feda702a738a9b5fe49c9b5fc17ac018 Mon Sep 17 00:00:00 2001 From: "Gary D. Gregory" Date: Sat, 30 Jul 2005 21:53:49 +0000 Subject: [PATCH] Format tweak in a while statement to attempt to get Clover to show better code coverage. git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@226584 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/commons/lang/text/VariableFormatter.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/java/org/apache/commons/lang/text/VariableFormatter.java b/src/java/org/apache/commons/lang/text/VariableFormatter.java index 9271ac7fd..4bf99e9bb 100644 --- a/src/java/org/apache/commons/lang/text/VariableFormatter.java +++ b/src/java/org/apache/commons/lang/text/VariableFormatter.java @@ -343,7 +343,9 @@ public class VariableFormatter { Object objResult = null; int objLen = 0; - while (((begin = base.indexOf(getVariablePrefix(), prec + getVariableSuffix().length())) > -1) + while (((begin = base.indexOf( + getVariablePrefix(), + prec + getVariableSuffix().length())) > -1) && ((end = findEndToken(base, begin)) > -1)) { int escBegin = escaped(base, begin); if (escBegin >= 0) {