Removed some local variables that conflict
This originally broke functionality silently by returning a success but
skipping BDIO file creation
/**
* hub-detect
- *
+ * <p>
* Copyright (C) 2018 Black Duck Software, Inc.
* http://www.blackducksoftware.com/
- *
+ * <p>
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ * <p>
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ * <p>
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
*/
package com.blackducksoftware.integration.hub.detect.model;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.commons.lang3.StringUtils;
-import org.slf4j.Logger;
-
import com.blackducksoftware.integration.hub.detect.DetectConfiguration;
import com.blackducksoftware.integration.hub.detect.codelocation.CodeLocationName;
import com.blackducksoftware.integration.hub.detect.codelocation.CodeLocationNameService;
import com.blackducksoftware.integration.hub.detect.util.BdioFileNamer;
import com.blackducksoftware.integration.hub.detect.util.DetectFileManager;
import com.blackducksoftware.integration.hub.service.model.ProjectRequestBuilder;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+
+import java.util.*;
public class DetectProject {
private final Map<String, DetectCodeLocation> codeLocationNameMap = new HashMap<>();
@@ -104,8 +98,6 @@ public class DetectProject {
}
public void processDetectCodeLocations(final Logger logger, final DetectFileManager detectFileManager, final BdioFileNamer bdioFileNamer, final CodeLocationNameService codeLocationNameService) {
- final List<DetectCodeLocation> detectCodeLocations = getDetectCodeLocations();
- final Map<String, DetectCodeLocation> codeLocationNameMap = new HashMap<>(detectCodeLocations.size());
for (final DetectCodeLocation detectCodeLocation : getDetectCodeLocations()) {
if (detectCodeLocation.getDependencyGraph() == null) {
logger.warn(String.format("Dependency graph is null for code location %s", detectCodeLocation.getSourcePath()));
