From eddf52cff119bffe6d58604df92997ec4315a847 Mon Sep 17 00:00:00 2001 From: Matthew Hayes Date: Fri, 27 Jan 2017 17:41:41 -0800 Subject: [PATCH] Fix DuplicateFormatFlagsException when max-iter-reached exceeded (#204) The warning message was formatted, and then this string was used as a format for warnf. This fails for certain sentences. --- src/duckling/engine.clj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/duckling/engine.clj b/src/duckling/engine.clj index 37040089..a976d000 100644 --- a/src/duckling/engine.clj +++ b/src/duckling/engine.clj @@ -204,9 +204,9 @@ (if (or max-iter-reached? max-stash-reached? finished?) (do (when max-iter-reached? - (warnf (format "@pass-all reached maximum iterations for sentence '%s'" sentence))) + (warnf "@pass-all reached maximum iterations for sentence '%s'" sentence)) (when max-stash-reached? - (warnf (format "@pass-all reached maximum stash size for sentence '%s'" sentence))) + (warnf "@pass-all reached maximum stash size for sentence '%s'" sentence)) stash) (recur (pass-once stash rules sentence) (count stash) (dec remaining-iter))))))