Consistent SpotBugs configuration & warning fixes.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
plugins {
|
||||
id 'java'
|
||||
id 'application'
|
||||
id 'com.github.spotbugs' version '2.0.0'
|
||||
id 'com.github.johnrengelman.shadow' version '5.1.0'
|
||||
}
|
||||
|
||||
@@ -13,6 +12,7 @@ dependencies {
|
||||
implementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.1.2'
|
||||
implementation group: 'com.yuvimasory', name: 'orange-extensions', version: '1.3.0'
|
||||
implementation group: 'com.github.tulskiy', name: 'jkeymaster', version: '1.2'
|
||||
implementation group: 'com.github.spotbugs', name: 'spotbugs-annotations', version: '4.0.0-beta4'
|
||||
|
||||
compile project( ':masterpassword-model' )
|
||||
}
|
||||
|
@@ -24,6 +24,7 @@ import com.google.common.io.Resources;
|
||||
import com.google.common.util.concurrent.*;
|
||||
import com.lyndir.lhunath.opal.system.logging.Logger;
|
||||
import com.lyndir.masterpassword.MPIdenticon;
|
||||
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
||||
import java.awt.*;
|
||||
import java.io.IOException;
|
||||
import java.util.concurrent.*;
|
||||
@@ -232,6 +233,7 @@ public abstract class Res {
|
||||
return new Font( fontName, style, size );
|
||||
}
|
||||
|
||||
@SuppressFBWarnings("URLCONNECTION_SSRF_FD")
|
||||
private void register() {
|
||||
try {
|
||||
Font font = Font.createFont( Font.TRUETYPE_FONT, Resources.getResource( resourceName ).openStream() );
|
||||
|
@@ -23,6 +23,7 @@ import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.StandardCopyOption;
|
||||
import java.security.SecureRandom;
|
||||
import java.util.*;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.Future;
|
||||
@@ -42,7 +43,7 @@ import javax.swing.text.PlainDocument;
|
||||
@SuppressWarnings("SerializableStoresNonSerializable")
|
||||
public class UserContentPanel extends JPanel implements MasterPassword.Listener, MPUser.Listener {
|
||||
|
||||
private static final Random random = new Random();
|
||||
private static final Random random = new SecureRandom();
|
||||
private static final int SIZE_RESULT = 48;
|
||||
private static final Logger logger = Logger.get( UserContentPanel.class );
|
||||
private static final JButton iconButton = Components.button( Res.icons().user(), null, null );
|
||||
|
Reference in New Issue
Block a user