From 7f2b7435a966bf4d5448767c30afb4c5f4e60c78 Mon Sep 17 00:00:00 2001 From: Robert von Burg Date: Fri, 31 Jan 2014 18:58:47 +0100 Subject: [PATCH] [Minor] code cleanup --- src/main/java/ch/eitchnet/utils/dbc/DBC.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/ch/eitchnet/utils/dbc/DBC.java b/src/main/java/ch/eitchnet/utils/dbc/DBC.java index 9a84ec46c..662c2fe0f 100644 --- a/src/main/java/ch/eitchnet/utils/dbc/DBC.java +++ b/src/main/java/ch/eitchnet/utils/dbc/DBC.java @@ -55,7 +55,7 @@ public enum DBC { @Override public void assertNotExists(String msg, File file) { if (file.exists()) { - String ex = "Illegal situation as file (" + file + ") exists: {0}"; //$NON-NLS-1$ + String ex = MessageFormat.format("Illegal situation as file ({0}) exists: {0}", file); //$NON-NLS-1$ ex = MessageFormat.format(ex, msg); throw new DbcException(ex); } @@ -64,7 +64,7 @@ public enum DBC { @Override public void assertExists(String msg, File file) { if (!file.exists()) { - String ex = "Illegal situation as file (" + file + ") does not exist: {0}"; //$NON-NLS-1$ + String ex = MessageFormat.format("Illegal situation as file ({0}) does not exist: {0}", file); //$NON-NLS-1$ ex = MessageFormat.format(ex, msg); throw new DbcException(ex); }