From 4d2347c7c73dc5a0e7e5f8f90d68b458376e55be Mon Sep 17 00:00:00 2001 From: AndreBott Date: Wed, 25 Feb 2015 16:40:51 +0100 Subject: [PATCH] Enable RangeCleanV1 Module to handle doubles removed the restriction that the min/max values must be of type long --- .../controllers/modules2/RangeCleanProcessor.java | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/webapp/app/controllers/modules2/RangeCleanProcessor.java b/webapp/app/controllers/modules2/RangeCleanProcessor.java index ae5d28dc..152bda66 100644 --- a/webapp/app/controllers/modules2/RangeCleanProcessor.java +++ b/webapp/app/controllers/modules2/RangeCleanProcessor.java @@ -56,10 +56,8 @@ public void initModule(Map options, long start, long end) { super.initModule(options, start, end); String minStr = options.get(MIN_KEY); String maxStr = options.get(MAX_KEY); - long min = parseLong(minStr, "error"); - long max = parseLong(maxStr, "error"); - this.min = new BigDecimal(min); - this.max = new BigDecimal(max); + this.min = parseBigDecimal(minStr, "error"); + this.max = parseBigDecimal(maxStr, "error"); } @Override @@ -67,11 +65,9 @@ public String init(String pathStr, ProcessorSetup nextInChain, VisitorInfo visit String newPath = super.init(pathStr, nextInChain, visitor, options); String minStr = params.getParams().get(0); String maxStr = params.getParams().get(1); - String msg = "module url /rangeclean/{min}/{max} must be passed a long for min and max and was not passed that"; - long min = parseLong(minStr, msg); - long max = parseLong(maxStr, msg); - this.min = new BigDecimal(min); - this.max = new BigDecimal(max); + String msg = "module url /rangeclean/{min}/{max} must be parsable as a BigDecimal for min and max and was not in the proper format"; + this.min = parseBigDecimal(minStr, msg); + this.max = parseBigDecimal(maxStr, msg); return newPath; }