Author: maartenc Date: Fri Dec 28 11:15:35 2007 New Revision: 607313 URL: http://svn.apache.org/viewvc?rev=607313&view=rev Log: Removed the usage of the Boolean.parseBoolean(String) method which doesn't exist in JDK 1.4
Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/report/XmlReportParser.java Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/report/XmlReportParser.java URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/report/XmlReportParser.java?rev=607313&r1=607312&r2=607313&view=diff ============================================================================== --- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/report/XmlReportParser.java (original) +++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/report/XmlReportParser.java Fri Dec 28 11:15:35 2007 @@ -154,7 +154,7 @@ madr.setDownloadDetails(attributes.getValue("details")); madr.setSize(Long.parseLong(attributes.getValue("size"))); madr.setDownloadTimeMillis(Long.parseLong(attributes.getValue("time"))); - madr.setSearched(Boolean.parseBoolean(attributes.getValue("searched"))); + madr.setSearched(parseBoolean(attributes.getValue("searched"))); if (attributes.getValue("location") != null) { madr.setLocalFile(new File(attributes.getValue("location"))); } @@ -169,8 +169,7 @@ } else { madr.setArtifactOrigin( new ArtifactOrigin( - Boolean.parseBoolean( - attributes.getValue("origin-is-local")), + parseBoolean(attributes.getValue("origin-is-local")), attributes.getValue("origin-location"))); } } @@ -208,7 +207,7 @@ } else { aReport.setArtifactOrigin( new ArtifactOrigin( - Boolean.parseBoolean(attributes.getValue("is-local")), + parseBoolean(attributes.getValue("is-local")), attributes.getValue("location"))); } } else if ("info".equals(qName)) { @@ -254,6 +253,10 @@ .toArray()[revisionsMap.size() - 1]).intValue(); } }); + } + + private static boolean parseBoolean(String str) { + return (str != null) && str.equalsIgnoreCase("true"); } public List getArtifacts() {