Bug 4105: Remove EntityOwnershipCandidate
[controller.git] / opendaylight / md-sal / sal-common-api / src / main / java / org / opendaylight / controller / md / sal / common / api / clustering / CandidateAlreadyRegisteredException.java
index 7e35bc9439a134780c9b8e8a617c07eb0aa5166a..976688946fa65b34e566ad51022a52b91b313bbb 100644 (file)
@@ -19,15 +19,11 @@ public class CandidateAlreadyRegisteredException extends Exception {
     private static final long serialVersionUID = 1L;
 
     private final Entity entity;
-    private final EntityOwnershipCandidate registeredCandidate;
 
-    public CandidateAlreadyRegisteredException(@Nonnull Entity entity,
-                                               @Nonnull EntityOwnershipCandidate registeredCandidate) {
-        super(String.format("Candidate %s has already been registered for %s",
-                Preconditions.checkNotNull(registeredCandidate, "registeredCandidate should not be null"),
+    public CandidateAlreadyRegisteredException(@Nonnull Entity entity) {
+        super(String.format("Candidate has already been registered for %s",
                 Preconditions.checkNotNull(entity, "entity should not be null")));
         this.entity = entity;
-        this.registeredCandidate = registeredCandidate;
     }
 
     /**
@@ -38,13 +34,4 @@ public class CandidateAlreadyRegisteredException extends Exception {
     public Entity getEntity() {
         return entity;
     }
-
-    /**
-     *
-     * @return the currently registered candidate
-     */
-    @Nonnull
-    public EntityOwnershipCandidate getRegisteredCandidate() {
-        return registeredCandidate;
-    }
 }