ConfigInfoImpl: Factor out initialization of MaxObjectSizeLimitInfo to a method
Change-Id: I6803c76c23532671c8794267b69f1aaec206d696
This commit is contained in:
@@ -98,15 +98,7 @@ public class ConfigInfoImpl extends ConfigInfo {
|
||||
this.requireSignedPush = requireSignedPush;
|
||||
}
|
||||
|
||||
MaxObjectSizeLimitInfo maxObjectSizeLimit = new MaxObjectSizeLimitInfo();
|
||||
maxObjectSizeLimit.value =
|
||||
transferConfig.getEffectiveMaxObjectSizeLimit(projectState)
|
||||
== transferConfig.getMaxObjectSizeLimit()
|
||||
? transferConfig.getFormattedMaxObjectSizeLimit()
|
||||
: p.getMaxObjectSizeLimit();
|
||||
maxObjectSizeLimit.configuredValue = p.getMaxObjectSizeLimit();
|
||||
maxObjectSizeLimit.inheritedValue = transferConfig.getFormattedMaxObjectSizeLimit();
|
||||
this.maxObjectSizeLimit = maxObjectSizeLimit;
|
||||
this.maxObjectSizeLimit = getMaxObjectSizeLimit(projectState, transferConfig, p);
|
||||
|
||||
this.submitType = p.getSubmitType();
|
||||
this.state =
|
||||
@@ -130,6 +122,19 @@ public class ConfigInfoImpl extends ConfigInfo {
|
||||
this.theme = projectState.getTheme();
|
||||
}
|
||||
|
||||
private MaxObjectSizeLimitInfo getMaxObjectSizeLimit(
|
||||
ProjectState projectState, TransferConfig transferConfig, Project p) {
|
||||
MaxObjectSizeLimitInfo info = new MaxObjectSizeLimitInfo();
|
||||
info.value =
|
||||
transferConfig.getEffectiveMaxObjectSizeLimit(projectState)
|
||||
== transferConfig.getMaxObjectSizeLimit()
|
||||
? transferConfig.getFormattedMaxObjectSizeLimit()
|
||||
: p.getMaxObjectSizeLimit();
|
||||
info.configuredValue = p.getMaxObjectSizeLimit();
|
||||
info.inheritedValue = transferConfig.getFormattedMaxObjectSizeLimit();
|
||||
return info;
|
||||
}
|
||||
|
||||
private Map<String, Map<String, ConfigParameterInfo>> getPluginConfig(
|
||||
ProjectState project,
|
||||
DynamicMap<ProjectConfigEntry> pluginConfigEntries,
|
||||
|
||||
Reference in New Issue
Block a user