Skip to content

Commit

Permalink
fix: Compare string with equals
Browse files Browse the repository at this point in the history
  • Loading branch information
Alvinn8 authored and foodelevator committed May 20, 2024
1 parent bce18a4 commit b2f3361
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/se/datasektionen/calypso/Darkmode.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ public Darkmode(Config config) {

public boolean getCurrent() {
var url = config.getDarkmodeUrl();
if (url == "true") return true;
if (url == "false") return false;
if ("true".equals(url)) return true;
if ("false".equals(url)) return false;
return new RestTemplate()
.exchange(url, HttpMethod.GET, new HttpEntity<>(null, null), boolean.class)
.getBody();
Expand Down

0 comments on commit b2f3361

Please sign in to comment.