Fix CS warnings in sal-clustering-commons and enable enforcement
[controller.git] / opendaylight / md-sal / sal-clustering-commons / src / main / java / org / opendaylight / controller / cluster / notifications / RoleChanged.java
index f315bfdf7a13ad9e2c0b9ecaf6550f0a138763bc..711025bfa9251e3d332adddfef6b5c79b7093ebb 100644 (file)
@@ -1,15 +1,21 @@
+/*
+ * Copyright (c) 2014, 2015 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
 package org.opendaylight.controller.cluster.notifications;
 
 /**
  * Role Change message initiated internally from the  Raft Actor when a the behavior/role changes.
- *
  * Since its internal , need not be serialized
- *
  */
 public class RoleChanged {
-    private String memberId;
-    private String oldRole;
-    private String newRole;
+    private final String memberId;
+    private final String oldRole;
+    private final String newRole;
 
     public RoleChanged(String memberId, String oldRole, String newRole) {
         this.memberId = memberId;
@@ -28,4 +34,9 @@ public class RoleChanged {
     public String getNewRole() {
         return newRole;
     }
+
+    @Override
+    public String toString() {
+        return "RoleChanged [memberId=" + memberId + ", oldRole=" + oldRole + ", newRole=" + newRole + "]";
+    }
 }