/** * Updates the values that are <U>not</U> already configured with those * from the global entry * * @param globalEntry The global entry - ignored if {@code null} or * same reference as this entry * @return {@code true} if anything updated */ public boolean processGlobalValues(HostConfigEntry globalEntry) { if ((globalEntry == null) || (this == globalEntry)) { return false; } boolean modified = false; /* * NOTE !!! DO NOT TRY TO CHANGE THE ORDER OF THE OR-ing AS IT * WOULD CAUSE INVALID CODE EXECUTION */ modified = updateGlobalPort(globalEntry.getPort()) || modified; modified = updateGlobalHostName(globalEntry.getHostName()) || modified; modified = updateGlobalUserName(globalEntry.getUsername()) || modified; modified = updateGlobalIdentities(globalEntry.getIdentities()) || modified; modified = updateGlobalIdentityOnly(globalEntry.isIdentitiesOnly()) || modified; Map<String, String> updated = updateGlobalProperties(globalEntry.getProperties()); modified = (GenericUtils.size(updated) > 0) || modified; return modified; }
/** * Updates the values that are <U>not</U> already configured with those * from the global entry * * @param globalEntry The global entry - ignored if {@code null} or * same reference as this entry * @return {@code true} if anything updated */ public boolean processGlobalValues(HostConfigEntry globalEntry) { if ((globalEntry == null) || (this == globalEntry)) { return false; } boolean modified = false; /* * NOTE !!! DO NOT TRY TO CHANGE THE ORDER OF THE OR-ing AS IT * WOULD CAUSE INVALID CODE EXECUTION */ modified = updateGlobalPort(globalEntry.getPort()) || modified; modified = updateGlobalHostName(globalEntry.getHostName()) || modified; modified = updateGlobalUserName(globalEntry.getUsername()) || modified; modified = updateGlobalIdentities(globalEntry.getIdentities()) || modified; modified = updateGlobalIdentityOnly(globalEntry.isIdentitiesOnly()) || modified; Map<String, String> updated = updateGlobalProperties(globalEntry.getProperties()); modified = (GenericUtils.size(updated) > 0) || modified; return modified; }