Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
package org.nnsoft.guice.rocoto.variables;

import static java.text.MessageFormat.format;
import static java.lang.String.format;

import java.util.ArrayList;
import java.util.List;
Expand Down Expand Up @@ -77,7 +77,7 @@ public Appender parse( String pattern ) throws IllegalArgumentException
if ( endVariable < 0 )
{
throw new IllegalArgumentException(format(
"Syntax error in property value ''{0}'', missing close bracket ''{1}'' for variable beginning at col {2}: ''{3}''", pattern,
"Syntax error in property value '%s', missing close bracket '%s' for variable beginning at col %s: '%s'", pattern,
VAR_CLOSE, pos - VAR_START_LEN, pattern.substring(pos - VAR_START_LEN)));
}

Expand All @@ -94,7 +94,7 @@ public Appender parse( String pattern ) throws IllegalArgumentException
if ( endVariable < 0 )
{
throw new IllegalArgumentException(format(
"Syntax error in property value ''{0}'', missing close bracket ''{1}'' for variable beginning at col {2}: ''{3}''",
"Syntax error in property value '%s', missing close bracket '%s' for variable beginning at col %s: '%s'",
pattern, VAR_CLOSE, nextVariable, pattern.substring(nextVariable, lastEndVariable)));
}
nextVariable = pattern.indexOf(VAR_START, nextVariable + VAR_START_LEN);
Expand Down Expand Up @@ -145,7 +145,7 @@ public Appender parse( String pattern ) throws IllegalArgumentException
if ( nextEndKeyVariable < 0 )
{
throw new IllegalArgumentException(
format("Syntax error in property value ''{0}'', missing close bracket ''{1}'' for variable beginning at col {2}: ''{3}''",
format("Syntax error in property value '%s', missing close bracket '%s' for variable beginning at col %s: '%s'",
pattern, VAR_CLOSE, nextStartKeyVariable, key.substring(nextStartKeyVariable)));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
package org.nnsoft.guice.rocoto.variables;

import static java.text.MessageFormat.format;
import static java.lang.String.format;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
Expand Down Expand Up @@ -476,7 +476,7 @@ private void verifySyntaxError( String value )
try
{
variablesMap.put("mustFail", value);
fail(format("Expected an IllegalArgumentException for syntaxically incorrect variable value ''{0}''.", value));
fail(format("Expected an IllegalArgumentException for syntaxically incorrect variable value '%s'.", value));
} catch (IllegalArgumentException expected)
{
// ok
Expand Down