From 0ce267761578a760a6cfc9bbac4e0d4eac0db29b Mon Sep 17 00:00:00 2001 From: Andreas Schildbach Date: Sun, 8 Feb 2015 19:30:32 +0100 Subject: [PATCH] Product.fromCode() exception message cosmetics. --- enabler/src/de/schildbach/pte/dto/Product.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/enabler/src/de/schildbach/pte/dto/Product.java b/enabler/src/de/schildbach/pte/dto/Product.java index 08041b0e..625db2ac 100644 --- a/enabler/src/de/schildbach/pte/dto/Product.java +++ b/enabler/src/de/schildbach/pte/dto/Product.java @@ -37,7 +37,7 @@ public enum Product this.code = code; } - public static Product fromCode(char code) + public static Product fromCode(final char code) { if (code == HIGH_SPEED_TRAIN.code) return HIGH_SPEED_TRAIN; @@ -58,6 +58,6 @@ public enum Product else if (code == ON_DEMAND.code) return ON_DEMAND; else - throw new IllegalArgumentException(Character.toString(code)); + throw new IllegalArgumentException("unknown code: '" + code + "'"); } }