Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Gvozdev2011-03-11 18:40:02 -0500
committerAndrew Gvozdev2011-03-11 18:40:02 -0500
commit283a383c05789dff28464c6622381119729a51f9 (patch)
tree57775f9d723d9e9c6196316ca696bb1c7fdb78ee
parent3cebf36b79b6fe20fc31a6be4b967a66f02ed27d (diff)
downloadorg.eclipse.cdt-283a383c05789dff28464c6622381119729a51f9.tar.gz
org.eclipse.cdt-283a383c05789dff28464c6622381119729a51f9.tar.xz
org.eclipse.cdt-283a383c05789dff28464c6622381119729a51f9.zip
bug 319512: Missing type arguments compilation warnings
-rw-r--r--build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder/gnu/templates/SimpleMakefileGenerator.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder/gnu/templates/SimpleMakefileGenerator.java b/build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder/gnu/templates/SimpleMakefileGenerator.java
index 20f467190f..44e6a534a9 100644
--- a/build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder/gnu/templates/SimpleMakefileGenerator.java
+++ b/build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder/gnu/templates/SimpleMakefileGenerator.java
@@ -16,7 +16,6 @@ import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.HashMap;
-import java.util.Iterator;
import java.util.Map;
import org.eclipse.cdt.core.templateengine.TemplateCore;
@@ -76,7 +75,7 @@ public class SimpleMakefileGenerator extends ProcessRunner {
throw new ProcessFailureException(getProcessMessage(processId, IStatus.ERROR, Messages.getString("AddFile.2") + MAKEFILE)); //$NON-NLS-1$
}
- Map macros = new HashMap(template.getValueStore());
+ Map<String, String> macros = new HashMap<String, String>(template.getValueStore());
macros.put("exe", Platform.getOS().equals(Platform.OS_WIN32) ? ".exe" : ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
fileContents = replaceMacros(fileContents, macros);
@@ -98,10 +97,9 @@ public class SimpleMakefileGenerator extends ProcessRunner {
private static final String START = "{{"; //$NON-NLS-1$
private static final String END = "}}"; //$NON-NLS-1$
- private String replaceMacros(String fileContents, Map valueStore) {
+ private String replaceMacros(String fileContents, Map<String, String> valueStore) {
StringBuffer buffer = new StringBuffer(fileContents);
- for (Iterator i = valueStore.keySet().iterator(); i.hasNext();) {
- String key = (String)i.next();
+ for (String key : valueStore.keySet()) {
String pattern = START + key +END;
if (fileContents.indexOf(pattern)==-1)
// Not used
@@ -111,7 +109,7 @@ public class SimpleMakefileGenerator extends ProcessRunner {
int len = pattern.length();
int pos = 0;
while ((pos = buffer.indexOf(pattern, pos)) >= 0) {
- buffer.replace(pos, pos + len, (String)valueStore.get(key));
+ buffer.replace(pos, pos + len, valueStore.get(key));
pos += len;
}
}

Back to the top