Skip to content

Commit

Permalink
patch "Possible unsafe assignment to a non-final static field in a co…
Browse files Browse the repository at this point in the history
…nstructor." from Codacy
  • Loading branch information
Dyskal committed Feb 27, 2021
1 parent dee4260 commit a487bd2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/main/java/dyskal/AppIdChooser.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import java.util.Objects;

public class AppIdChooser extends JFrame {
private static String applicationId;
private String applicationId;
private final TomlManager tomlManager = new TomlManager();

public AppIdChooser() {
Expand Down Expand Up @@ -73,7 +73,7 @@ public AppIdChooser() {
frame.setVisible(true);
}

public static String getAppId() {
public String getAppId() {
return applicationId;
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/dyskal/DiscordRP.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public DiscordRP() {

DiscordRPC lib = DiscordRPC.INSTANCE;
DiscordEventHandlers handlers = new DiscordEventHandlers();
lib.Discord_Initialize(AppIdChooser.getAppId(), handlers, true, null);
lib.Discord_Initialize(new AppIdChooser().getAppId(), handlers, true, null);

DiscordRichPresence presence = new DiscordRichPresence();
presence.startTimestamp = System.currentTimeMillis() / 1000;
Expand Down

0 comments on commit a487bd2

Please sign in to comment.