From 0dbc496f0b8e6f00e7da2caf48dc5d7f4c12fc82 Mon Sep 17 00:00:00 2001 From: Robin Kupper Date: Wed, 27 Jul 2011 01:35:47 +0200 Subject: [PATCH] Fixed timespec parsing to work with single numbers --- src/de/diddiz/util/Utils.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/de/diddiz/util/Utils.java b/src/de/diddiz/util/Utils.java index a28650a..725e569 100644 --- a/src/de/diddiz/util/Utils.java +++ b/src/de/diddiz/util/Utils.java @@ -75,6 +75,8 @@ public class Utils public static int parseTimeSpec(String[] spec) { if (spec == null || spec.length < 1 || spec.length > 2) return -1; + if (spec.length == 1 && isInt(spec[0])) + return Integer.valueOf(spec[0]); if (!spec[0].contains(":") && !spec[0].contains(".")) if (spec.length == 2) { if (!isInt(spec[0]))