|
From: <sbe...@us...> - 2012-05-16 02:26:35
|
Revision: 156
http://andspidclient.svn.sourceforge.net/andspidclient/?rev=156&view=rev
Author: sbearcsiro
Date: 2012-05-16 02:26:29 +0000 (Wed, 16 May 2012)
Log Message:
-----------
- Fix FindBugs
Modified Paths:
--------------
trunk/src/main/java/au/csiro/doiclient/utils/ConverterUtils.java
Modified: trunk/src/main/java/au/csiro/doiclient/utils/ConverterUtils.java
===================================================================
--- trunk/src/main/java/au/csiro/doiclient/utils/ConverterUtils.java 2012-05-16 02:25:34 UTC (rev 155)
+++ trunk/src/main/java/au/csiro/doiclient/utils/ConverterUtils.java 2012-05-16 02:26:29 UTC (rev 156)
@@ -1,5 +1,5 @@
/**
- * Copyright 2012, CSIRO Australia.
+ * Copyright 2010, CSIRO Australia.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,6 +21,7 @@
import java.io.StringWriter;
import java.util.Hashtable;
import java.util.List;
+import java.util.Map;
import org.jdom.Document;
import org.jdom.Element;
@@ -156,6 +157,7 @@
*/
private static void detachExistingNodes(XPath xPath, Document document) throws JDOMException
{
+ @SuppressWarnings("unchecked")
List<Element> selectNodes = xPath.selectNodes(document);
for (int counter = 1; counter < selectNodes.size(); counter++)
{
@@ -425,9 +427,9 @@
{
Namespace namespaces[] = new Namespace[namespaceMap.size()];
int i = 0;
- for (String prefix : namespaceMap.keySet())
+ for (Map.Entry<String, String> prefixEntry : namespaceMap.entrySet())
{
- Namespace ns = Namespace.getNamespace(prefix, namespaceMap.get(prefix));
+ Namespace ns = Namespace.getNamespace(prefixEntry.getKey(), prefixEntry.getValue());
namespaces[i++] = ns;
}
return namespaces;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|