mirror of
https://github.com/arduino/Arduino.git
synced 2025-03-14 11:29:26 +01:00
Removed some java warnings
This commit is contained in:
parent
4edca6f01d
commit
448595d0b2
@ -190,7 +190,7 @@ public class Preferences {
|
|||||||
|
|
||||||
// data model
|
// data model
|
||||||
|
|
||||||
static Hashtable defaults;
|
static Hashtable<String, String> defaults;
|
||||||
static Hashtable<String, String> table = new Hashtable<String, String>();
|
static Hashtable<String, String> table = new Hashtable<String, String>();
|
||||||
static File preferencesFile;
|
static File preferencesFile;
|
||||||
|
|
||||||
@ -226,7 +226,7 @@ public class Preferences {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// clone the hash table
|
// clone the hash table
|
||||||
defaults = (Hashtable) table.clone();
|
defaults = new Hashtable<String, String>(table);
|
||||||
|
|
||||||
// Load a prefs file if specified on the command line
|
// Load a prefs file if specified on the command line
|
||||||
if (commandLinePrefs != null) {
|
if (commandLinePrefs != null) {
|
||||||
@ -701,7 +701,7 @@ public class Preferences {
|
|||||||
load(input, table);
|
load(input, table);
|
||||||
}
|
}
|
||||||
|
|
||||||
static public void load(InputStream input, Map table) throws IOException {
|
static public void load(InputStream input, Map<String, String> table) throws IOException {
|
||||||
String[] lines = loadStrings(input); // Reads as UTF-8
|
String[] lines = loadStrings(input); // Reads as UTF-8
|
||||||
for (String line : lines) {
|
for (String line : lines) {
|
||||||
if ((line.length() == 0) ||
|
if ((line.length() == 0) ||
|
||||||
@ -806,7 +806,7 @@ public class Preferences {
|
|||||||
|
|
||||||
|
|
||||||
static public String getDefault(String attribute) {
|
static public String getDefault(String attribute) {
|
||||||
return (String) defaults.get(attribute);
|
return defaults.get(attribute);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user