]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-6555 Dependency should continue to extends Edge
authorJulien HENRY <julien.henry@sonarsource.com>
Wed, 20 May 2015 08:39:24 +0000 (10:39 +0200)
committerJulien HENRY <julien.henry@sonarsource.com>
Wed, 20 May 2015 08:41:48 +0000 (10:41 +0200)
for backward compatibility with Java plugin

sonar-plugin-api/pom.xml
sonar-plugin-api/src/main/java/org/sonar/api/design/Dependency.java

index d49195a8d01c919789253995bdd4c279bb441036..06185b4c0a134ea283346e2b4649dba24e1c5140 100644 (file)
         </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
     -->
index 5bfe69d6d0d822f21e87480d0a08d5cba76e8f99..a1844647c7a0d4f3e7fea03a43c3abe00d16e5f3 100644 (file)
@@ -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;
   }