Method deployOvfTemplate
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public void deployOvfTemplate(final HttpInputs httpInputs, final VmInputs vmInputs, final String templatePath,
final Map<String, String> ovfNetworkMap, final Map<String, String> ovfPropertyMap)
Method createLeaseSetup
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
final ConnectionResources connectionResources, final VmInputs vmInputs, final String templatePath,
final Map<String, String> ovfNetworkMap, final Map<String, String> ovfPropertyMap) throws Exception {
Method getTransferVmdK
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private ITransferVmdkFrom getTransferVmdK(final String templateFilePathStr, final String vmdkName) throws IOException {
final Path templateFilePath = Paths.get(templateFilePathStr);
if (isOva(templateFilePath)) {
final TarArchiveInputStream tar = new TarArchiveInputStream(new FileInputStream(templateFilePathStr));
TarArchiveEntry entry;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method getOvfTemplateAsString
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
@NotNull
private String getOvfTemplateAsString(final String templatePath) throws IOException {
if (isOva(Paths.get(templatePath))) {
try (final TarArchiveInputStream tar = new TarArchiveInputStream(new FileInputStream(templatePath))) {
TarArchiveEntry entry;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method transferVmdkFiles
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private void transferVmdkFiles(final String ovfPath, final OvfCreateImportSpecResult importSpecResult,
final List<HttpNfcLeaseDeviceUrl> deviceUrls, final ProgressUpdater progressUpdater)
throws Exception {
for (HttpNfcLeaseDeviceUrl deviceUrl : deviceUrls) {
final String deviceKey = deviceUrl.getImportKey();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"