mirror of
https://github.com/i2p/i2p.i2p.git
synced 2026-10-23 19:32:56 +00:00
Fixing two potential NPEs found by findbugs
This commit is contained in:
1 parent
adfc22499c
commit
c05cd07ff7
2 files changed
+10
-5
No files matched your search
@@ -184,12 +184,14 @@ public class ProfileOrganizer {
|
||||
*
|
||||
*/
|
||||
public PeerProfile addProfile(PeerProfile profile) {
|
||||
if (profile == null) return null;
|
||||
|
||||
Hash peer = profile.getPeer();
|
||||
if (profile == null || peer == null) return null;
|
||||
|
||||
if (peer == null) return null;
|
||||
|
||||
if (_log.shouldLog(Log.DEBUG))
|
||||
_log.debug("New profile created for " + peer);
|
||||
|
||||
|
||||
PeerProfile old = getProfile(peer);
|
||||
profile.coalesceStats();
|
||||
if (!getWriteLock())
|
||||
|
||||
Reference in new issue
Block a user