Fix sonar cloud bugs

This commit is contained in:
tastybento 2021-03-07 11:15:09 -08:00
parent c26b27afa1
commit 462c27f2df
2 changed files with 5 additions and 3 deletions

View File

@ -241,7 +241,9 @@ public class ChallengesImportManager
this.addon.logWarning("challenges.messages.defaults-file-overwrite");
}
defaultFile.delete();
if (!defaultFile.delete()) {
this.addon.logError("Could not delete file: " + defaultFile.getAbsolutePath());
}
}
else
{

View File

@ -262,7 +262,7 @@ public class ChallengesManager
* @param silent - if true, no messages are sent to user
* @return - true if imported
*/
public boolean loadChallenge(@NonNull Challenge challenge,
public boolean loadChallenge(@Nullable Challenge challenge,
boolean overwrite,
User user,
boolean silent)
@ -346,7 +346,7 @@ public class ChallengesManager
* @param silent of type boolean that indicate if message to user must be sent.
* @return boolean that indicate about load status.
*/
public boolean loadLevel(@NonNull ChallengeLevel level,
public boolean loadLevel(@Nullable ChallengeLevel level,
boolean overwrite,
User user,
boolean silent)