diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2015-05-20 10:39:24 +0200 |
---|---|---|
committer | Julien HENRY <julien.henry@sonarsource.com> | 2015-05-20 10:41:48 +0200 |
commit | 419f034f1317d0a987ff26cd97a9af1fa5046931 (patch) | |
tree | 6f932d27e085811bec57199d179bbac15e423074 /sonar-plugin-api | |
parent | 895b846371f62c9cdf8bbc7f47fc921ea72614ff (diff) | |
download | sonarqube-419f034f1317d0a987ff26cd97a9af1fa5046931.tar.gz sonarqube-419f034f1317d0a987ff26cd97a9af1fa5046931.zip |
SONAR-6555 Dependency should continue to extends Edge
for backward compatibility with Java plugin
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r-- | sonar-plugin-api/pom.xml | 6 | ||||
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/design/Dependency.java | 6 |
2 files changed, 11 insertions, 1 deletions
diff --git a/sonar-plugin-api/pom.xml b/sonar-plugin-api/pom.xml index d49195a8d01..06185b4c0a1 100644 --- a/sonar-plugin-api/pom.xml +++ b/sonar-plugin-api/pom.xml @@ -55,6 +55,12 @@ </exclusion> </exclusions> </dependency> + <dependency> + <groupId>org.codehaus.sonar</groupId> + <artifactId>sonar-graph</artifactId> + <!-- Set to provided to not be visible by plugins --> + <scope>provided</scope> + </dependency> <!-- TODO we can't remove hibernate-annotations, because currently it's used moreover it contains transitive dependency on dom4j, which is used in some plugins --> diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/design/Dependency.java b/sonar-plugin-api/src/main/java/org/sonar/api/design/Dependency.java index 5bfe69d6d0d..a1844647c7a 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/design/Dependency.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/design/Dependency.java @@ -23,12 +23,13 @@ import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.commons.lang.builder.ToStringBuilder; import org.sonar.api.resources.Resource; +import org.sonar.graph.Edge; /** * @deprecated since 5.2 No more design features */ @Deprecated -public class Dependency { +public class Dependency implements Edge<Resource> { private Resource from; private Resource to; @@ -48,6 +49,7 @@ public class Dependency { this.to = to; } + @Override public Resource getFrom() { return from; } @@ -59,6 +61,7 @@ public class Dependency { this.from = from; } + @Override public Resource getTo() { return to; } @@ -79,6 +82,7 @@ public class Dependency { return this; } + @Override public int getWeight() { return weight; } |