Findbugs: More findbugs fixes. Including but not limited to: null check fixes and some synchronization

This commit is contained in:
dg2-new
2013-11-10 22:20:13 +00:00
parent 35fb332c2c
commit 5c38d5a6c9
23 changed files with 15 additions and 37 deletions

View File

@ -517,7 +517,6 @@ public class MetaInfo
* @since 0.9.1
*/
boolean checkPiece(PartialPiece pp) {
MessageDigest sha1 = SHA1.getInstance();
int piece = pp.getPiece();
byte[] hash;
try {

View File

@ -754,7 +754,7 @@ public class SnarkManager implements CompleteListener {
* @since 0.9.1
*/
public void saveOpenTrackers(List<String> ot) {
String val = setListConfig(PROP_OPENTRACKERS, ot);
setListConfig(PROP_OPENTRACKERS, ot);
if (ot == null)
ot = Collections.singletonList(I2PSnarkUtil.DEFAULT_OPENTRACKERS);
_util.setOpenTrackers(ot);

View File

@ -2548,7 +2548,7 @@ public class I2PSnarkServlet extends BasicServlet {
if (showPriority) {
buf.append("<td class=\"priority\">");
File f = item;
if ((!complete) && (!item.isDirectory()) && f != null) {
if ((!complete) && (!item.isDirectory())) {
int pri = snark.getStorage().getPriority(f.getCanonicalPath());
buf.append("<input type=\"radio\" value=\"5\" name=\"pri.").append(f.getCanonicalPath()).append("\" ");
if (pri > 0)