Add default constructor to Dependency to make it usable with frameworks (e.g., object mappers)
@@ -37,12 +37,12 @@ import eu.fasten.core.data.Constants;
public class Dependency extends MavenProduct {
public static final Dependency empty = new Dependency("", "", "");
- public final Set<VersionConstraint> versionConstraints;
- public final Set<Exclusion> exclusions;
- public final String scope;
- public final boolean optional;
- public final String type;
- public final String classifier;
+ public Set<VersionConstraint> versionConstraints;
+ public Set<Exclusion> exclusions;
+ public String scope;
+ public boolean optional;
+ public String type;
+ public String classifier;
/**
* Valid dependency scopes. Defined by maven. Learn more:
@@ -50,6 +50,11 @@ public class Dependency extends MavenProduct {
*/
public static final String[] SCOPES = getScopes();
+ @SuppressWarnings("unused")
+ private Dependency() {
+ // exists for JSON object mappers
+ }
+
/**
* Constructor for Dependency object. (From
* https://maven.apache.org/ref/3.6.3/maven-model/maven.html#class_dependency)
