Skip to content

Commit 304db38

Browse files
committed
Fixed NLS-Warnings
1 parent c6becb0 commit 304db38

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

io.sloeber.core/src/io/sloeber/core/api/LibraryManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,13 +136,13 @@ public LibraryTree() {
136136
this.categories.put(category.getName(), category);
137137
}
138138
for (io.sloeber.core.managers.Library library : libraryIndex.getLibraries(categoryName)) {
139-
Library lib = category.libraries.get(library.getName() + " (" + libraryIndex.getName() + ")");
139+
Library lib = category.libraries.get(library.getName() + " (" + libraryIndex.getName() + ")"); //$NON-NLS-1$ //$NON-NLS-2$
140140
if (lib == null) {
141141
StringBuilder builder = new StringBuilder("Architectures:") //$NON-NLS-1$
142142
.append(library.getArchitectures().toString()).append("\n\n") //$NON-NLS-1$
143143
.append(library.getSentence());
144144
lib = new Library(category, library.getName(), libraryIndex.getName(), builder.toString());
145-
category.libraries.put(library.getName() + " (" + libraryIndex.getName() + ")", lib);
145+
category.libraries.put(library.getName() + " (" + libraryIndex.getName() + ")", lib); //$NON-NLS-1$//$NON-NLS-2$
146146
}
147147
lib.versions.add(new VersionNumber(library.getVersion()));
148148
if (library.isInstalled()) {

io.sloeber.core/src/io/sloeber/core/managers/Manager.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,9 @@ static private void loadJson(String url, boolean forceDownload) {
233233
}
234234
}
235235
if (jsonFile.exists()) {
236-
if (jsonFile.getName().startsWith("package_")) {
236+
if (jsonFile.getName().toLowerCase().startsWith("package_")) { //$NON-NLS-1$
237237
loadPackage(jsonFile);
238-
} else if (jsonFile.getName().startsWith("library_")) {
238+
} else if (jsonFile.getName().toLowerCase().startsWith("library_")) { //$NON-NLS-1$
239239
loadLibrary(jsonFile);
240240
}
241241
}
@@ -783,7 +783,7 @@ public static int compareVersions(String version1, String version2) {
783783
if (vi1 > vi2) {
784784
return 1;
785785
}
786-
} catch (NumberFormatException e) {
786+
} catch (@SuppressWarnings("unused") NumberFormatException e) {
787787
// not numbers, do string compares
788788
int c = v1[i].compareTo(v2[i]);
789789
if (c < 0) {

0 commit comments

Comments
 (0)