mirror of
https://github.com/i2p/i2p.i2p.git
synced 2026-06-02 11:04:27 +00:00
Router: remove the redundant casts, fixes #438
This commit is contained in:
@@ -691,7 +691,7 @@ class InboundEstablishState extends EstablishBase implements NTCP2Payload.Payloa
|
||||
try {
|
||||
RouterInfo old = _context.netDb().store(h, ri);
|
||||
if (flood && !ri.equals(old)) {
|
||||
FloodfillNetworkDatabaseFacade fndf = (FloodfillNetworkDatabaseFacade) _context.netDb();
|
||||
FloodfillNetworkDatabaseFacade fndf = _context.netDb();
|
||||
if (fndf.floodConditional(ri)) {
|
||||
if (_log.shouldDebug())
|
||||
_log.debug("Flooded the RI: " + h);
|
||||
|
||||
@@ -1670,7 +1670,7 @@ public class NTCPConnection implements Closeable {
|
||||
return;
|
||||
RouterInfo old = _context.netDb().store(h, ri);
|
||||
if (flood && !ri.equals(old)) {
|
||||
FloodfillNetworkDatabaseFacade fndf = (FloodfillNetworkDatabaseFacade) _context.netDb();
|
||||
FloodfillNetworkDatabaseFacade fndf = _context.netDb();
|
||||
if ((old == null || ri.getPublished() > old.getPublished()) &&
|
||||
fndf.floodConditional(ri)) {
|
||||
if (_log.shouldDebug())
|
||||
|
||||
@@ -376,7 +376,7 @@ class InboundEstablishState2 extends InboundEstablishState implements SSU2Payloa
|
||||
try {
|
||||
RouterInfo old = _context.netDb().store(h, ri);
|
||||
if (flood && !ri.equals(old)) {
|
||||
FloodfillNetworkDatabaseFacade fndf = (FloodfillNetworkDatabaseFacade) _context.netDb();
|
||||
FloodfillNetworkDatabaseFacade fndf = _context.netDb();
|
||||
if (fndf.floodConditional(ri)) {
|
||||
if (_log.shouldDebug())
|
||||
_log.debug("Flooded the RI: " + h);
|
||||
|
||||
@@ -634,7 +634,7 @@ public class PeerState2 extends PeerState implements SSU2Payload.PayloadCallback
|
||||
return;
|
||||
RouterInfo old = _context.netDb().store(h, ri);
|
||||
if (flood && !ri.equals(old)) {
|
||||
FloodfillNetworkDatabaseFacade fndf = (FloodfillNetworkDatabaseFacade) _context.netDb();
|
||||
FloodfillNetworkDatabaseFacade fndf = _context.netDb();
|
||||
if ((old == null || ri.getPublished() > old.getPublished()) &&
|
||||
fndf.floodConditional(ri)) {
|
||||
if (_log.shouldDebug())
|
||||
|
||||
Reference in New Issue
Block a user