mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
More SonarQube detected bugs fixed:
- Use try-with-resources in AutoCloseable objects. - End this switch case with an unconditional break, return or throw statement. - A "NullPointerException" could be thrown. - Use the "equals" method if value comparison was intended. - Correct this "&" to "&&".
This commit is contained in:
@@ -111,7 +111,7 @@ public class SaveOpenDialog extends JPanel {
|
||||
RetFile = fc.getSelectedFile();
|
||||
|
||||
/* Adds extension if it is known and not given */
|
||||
if (type != null & !(RetFile.getAbsolutePath().endsWith(type.TypeExtension))) {
|
||||
if (type != null && !(RetFile.getAbsolutePath().endsWith(type.TypeExtension))) {
|
||||
RetFile = new File(RetFile.getAbsolutePath() + "." + type.TypeExtension);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user