Skip to content

Commit

Permalink
Some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
andan67 committed May 29, 2023
1 parent acc9453 commit 66f59fc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<feature name="oh-marketplace-binding-sony" description="Sony Binding" version="${project.version}">
<feature>openhab-runtime-base</feature>
<feature>openhab-transport-upnp</feature>
<bundle dependency="true">mvn:org.openhab.addons.bundles/org.openhab.transform.map/${project.version}</bundle>
<feature>openhab-transformation-map</feature>
<bundle start-level="80">mvn:org.openhab.addons.bundles/org.openhab.binding.sony/${project.version}</bundle>
</feature>
</features>
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ public static boolean equalsIgnoreCase(final Map<String, String> map1, final Map
* @return true if strings are equal or both null, other false
*/
public static boolean equals(final @Nullable String str1, final @Nullable String str2) {
if (str1 == str2) {
if (str1.equals(str2)) {
return true;
}
if (str1 == null || str2 == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@
import java.net.URISyntaxException;
import java.net.URLDecoder;
import java.net.URLEncoder;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Base64;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.atomic.AtomicBoolean;
Expand Down Expand Up @@ -295,11 +294,11 @@ private void writeCommands() throws IOException {
// Note: encode value in case it's a URL type
lines.add(v.getName() + "=" + v.getType() + ":" + URLEncoder.encode(v.getCmd(), "UTF-8"));
}
Collections.sort(lines, String.CASE_INSENSITIVE_ORDER);
lines.sort(String.CASE_INSENSITIVE_ORDER);

if (!lines.isEmpty()) {
logger.debug("Writing remote commands to {}", file);
Files.write(file, lines, Charset.forName("UTF-8"));
Files.write(file, lines, StandardCharsets.UTF_8);
}
}
}
Expand Down

0 comments on commit 66f59fc

Please sign in to comment.