Code review comment: This method is now called unconditionally wrt. `lastSucceeded`, can this have any unintended side effects?

Code under review:
private void handleUpdate() {
        if (reqDone) {
            reqDone = false;

            boolean logOnSuccess = false;
            boolean logOnFailure = true;
            synchronized (this) {
                if (req.methodName().equals(UNREGISTER_METHOD_NAME)) {
                    logOnSuccess = true;
                    
                    
                    
                    
                    lastRegisterSucceeded.remove(name);
                } else {
                    final Boolean lastSucceeded = lastRegisterSucceeded.get(name);
                    if (lastSucceeded == null) {
                        logOnSuccess = true;
                        logOnFailure = false;
                    } else if (lastSucceeded != !req.isError()) {
                        logOnSuccess = true;
                    }
                    lastRegisterSucceeded.put(name, !req.isError());
                }
            }

            if (req.isError()) {
                 if (req.errorCode() != ErrorCode.METHOD_FAILED) {
                     if (logOnFailure) {
                         log.log(Level.INFO, logMessagePrefix() + " failed, will disconnect: " + req.errorMessage() + " (code " + req.errorCode() + ")");
                     }
                    target.close();
                    target = null;
                } else {
                    log.log(Level.WARNING, logMessagePrefix() + " failed: " + req.errorMessage());
                }
            } else {
                log.log(logOnSuccess ? Level.INFO : Level.FINE, logMessagePrefix() + " completed successfully");
                backOff.reset();
            }
            req = null;
            name = null;
        }
        if (req != null) {
            log.log(Level.FINEST, "req in progress");
            return; 
        }
        if (target != null && ! slobroks.contains(currSlobrok)) {
            log.log(Level.INFO, "[RPC @ " + mySpec + "] location broker " + currSlobrok + " removed, will disconnect and use one of: "+slobroks);
            target.close();
            target = null;
        }
        if (target == null) {
            currSlobrok = slobroks.nextSlobrokSpec();
            if (currSlobrok == null) {
                double delay = backOff.get();
                Level level = Level.FINE;
                if (backOff.shouldInform(delay)) level = Level.INFO;
                if (backOff.shouldWarn(delay)) level = Level.WARNING;
                log.log(level, "[RPC @ " + mySpec + "] no location brokers available, retrying: "+slobroks+" (in " + delay + " seconds)");
                updateTask.schedule(delay);
                return;
            }
            lastRegisterSucceeded.clear();
            target = orb.connect(new Spec(currSlobrok));
            String namesString = null;
            final boolean logFine = log.isLoggable(Level.FINE);
            synchronized (this) {
                if (logFine) {
                    
                    namesString = names.toString();
                }
                pending.clear();
                pending.addAll(names);
            }

            if (logFine) {
                log.log(Level.FINE, "[RPC @ " + mySpec + "] Connect to location broker " + currSlobrok +
                        " and reregister all service names: " + namesString);
            }
        }

        synchronized (this) {
            if (unreg.size() > 0) {
                name = unreg.remove(unreg.size() - 1);
                req = new Request(UNREGISTER_METHOD_NAME);
            } else if (pending.size() > 0) {
                name = pending.remove(pending.size() - 1);
                req = new Request(REGISTER_METHOD_NAME);
            } else {
                pending.addAll(names);
                log.log(Level.FINE, "[RPC @ " + mySpec + "] Reregister all service names in 30 seconds: " + names);
                updateTask.schedule(30.0);
                return;
            }
        }

        req.parameters().add(new StringValue(name));
        req.parameters().add(new StringValue(mySpec));
        log.log(Level.FINE, logMessagePrefix() + " now");
        target.invokeAsync(req, 35.0, reqWait);
    }

Line commented on: lastRegisterSucceeded.put(name, !req.isError());

Revised code:
private void handleUpdate() {
        if (reqDone) {
            reqDone = false;

            boolean logOnSuccess = false;
            boolean logOnFailure = true;
            synchronized (this) {
                if (req.methodName().equals(UNREGISTER_METHOD_NAME)) {
                    logOnSuccess = true;
                    
                    
                    
                    
                    lastRegisterSucceeded.remove(name);
                } else {
                    final Boolean lastSucceeded = lastRegisterSucceeded.get(name);
                    if (lastSucceeded == null) {
                        logOnSuccess = true;
                        logOnFailure = false;
                    } else if (lastSucceeded != !req.isError()) {
                        logOnSuccess = true;
                    }
                    lastRegisterSucceeded.put(name, !req.isError());
                }
            }

            if (req.isError()) {
                 if (req.errorCode() != ErrorCode.METHOD_FAILED) {
                     if (logOnFailure) {
                         log.log(Level.INFO, logMessagePrefix() + " failed, will disconnect: " + req.errorMessage() + " (code " + req.errorCode() + ")");
                     }
                    target.close();
                    target = null;
                } else {
                    log.log(Level.WARNING, logMessagePrefix() + " failed: " + req.errorMessage());
                }
            } else {
                log.log(logOnSuccess ? Level.INFO : Level.FINE, logMessagePrefix() + " completed successfully");
                backOff.reset();
            }
            req = null;
            name = null;
        }
        if (req != null) {
            log.log(Level.FINEST, "req in progress");
            return; 
        }
        if (target != null && ! slobroks.contains(currSlobrok)) {
            log.log(Level.INFO, "[RPC @ " + mySpec + "] location broker " + currSlobrok + " removed, will disconnect and use one of: "+slobroks);
            target.close();
            target = null;
        }
        if (target == null) {
            currSlobrok = slobroks.nextSlobrokSpec();
            if (currSlobrok == null) {
                double delay = backOff.get();
                Level level = Level.FINE;
                if (backOff.shouldInform(delay)) level = Level.INFO;
                if (backOff.shouldWarn(delay)) level = Level.WARNING;
                log.log(level, "[RPC @ " + mySpec + "] no location brokers available, retrying: "+slobroks+" (in " + delay + " seconds)");
                updateTask.schedule(delay);
                return;
            }
            lastRegisterSucceeded.clear();
            target = orb.connect(new Spec(currSlobrok));
            String namesString = null;
            final boolean logFine = log.isLoggable(Level.FINE);
            synchronized (this) {
                if (logFine) {
                    
                    namesString = names.toString();
                }
                pending.clear();
                pending.addAll(names);
            }

            if (logFine) {
                log.log(Level.FINE, "[RPC @ " + mySpec + "] Connect to location broker " + currSlobrok +
                        " and reregister all service names: " + namesString);
            }
        }

        synchronized (this) {
            if (unreg.size() > 0) {
                name = unreg.remove(unreg.size() - 1);
                req = new Request(UNREGISTER_METHOD_NAME);
            } else if (pending.size() > 0) {
                name = pending.remove(pending.size() - 1);
                req = new Request(REGISTER_METHOD_NAME);
            } else {
                pending.addAll(names);
                log.log(Level.FINE, "[RPC @ " + mySpec + "] Reregister all service names in 30 seconds: " + names);
                updateTask.schedule(30.0);
                return;
            }
        }

        req.parameters().add(new StringValue(name));
        req.parameters().add(new StringValue(mySpec));
        log.log(Level.FINE, logMessagePrefix() + " now");
        target.invokeAsync(req, 35.0, reqWait);
    }