// If each new issue matches an old one we can stop the matching mechanism
if (result.matched().size() != newIssues.size()) {
- if (sourceHashHolder != null && sourceHashHolder.getHashedReference() != null && hasLastScan) {
- mapNewissues(sourceHashHolder.getHashedReference(), sourceHashHolder.getHashedSource(), newIssues, result);
+ if (sourceHashHolder != null && hasLastScan) {
+ FileHashes hashedReference = sourceHashHolder.getHashedReference();
+ if (hashedReference != null) {
+ mapNewissues(hashedReference, sourceHashHolder.getHashedSource(), newIssues, result);
+ }
}
mapIssuesOnSameRule(newIssues, result);
}
import org.sonar.java.api.JavaUtils;
import javax.annotation.Nullable;
+
import java.io.File;
import java.io.IOException;
import java.util.Arrays;
}
private static void setPropertyIfNotAlreadyExists(ProjectDefinition definition, String propertyKey, String propertyValue) {
- if (StringUtils.isBlank(definition.getProperties().getProperty(propertyKey))) {
+ if (StringUtils.isBlank(definition.properties().get(propertyKey))) {
definition.setProperty(propertyKey, StringUtils.defaultString(propertyValue));
}
}
addProperties(projectReferentials.settings(reactor.getRoot().getKeyWithBranch()));
- addProperties(reactor.getRoot().getProperties());
+ addProperties(reactor.getRoot().properties());
}
@Override
private List<ProjectDefinition> subProjects = Lists.newArrayList();
private List<Object> containerExtensions = Lists.newArrayList();
- private ProjectDefinition(Map<String, String> p) {
- this.properties = p;
- }
-
private ProjectDefinition(Properties p) {
for (Entry<Object, Object> entry : p.entrySet()) {
this.properties.put(entry.getKey().toString(), entry.getValue().toString());
* @since 2.12
* @deprecated since 5.0 use {@link #setProperties(Map)}
*/
+ @Deprecated
public ProjectDefinition setProperties(Properties properties) {
for (Entry<Object, Object> entry : properties.entrySet()) {
this.properties.put(entry.getKey().toString(), entry.getValue().toString());