Skip to content

Commit 3731134

Browse files
committed
Removed some java compile time warnings
1 parent cdf2b8d commit 3731134

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

app/src/processing/app/Base.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1082,13 +1082,6 @@ public void actionPerformed(ActionEvent e) {
10821082
PreferencesMap prefs = targetPlatform.getPreferences();
10831083
String targetname = prefs.get("name");
10841084

1085-
if (false) {
1086-
// Hack to extract these words by gettext tool.
1087-
// These phrases are actually defined in the "platform.txt".
1088-
String notused = _("Arduino AVR Boards");
1089-
notused = _("Arduino ARM (32-bits) Boards");
1090-
}
1091-
10921085
JMenuItem platformItem = new JMenuItem(_(targetname));
10931086
platformItem.setEnabled(false);
10941087
importMenu.add(platformItem);

app/src/processing/app/I18n.java

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
package processing.app;
1515

1616
import java.util.*;
17-
import java.util.Locale.*;
1817
import java.text.MessageFormat;
1918

2019
public class I18n {
@@ -58,4 +57,18 @@ public static String _(String s) {
5857
public static String format(String fmt, Object ... args) {
5958
return MessageFormat.format(fmt, args);
6059
}
60+
61+
/**
62+
* Does nothing.
63+
*
64+
* This method is an hack to extract words with gettext tool.
65+
*/
66+
protected static void unusedStrings() {
67+
// These phrases are defined in the "platform.txt".
68+
_("Arduino AVR Boards");
69+
_("Arduino ARM (32-bits) Boards");
70+
71+
// This word is defined in the "boards.txt".
72+
_("Processor");
73+
}
6174
}

app/src/processing/app/debug/TargetPlatform.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,6 @@ public TargetPlatform(String _name, File _folder) {
4747
programmers = new HashMap<String, PreferencesMap>();
4848
preferences = new PreferencesMap();
4949

50-
if (false) {
51-
// Hack to extract this word by gettext tool.
52-
// This word is actually defined in the "boards.txt".
53-
String notused = _("Processor");
54-
}
55-
5650
try {
5751
File boardsFile = new File(_folder, "boards.txt");
5852
if (boardsFile.exists() && boardsFile.canRead()) {

0 commit comments

Comments
 (0)