Skip to content

Commit 448595d

Browse files
committed
Removed some java warnings
1 parent 4edca6f commit 448595d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

app/src/processing/app/Preferences.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ public String toString() {
190190

191191
// data model
192192

193-
static Hashtable defaults;
193+
static Hashtable<String, String> defaults;
194194
static Hashtable<String, String> table = new Hashtable<String, String>();
195195
static File preferencesFile;
196196

@@ -226,7 +226,7 @@ static protected void init(String commandLinePrefs) {
226226
}
227227

228228
// clone the hash table
229-
defaults = (Hashtable) table.clone();
229+
defaults = new Hashtable<String, String>(table);
230230

231231
// Load a prefs file if specified on the command line
232232
if (commandLinePrefs != null) {
@@ -701,7 +701,7 @@ static protected void load(InputStream input) throws IOException {
701701
load(input, table);
702702
}
703703

704-
static public void load(InputStream input, Map table) throws IOException {
704+
static public void load(InputStream input, Map<String, String> table) throws IOException {
705705
String[] lines = loadStrings(input); // Reads as UTF-8
706706
for (String line : lines) {
707707
if ((line.length() == 0) ||
@@ -806,7 +806,7 @@ static public String get(String attribute /*, String defaultValue */) {
806806

807807

808808
static public String getDefault(String attribute) {
809-
return (String) defaults.get(attribute);
809+
return defaults.get(attribute);
810810
}
811811

812812

0 commit comments

Comments
 (0)