diff --git a/src/main/org/apache/tools/ant/util/regexp/RegexpFactory.java b/src/main/org/apache/tools/ant/util/regexp/RegexpFactory.java index 1545ff06b..c924c552d 100644 --- a/src/main/org/apache/tools/ant/util/regexp/RegexpFactory.java +++ b/src/main/org/apache/tools/ant/util/regexp/RegexpFactory.java @@ -87,7 +87,7 @@ public class RegexpFactory extends RegexpMatcherFactory if (p == null) { systemDefault = System.getProperty("ant.regexp.regexpimpl"); } else { - systemDefault = (String) p.getProperties().get("ant.regexp.regexpimpl"); + systemDefault = p.getProperty("ant.regexp.regexpimpl"); } if (systemDefault != null) { diff --git a/src/main/org/apache/tools/ant/util/regexp/RegexpMatcherFactory.java b/src/main/org/apache/tools/ant/util/regexp/RegexpMatcherFactory.java index cbbfa3fac..6ef638c90 100644 --- a/src/main/org/apache/tools/ant/util/regexp/RegexpMatcherFactory.java +++ b/src/main/org/apache/tools/ant/util/regexp/RegexpMatcherFactory.java @@ -90,7 +90,7 @@ public class RegexpMatcherFactory { if (p == null) { systemDefault = System.getProperty("ant.regexp.regexpimpl"); } else { - systemDefault = (String) p.getProperties().get("ant.regexp.regexpimpl"); + systemDefault = p.getProperty("ant.regexp.regexpimpl"); } if (systemDefault != null) {