Fix nits on flows:

Rename existingResource flows variable to be specific to EPP resource type and replace some explicit checks with helper methods.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133774229
This commit is contained in:
cgoldfeder 2016-09-20 17:07:46 -07:00 committed by Ben McIlwain
parent df70da48a2
commit aed3c0f0d0
14 changed files with 125 additions and 156 deletions

View file

@ -41,8 +41,8 @@ public class HostInfoFlow extends LoggedInFlow {
@Override
public EppOutput run() throws EppException {
HostResource existingResource = loadResourceForQuery(HostResource.class, targetId, now);
verifyOptionalAuthInfoForResource(authInfo, existingResource);
return createOutput(SUCCESS, cloneResourceWithLinkedStatus(existingResource, now));
HostResource host = loadResourceForQuery(HostResource.class, targetId, now);
verifyOptionalAuthInfoForResource(authInfo, host);
return createOutput(SUCCESS, cloneResourceWithLinkedStatus(host, now));
}
}