milleruntime commented on a change in pull request #327: ACCUMULO-4546 Create 
default log message for IllegalTableTransitionException
URL: https://github.com/apache/accumulo/pull/327#discussion_r153539758
 
 

 ##########
 File path: 
server/base/src/main/java/org/apache/accumulo/server/tables/TableManager.java
 ##########
 @@ -115,10 +115,22 @@ public TableState getTableState(String tableId) {
 
     final TableState oldState;
     final TableState newState;
+    final String message;
 
     public IllegalTableTransitionException(TableState oldState, TableState 
newState) {
+      this(oldState, newState, "");
+    }
+
+    public IllegalTableTransitionException(TableState oldState, TableState 
newState, String message) {
       this.oldState = oldState;
       this.newState = newState;
+
+      if (message != null && !message.isEmpty())
 
 Review comment:
   Could use StringUtils.isNotEmpty() from apache commons.  Or even static 
import it so it just reads if(isNotEmpty(message))

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to