accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From medi...@apache.org
Subject svn commit: r1383631 - /accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/
Date Tue, 11 Sep 2012 21:50:31 GMT
Author: medined
Date: Tue Sep 11 21:50:30 2012
New Revision: 1383631

URL: http://svn.apache.org/viewvc?rev=1383631&view=rev
Log:
add final to parameters .. guided by PMD

Modified:
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/CreateTableCommand.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/CreateUserCommand.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DUCommand.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DebugCommand.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DeleteCommand.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DeleteIterCommand.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DeleteManyCommand.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DeleteRowsCommand.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DeleteScanIterCommand.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DeleteTableCommand.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DropUserCommand.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/EGrepCommand.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/EscapeTokenizer.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ExecfileCommand.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ExitCommand.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ExportTableCommand.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/FlushCommand.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/FormatterCommand.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/GetAuthsCommand.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/GetGroupsCommand.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/GetSplitsCommand.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/GrantCommand.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/GrepCommand.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/HelpCommand.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/HiddenCommand.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/HistoryCommand.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ImportDirectoryCommand.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ImportTableCommand.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/InsertCommand.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/InterpreterCommand.java

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/CreateTableCommand.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/CreateTableCommand.java?rev=1383631&r1=1383630&r2=1383631&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/CreateTableCommand.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/CreateTableCommand.java Tue Sep 11 21:50:30 2012
@@ -19,6 +19,7 @@ package org.apache.accumulo.core.util.sh
 import java.io.File;
 import java.io.IOException;
 import java.util.Map.Entry;
+import java.util.Scanner;
 import java.util.SortedSet;
 import java.util.TreeSet;
 
@@ -52,67 +53,72 @@ public class CreateTableCommand extends 
   private Option createTableOptFormatter;
   public static String testTable;
   
-  public int execute(String fullCommand, CommandLine cl, Shell shellState) throws AccumuloException, AccumuloSecurityException, TableExistsException,
+  public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws AccumuloException, AccumuloSecurityException, TableExistsException,
       TableNotFoundException, IOException, ClassNotFoundException {
     
-    String testTableName = cl.getArgs()[0];
+    final String testTableName = cl.getArgs()[0];
     
     if (!testTableName.matches(Constants.VALID_TABLE_NAME_REGEX)) {
       shellState.getReader().printString("Only letters, numbers and underscores are allowed for use in table names. \n");
       throw new IllegalArgumentException();
     }
     
-    String tableName = cl.getArgs()[0];
-    if (shellState.getConnector().tableOperations().exists(tableName))
+    final String tableName = cl.getArgs()[0];
+    if (shellState.getConnector().tableOperations().exists(tableName)) {
       throw new TableExistsException(null, tableName, null);
-    
-    SortedSet<Text> partitions = new TreeSet<Text>();
-    boolean decode = cl.hasOption(base64Opt.getOpt());
+    }
+    final SortedSet<Text> partitions = new TreeSet<Text>();
+    final boolean decode = cl.hasOption(base64Opt.getOpt());
     
     if (cl.hasOption(createTableOptSplit.getOpt())) {
-      String f = cl.getOptionValue(createTableOptSplit.getOpt());
+      final String f = cl.getOptionValue(createTableOptSplit.getOpt());
       
       String line;
-      java.util.Scanner file = new java.util.Scanner(new File(f));
+      Scanner file = new Scanner(new File(f));
       while (file.hasNextLine()) {
         line = file.nextLine();
-        if (!line.isEmpty())
+        if (!line.isEmpty()) {
           partitions.add(decode ? new Text(Base64.decodeBase64(line.getBytes())) : new Text(line));
+        }
       }
     } else if (cl.hasOption(createTableOptCopySplits.getOpt())) {
-      String oldTable = cl.getOptionValue(createTableOptCopySplits.getOpt());
-      if (!shellState.getConnector().tableOperations().exists(oldTable))
+      final String oldTable = cl.getOptionValue(createTableOptCopySplits.getOpt());
+      if (!shellState.getConnector().tableOperations().exists(oldTable)) {
         throw new TableNotFoundException(null, oldTable, null);
+      }
       partitions.addAll(shellState.getConnector().tableOperations().getSplits(oldTable));
     }
     
     if (cl.hasOption(createTableOptCopyConfig.getOpt())) {
-      String oldTable = cl.getOptionValue(createTableOptCopyConfig.getOpt());
-      if (!shellState.getConnector().tableOperations().exists(oldTable))
+      final String oldTable = cl.getOptionValue(createTableOptCopyConfig.getOpt());
+      if (!shellState.getConnector().tableOperations().exists(oldTable)) {
         throw new TableNotFoundException(null, oldTable, null);
+      }
     }
     
     TimeType timeType = TimeType.MILLIS;
-    if (cl.hasOption(createTableOptTimeLogical.getOpt()))
+    if (cl.hasOption(createTableOptTimeLogical.getOpt())) {
       timeType = TimeType.LOGICAL;
+    }
     
     // create table
     shellState.getConnector().tableOperations().create(tableName, true, timeType);
-    if (partitions.size() > 0)
+    if (partitions.size() > 0) {
       shellState.getConnector().tableOperations().addSplits(tableName, partitions);
-    
+    }
     shellState.setTableName(tableName); // switch shell to new table
     // context
     
     if (cl.hasOption(createTableNoDefaultIters.getOpt())) {
-      for (String key : IteratorUtil.generateInitialTableProperties().keySet())
+      for (String key : IteratorUtil.generateInitialTableProperties().keySet()) {
         shellState.getConnector().tableOperations().removeProperty(tableName, key);
+      }
     }
     
     // Copy options if flag was set
     if (cl.hasOption(createTableOptCopyConfig.getOpt())) {
       if (shellState.getConnector().tableOperations().exists(tableName)) {
-        Iterable<Entry<String,String>> configuration = shellState.getConnector().tableOperations()
+        final Iterable<Entry<String,String>> configuration = shellState.getConnector().tableOperations()
             .getProperties(cl.getOptionValue(createTableOptCopyConfig.getOpt()));
         for (Entry<String,String> entry : configuration) {
           if (Property.isValidTablePropertyKey(entry.getKey())) {
@@ -132,7 +138,7 @@ public class CreateTableCommand extends 
     
     // Load custom formatter if set
     if (cl.hasOption(createTableOptFormatter.getOpt())) {
-      String formatterClass = cl.getOptionValue(createTableOptFormatter.getOpt());
+      final String formatterClass = cl.getOptionValue(createTableOptFormatter.getOpt());
       
       shellState.getConnector().tableOperations().setProperty(tableName, Property.TABLE_FORMATTER_CLASS.toString(), formatterClass);
     }
@@ -152,7 +158,7 @@ public class CreateTableCommand extends 
   
   @Override
   public Options getOptions() {
-    Options o = new Options();
+    final Options o = new Options();
     
     createTableOptCopyConfig = new Option("cc", "copy-config", true, "table to copy configuration from");
     createTableOptCopySplits = new Option("cs", "copy-splits", true, "table to copy current splits from");
@@ -171,11 +177,11 @@ public class CreateTableCommand extends 
     
     // Splits and CopySplits are put in an optionsgroup to make them
     // mutually exclusive
-    OptionGroup splitOrCopySplit = new OptionGroup();
+    final OptionGroup splitOrCopySplit = new OptionGroup();
     splitOrCopySplit.addOption(createTableOptSplit);
     splitOrCopySplit.addOption(createTableOptCopySplits);
     
-    OptionGroup timeGroup = new OptionGroup();
+    final OptionGroup timeGroup = new OptionGroup();
     timeGroup.addOption(createTableOptTimeLogical);
     timeGroup.addOption(createTableOptTimeMillis);
     

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/CreateUserCommand.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/CreateUserCommand.java?rev=1383631&r1=1383630&r2=1383631&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/CreateUserCommand.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/CreateUserCommand.java Tue Sep 11 21:50:30 2012
@@ -33,34 +33,33 @@ import org.apache.commons.cli.Options;
 public class CreateUserCommand extends Command {
   private Option scanOptAuths;
   
-  static Authorizations parseAuthorizations(String field) {
-    if (field == null || field.isEmpty())
+  static Authorizations parseAuthorizations(final String field) {
+    if (field == null || field.isEmpty()) {
       return Constants.NO_AUTHS;
+    }
     return new Authorizations(field.split(","));
   }
   
   @Override
-  public int execute(String fullCommand, CommandLine cl, Shell shellState) throws AccumuloException, TableNotFoundException, AccumuloSecurityException,
+  public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws AccumuloException, TableNotFoundException, AccumuloSecurityException,
       TableExistsException, IOException {
-    String user = cl.getArgs()[0];
-    String password = null;
-    String passwordConfirm = null;
-    
-    password = shellState.readMaskedLine("Enter new password for '" + user + "': ", '*');
+    final String user = cl.getArgs()[0];
+   
+    final String password = shellState.readMaskedLine("Enter new password for '" + user + "': ", '*');
     if (password == null) {
       shellState.getReader().printNewline();
       return 0;
     } // user canceled
-    passwordConfirm = shellState.readMaskedLine("Please confirm new password for '" + user + "': ", '*');
+    String passwordConfirm = shellState.readMaskedLine("Please confirm new password for '" + user + "': ", '*');
     if (passwordConfirm == null) {
       shellState.getReader().printNewline();
       return 0;
     } // user canceled
     
-    if (!password.equals(passwordConfirm))
+    if (!password.equals(passwordConfirm)) {
       throw new IllegalArgumentException("Passwords do not match");
-    
-    Authorizations authorizations = parseAuthorizations(cl.hasOption(scanOptAuths.getOpt()) ? cl.getOptionValue(scanOptAuths.getOpt()) : "");
+    }
+    final Authorizations authorizations = parseAuthorizations(cl.hasOption(scanOptAuths.getOpt()) ? cl.getOptionValue(scanOptAuths.getOpt()) : "");
     shellState.getConnector().securityOperations().createUser(user, password.getBytes(), authorizations);
     Shell.log.debug("Created user " + user + " with" + (authorizations.isEmpty() ? " no" : "") + " initial scan authorizations"
         + (!authorizations.isEmpty() ? " " + authorizations : ""));
@@ -79,7 +78,7 @@ public class CreateUserCommand extends C
   
   @Override
   public Options getOptions() {
-    Options o = new Options();
+    final Options o = new Options();
     scanOptAuths = new Option("s", "scan-authorizations", true, "scan authorizations");
     scanOptAuths.setArgName("comma-separated-authorizations");
     o.addOption(scanOptAuths);

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DUCommand.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DUCommand.java?rev=1383631&r1=1383630&r2=1383631&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DUCommand.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DUCommand.java Tue Sep 11 21:50:30 2012
@@ -37,16 +37,18 @@ public class DUCommand extends Command {
   
   private Option optTablePattern;
   
-  public int execute(String fullCommand, CommandLine cl, Shell shellState) throws IOException, TableNotFoundException {
+  public int execute(final String fullCommand, final CommandLine cl, Shell shellState) throws IOException, TableNotFoundException {
     
-    SortedSet<String> tablesToFlush = new TreeSet<String>(Arrays.asList(cl.getArgs()));
+    final SortedSet<String> tablesToFlush = new TreeSet<String>(Arrays.asList(cl.getArgs()));
     if (cl.hasOption(optTablePattern.getOpt())) {
-      for (String table : shellState.getConnector().tableOperations().list())
-        if (table.matches(cl.getOptionValue(optTablePattern.getOpt())))
+      for (String table : shellState.getConnector().tableOperations().list()) {
+        if (table.matches(cl.getOptionValue(optTablePattern.getOpt()))) {
           tablesToFlush.add(table);
+        }
+      }
     }
     try {
-      AccumuloConfiguration acuConf = new ConfigurationCopy(shellState.getConnector().instanceOperations().getSystemConfiguration());
+      final AccumuloConfiguration acuConf = new ConfigurationCopy(shellState.getConnector().instanceOperations().getSystemConfiguration());
       TableDiskUsage.printDiskUsage(acuConf, tablesToFlush, FileSystem.get(new Configuration()), shellState.getConnector());
     } catch (Exception ex) {
       throw new RuntimeException(ex);
@@ -61,7 +63,7 @@ public class DUCommand extends Command {
   
   @Override
   public Options getOptions() {
-    Options o = new Options();
+    final Options o = new Options();
     
     optTablePattern = new Option("p", "pattern", true, "regex pattern of table names");
     optTablePattern.setArgName("pattern");

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DebugCommand.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DebugCommand.java?rev=1383631&r1=1383630&r2=1383631&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DebugCommand.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DebugCommand.java Tue Sep 11 21:50:30 2012
@@ -28,14 +28,15 @@ import org.apache.accumulo.core.util.she
 import org.apache.commons.cli.CommandLine;
 
 public class DebugCommand extends Command {
-  public int execute(String fullCommand, CommandLine cl, Shell shellState) throws IOException {
+  public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws IOException {
     if (cl.getArgs().length == 1) {
-      if (cl.getArgs()[0].equalsIgnoreCase("on"))
+      if (cl.getArgs()[0].equalsIgnoreCase("on")) {
         Shell.setDebugging(true);
-      else if (cl.getArgs()[0].equalsIgnoreCase("off"))
+      } else if (cl.getArgs()[0].equalsIgnoreCase("off")) {
         Shell.setDebugging(false);
-      else
+      } else {
         throw new BadArgumentException("Argument must be 'on' or 'off'", fullCommand, fullCommand.indexOf(cl.getArgs()[0]));
+      }
     } else if (cl.getArgs().length == 0) {
       shellState.getReader().printString(Shell.isDebuggingEnabled() ? "on\n" : "off\n");
     } else {
@@ -52,8 +53,8 @@ public class DebugCommand extends Comman
   }
   
   @Override
-  public void registerCompletion(Token root, Map<Command.CompletionSet,Set<String>> special) {
-    Token debug_command = new Token(getName());
+  public void registerCompletion(final Token root, final Map<Command.CompletionSet,Set<String>> special) {
+    final Token debug_command = new Token(getName());
     debug_command.addSubcommand(Arrays.asList(new String[] {"on", "off"}));
     root.addSubcommand(debug_command);
   }

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DeleteCommand.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DeleteCommand.java?rev=1383631&r1=1383630&r2=1383631&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DeleteCommand.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DeleteCommand.java Tue Sep 11 21:50:30 2012
@@ -35,26 +35,27 @@ import org.apache.hadoop.io.Text;
 public class DeleteCommand extends Command {
   private Option deleteOptAuths, timestampOpt;
   
-  public int execute(String fullCommand, CommandLine cl, Shell shellState) throws AccumuloException, AccumuloSecurityException, TableNotFoundException,
+  public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws AccumuloException, AccumuloSecurityException, TableNotFoundException,
       IOException, ConstraintViolationException {
     shellState.checkTableState();
     
-    Mutation m = new Mutation(new Text(cl.getArgs()[0].getBytes(Shell.CHARSET)));
-    Text colf = new Text(cl.getArgs()[1].getBytes(Shell.CHARSET));
-    Text colq = new Text(cl.getArgs()[2].getBytes(Shell.CHARSET));
+    final Mutation m = new Mutation(new Text(cl.getArgs()[0].getBytes(Shell.CHARSET)));
+    final Text colf = new Text(cl.getArgs()[1].getBytes(Shell.CHARSET));
+    final Text colq = new Text(cl.getArgs()[2].getBytes(Shell.CHARSET));
     
     if (cl.hasOption(deleteOptAuths.getOpt())) {
-      ColumnVisibility le = new ColumnVisibility(cl.getOptionValue(deleteOptAuths.getOpt()));
-      if (cl.hasOption(timestampOpt.getOpt()))
+      final ColumnVisibility le = new ColumnVisibility(cl.getOptionValue(deleteOptAuths.getOpt()));
+      if (cl.hasOption(timestampOpt.getOpt())) {
         m.putDelete(colf, colq, le, Long.parseLong(cl.getOptionValue(timestampOpt.getOpt())));
-      else
+      } else {
         m.putDelete(colf, colq, le);
-    } else if (cl.hasOption(timestampOpt.getOpt()))
+      }
+    } else if (cl.hasOption(timestampOpt.getOpt())) {
       m.putDelete(colf, colq, Long.parseLong(cl.getOptionValue(timestampOpt.getOpt())));
-    else
+    } else {
       m.putDelete(colf, colq);
-    
-    BatchWriter bw = shellState.getConnector().createBatchWriter(shellState.getTableName(), m.estimatedMemoryUsed() + 0L, 0L, 1);
+    }
+    final BatchWriter bw = shellState.getConnector().createBatchWriter(shellState.getTableName(), m.estimatedMemoryUsed() + 0L, 0L, 1);
     bw.addMutation(m);
     bw.close();
     return 0;
@@ -72,7 +73,7 @@ public class DeleteCommand extends Comma
   
   @Override
   public Options getOptions() {
-    Options o = new Options();
+    final Options o = new Options();
     
     deleteOptAuths = new Option("l", "visibility-label", true, "formatted visibility");
     deleteOptAuths.setArgName("expression");

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DeleteIterCommand.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DeleteIterCommand.java?rev=1383631&r1=1383630&r2=1383631&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DeleteIterCommand.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DeleteIterCommand.java Tue Sep 11 21:50:30 2012
@@ -28,24 +28,28 @@ import org.apache.commons.cli.Options;
 public class DeleteIterCommand extends Command {
   private Option mincScopeOpt, majcScopeOpt, scanScopeOpt, nameOpt;
   
-  public int execute(String fullCommand, CommandLine cl, Shell shellState) throws Exception {
-    String tableName = OptUtil.getTableOpt(cl, shellState);
+  public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws Exception {
+    final String tableName = OptUtil.getTableOpt(cl, shellState);
     
-    String name = cl.getOptionValue(nameOpt.getOpt());
+    final String name = cl.getOptionValue(nameOpt.getOpt());
     if (!shellState.getConnector().tableOperations().listIterators(tableName).containsKey(name)) {
       Shell.log.warn("no iterators found that match your criteria");
       return 0;
     }
     
-    EnumSet<IteratorScope> scopes = EnumSet.noneOf(IteratorScope.class);
-    if (cl.hasOption(mincScopeOpt.getOpt()))
+    final EnumSet<IteratorScope> scopes = EnumSet.noneOf(IteratorScope.class);
+    if (cl.hasOption(mincScopeOpt.getOpt())) {
       scopes.add(IteratorScope.minc);
-    if (cl.hasOption(majcScopeOpt.getOpt()))
+    }
+    if (cl.hasOption(majcScopeOpt.getOpt())) {
       scopes.add(IteratorScope.majc);
-    if (cl.hasOption(scanScopeOpt.getOpt()))
+    }
+    if (cl.hasOption(scanScopeOpt.getOpt())) {
       scopes.add(IteratorScope.scan);
-    if (scopes.isEmpty())
+    }
+    if (scopes.isEmpty()) {
       throw new IllegalArgumentException("You must select at least one scope to configure");
+    }
     shellState.getConnector().tableOperations().removeIterator(tableName, name, scopes);
     return 0;
   }
@@ -56,7 +60,7 @@ public class DeleteIterCommand extends C
   }
   
   public Options getOptions() {
-    Options o = new Options();
+    final Options o = new Options();
     
     nameOpt = new Option("n", "name", true, "iterator to delete");
     nameOpt.setArgName("itername");

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DeleteManyCommand.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DeleteManyCommand.java?rev=1383631&r1=1383630&r2=1383631&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DeleteManyCommand.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DeleteManyCommand.java Tue Sep 11 21:50:30 2012
@@ -31,14 +31,14 @@ import org.apache.commons.cli.Options;
 public class DeleteManyCommand extends ScanCommand {
   private Option forceOpt;
   
-  public int execute(String fullCommand, CommandLine cl, Shell shellState) throws Exception {
-    String tableName = OptUtil.getTableOpt(cl, shellState);
+  public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws Exception {
+    final String tableName = OptUtil.getTableOpt(cl, shellState);
     
-    ScanInterpreter interpeter = getInterpreter(cl, tableName, shellState);
+    final ScanInterpreter interpeter = getInterpreter(cl, tableName, shellState);
 
     // handle first argument, if present, the authorizations list to
     // scan with
-    Authorizations auths = getAuths(cl, shellState);
+    final Authorizations auths = getAuths(cl, shellState);
     final Scanner scanner = shellState.getConnector().createScanner(tableName, auths);
     
     scanner.addScanIterator(new IteratorSetting(Integer.MAX_VALUE, "NOVALUE", SortedKeyIterator.class));
@@ -50,7 +50,7 @@ public class DeleteManyCommand extends S
     fetchColumns(cl, scanner, interpeter);
     
     // output / delete the records
-    BatchWriter writer = shellState.getConnector().createBatchWriter(tableName, 1024 * 1024, 1000L, 4);
+    final BatchWriter writer = shellState.getConnector().createBatchWriter(tableName, 1024 * 1024, 1000L, 4);
     shellState.printLines(new DeleterFormatter(writer, scanner, cl.hasOption(timestampOpt.getOpt()), shellState, cl.hasOption(forceOpt.getOpt())), false);
     
     return 0;
@@ -64,7 +64,7 @@ public class DeleteManyCommand extends S
   @Override
   public Options getOptions() {
     forceOpt = new Option("f", "force", false, "force deletion without prompting");
-    Options opts = super.getOptions();
+    final Options opts = super.getOptions();
     opts.addOption(forceOpt);
     opts.addOption(OptUtil.tableOpt("table to delete entries from"));
     return opts;

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DeleteRowsCommand.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DeleteRowsCommand.java?rev=1383631&r1=1383630&r2=1383631&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DeleteRowsCommand.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DeleteRowsCommand.java Tue Sep 11 21:50:30 2012
@@ -27,10 +27,10 @@ public class DeleteRowsCommand extends C
   private Option forceOpt;
   
   @Override
-  public int execute(String fullCommand, CommandLine cl, final Shell shellState) throws Exception {
-    String tableName = OptUtil.getTableOpt(cl, shellState);
-    Text startRow = OptUtil.getStartRow(cl);
-    Text endRow = OptUtil.getEndRow(cl);
+  public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws Exception {
+    final String tableName = OptUtil.getTableOpt(cl, shellState);
+    final Text startRow = OptUtil.getStartRow(cl);
+    final Text endRow = OptUtil.getEndRow(cl);
     if (!cl.hasOption(forceOpt.getOpt()) && (startRow == null || endRow == null)) {
       shellState.getReader().printString("Not deleting unbounded range. Specify both ends, or use --force\n");
       return 1;
@@ -51,7 +51,7 @@ public class DeleteRowsCommand extends C
   
   @Override
   public Options getOptions() {
-    Options o = new Options();
+    final Options o = new Options();
     forceOpt = new Option("f", "force", false, "delete data even if start or end are not specified");
     o.addOption(OptUtil.startRowOpt());
     o.addOption(OptUtil.endRowOpt());

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DeleteScanIterCommand.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DeleteScanIterCommand.java?rev=1383631&r1=1383630&r2=1383631&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DeleteScanIterCommand.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DeleteScanIterCommand.java Tue Sep 11 21:50:30 2012
@@ -31,18 +31,19 @@ public class DeleteScanIterCommand exten
   private Option nameOpt, allOpt;
   
   @Override
-  public int execute(String fullCommand, CommandLine cl, Shell shellState) throws Exception {
-    String tableName = OptUtil.getTableOpt(cl, shellState);
+  public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws Exception {
+    final String tableName = OptUtil.getTableOpt(cl, shellState);
     
     if (cl.hasOption(allOpt.getOpt())) {
-      List<IteratorSetting> tableScanIterators = shellState.scanIteratorOptions.remove(tableName);
-      if (tableScanIterators == null)
+      final List<IteratorSetting> tableScanIterators = shellState.scanIteratorOptions.remove(tableName);
+      if (tableScanIterators == null) {
         Shell.log.info("No scan iterators set on table " + tableName);
-      else
+      } else {
         Shell.log.info("Removed the following scan iterators from table " + tableName + ":" + tableScanIterators);
+      }
     } else if (cl.hasOption(nameOpt.getOpt())) {
-      String name = cl.getOptionValue(nameOpt.getOpt());
-      List<IteratorSetting> tableScanIterators = shellState.scanIteratorOptions.get(tableName);
+      final String name = cl.getOptionValue(nameOpt.getOpt());
+      final List<IteratorSetting> tableScanIterators = shellState.scanIteratorOptions.get(tableName);
       if (tableScanIterators != null) {
         boolean found = false;
         for (Iterator<IteratorSetting> iter = tableScanIterators.iterator(); iter.hasNext();) {
@@ -52,12 +53,13 @@ public class DeleteScanIterCommand exten
             break;
           }
         }
-        if (!found)
+        if (!found) {
           Shell.log.info("No iterator named " + name + " found for table " + tableName);
-        else {
+        } else {
           Shell.log.info("Removed scan iterator " + name + " from table " + tableName + " (" + shellState.scanIteratorOptions.get(tableName).size() + " left)");
-          if (shellState.scanIteratorOptions.get(tableName).size() == 0)
+          if (shellState.scanIteratorOptions.get(tableName).size() == 0) {
             shellState.scanIteratorOptions.remove(tableName);
+          }
         }
       } else {
         Shell.log.info("No iterator named " + name + " found for table " + tableName);
@@ -74,7 +76,7 @@ public class DeleteScanIterCommand exten
   
   @Override
   public Options getOptions() {
-    Options o = new Options();
+    final Options o = new Options();
     
     OptionGroup nameGroup = new OptionGroup();
     

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DeleteTableCommand.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DeleteTableCommand.java?rev=1383631&r1=1383630&r2=1383631&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DeleteTableCommand.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DeleteTableCommand.java Tue Sep 11 21:50:30 2012
@@ -24,11 +24,12 @@ import org.apache.commons.cli.Options;
 public class DeleteTableCommand extends TableOperation {
   private Option forceOpt;
   
-  public int execute(String fullCommand, CommandLine cl, Shell shellState) throws Exception {
-    if (cl.hasOption(forceOpt.getOpt()))
+  public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws Exception {
+    if (cl.hasOption(forceOpt.getOpt())) {
       super.force();
-    else
+    } else {
       super.noForce();
+    }
     return super.execute(fullCommand, cl, shellState);
   }
   
@@ -38,17 +39,18 @@ public class DeleteTableCommand extends 
   }
   
   @Override
-  protected void doTableOp(Shell shellState, String tableName) throws Exception {
+  protected void doTableOp(final Shell shellState, final String tableName) throws Exception {
     shellState.getConnector().tableOperations().delete(tableName);
     shellState.getReader().printString("Table: [" + tableName + "] has been deleted. \n");
-    if (shellState.getTableName().equals(tableName))
+    if (shellState.getTableName().equals(tableName)) {
       shellState.setTableName("");
+    }
   }
   
   @Override
   public Options getOptions() {
     forceOpt = new Option("f", "force", false, "force deletion without prompting");
-    Options opts = super.getOptions();
+    final Options opts = super.getOptions();
     
     opts.addOption(forceOpt);
     return opts;

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DropUserCommand.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DropUserCommand.java?rev=1383631&r1=1383630&r2=1383631&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DropUserCommand.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DropUserCommand.java Tue Sep 11 21:50:30 2012
@@ -29,10 +29,11 @@ import org.apache.commons.cli.CommandLin
 
 public class DropUserCommand extends Command {
   @Override
-  public int execute(String fullCommand, CommandLine cl, Shell shellState) throws AccumuloException, AccumuloSecurityException {
-    String user = cl.getArgs()[0];
-    if (shellState.getConnector().whoami().equals(user))
+  public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws AccumuloException, AccumuloSecurityException {
+    final String user = cl.getArgs()[0];
+    if (shellState.getConnector().whoami().equals(user)) {
       throw new BadArgumentException("You cannot delete yourself", fullCommand, fullCommand.indexOf(user));
+    }
     shellState.getConnector().securityOperations().dropUser(user);
     Shell.log.debug("Deleted user " + user);
     return 0;
@@ -49,7 +50,7 @@ public class DropUserCommand extends Com
   }
   
   @Override
-  public void registerCompletion(Token root, Map<Command.CompletionSet,Set<String>> completionSet) {
+  public void registerCompletion(final Token root, final Map<Command.CompletionSet,Set<String>> completionSet) {
     registerCompletionForUsers(root, completionSet);
   }
   

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/EGrepCommand.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/EGrepCommand.java?rev=1383631&r1=1383630&r2=1383631&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/EGrepCommand.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/EGrepCommand.java Tue Sep 11 21:50:30 2012
@@ -24,11 +24,11 @@ import org.apache.accumulo.core.iterator
 
 public class EGrepCommand extends GrepCommand {
   @Override
-  protected void setUpIterator(int prio, String name, String term, BatchScanner scanner) throws IOException {
-    if (prio < 0)
+  protected void setUpIterator(final int prio, final String name, final String term, final BatchScanner scanner) throws IOException {
+    if (prio < 0) {
       throw new IllegalArgumentException("Priority < 0 " + prio);
-    
-    IteratorSetting si = new IteratorSetting(prio, name, RegExFilter.class);
+    }
+    final IteratorSetting si = new IteratorSetting(prio, name, RegExFilter.class);
     RegExFilter.setRegexs(si, term, term, term, term, true);
     scanner.addScanIterator(si);
   }

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/EscapeTokenizer.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/EscapeTokenizer.java?rev=1383631&r1=1383630&r2=1383631&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/EscapeTokenizer.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/EscapeTokenizer.java Tue Sep 11 21:50:30 2012
@@ -36,16 +36,16 @@ public class EscapeTokenizer implements 
   
   private List<String> tokens;
   
-  public EscapeTokenizer(String line, String delimeters) {
+  public EscapeTokenizer(final String line, final String delimeters) {
     this.tokens = new ArrayList<String>();
     preprocess(line, delimeters);
   }
   
-  private void preprocess(String line, String delimeters) {
-    StringTokenizer st = new StringTokenizer(line, delimeters, true);
+  private void preprocess(final String line, final String delimeters) {
+    final StringTokenizer st = new StringTokenizer(line, delimeters, true);
     boolean inEscape = false;
     String current = "", prev = "";
-    List<String> toks = new ArrayList<String>();
+    final List<String> toks = new ArrayList<String>();
     
     while (st.hasMoreTokens()) {
       current = st.nextToken();
@@ -54,20 +54,23 @@ public class EscapeTokenizer implements 
         inEscape = false;
       } else {
         inEscape = current.endsWith("\\");
-        if (inEscape)
+        if (inEscape) {
           prev = current.substring(0, current.length() - 1);
-        else {
+        } else {
           if (current.length() == 1 && delimeters.contains(current)) {
-            if (!prev.isEmpty())
+            if (!prev.isEmpty()) {
               toks.add(prev);
-          } else
+            }
+          } else {
             toks.add(prev + current);
+          }
           prev = "";
         }
       }
     }
-    if (!prev.isEmpty())
+    if (!prev.isEmpty()) {
       toks.add(prev);
+    }
     this.tokens = toks;
   }
   

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ExecfileCommand.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ExecfileCommand.java?rev=1383631&r1=1383630&r2=1383631&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ExecfileCommand.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ExecfileCommand.java Tue Sep 11 21:50:30 2012
@@ -17,6 +17,7 @@
 package org.apache.accumulo.core.util.shell.commands;
 
 import java.io.File;
+import java.util.Scanner;
 
 import org.apache.accumulo.core.util.shell.Shell;
 import org.apache.accumulo.core.util.shell.Shell.Command;
@@ -33,10 +34,11 @@ public class ExecfileCommand extends Com
   }
   
   @Override
-  public int execute(String fullCommand, CommandLine cl, Shell shellState) throws Exception {
-    java.util.Scanner scanner = new java.util.Scanner(new File(cl.getArgs()[0]));
-    while (scanner.hasNextLine())
+  public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws Exception {
+    Scanner scanner = new Scanner(new File(cl.getArgs()[0]));
+    while (scanner.hasNextLine()) {
       shellState.execCommand(scanner.nextLine(), true, cl.hasOption(verboseOption.getOpt()));
+    }
     return 0;
   }
   
@@ -52,7 +54,7 @@ public class ExecfileCommand extends Com
   
   @Override
   public Options getOptions() {
-    Options opts = new Options();
+    final Options opts = new Options();
     verboseOption = new Option("v", "verbose", false, "display command prompt as commands are executed");
     opts.addOption(verboseOption);
     return opts;

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ExitCommand.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ExitCommand.java?rev=1383631&r1=1383630&r2=1383631&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ExitCommand.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ExitCommand.java Tue Sep 11 21:50:30 2012
@@ -22,7 +22,7 @@ import org.apache.commons.cli.CommandLin
 
 public class ExitCommand extends Command {
   @Override
-  public int execute(String fullCommand, CommandLine cl, Shell shellState) {
+  public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) {
     shellState.setExit(true);
     return 0;
   }

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ExportTableCommand.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ExportTableCommand.java?rev=1383631&r1=1383630&r2=1383631&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ExportTableCommand.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ExportTableCommand.java Tue Sep 11 21:50:30 2012
@@ -35,10 +35,10 @@ public class ExportTableCommand extends 
   private Option tableOpt;
 
   @Override
-  public int execute(String fullCommand, CommandLine cl, Shell shellState) throws AccumuloException, AccumuloSecurityException, TableNotFoundException,
+  public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws AccumuloException, AccumuloSecurityException, TableNotFoundException,
       TableExistsException {
     
-    String tableName = OptUtil.getTableOpt(cl, shellState);
+    final String tableName = OptUtil.getTableOpt(cl, shellState);
 
     shellState.getConnector().tableOperations().exportTable(tableName, cl.getArgs()[0]);
     return 0;
@@ -51,7 +51,7 @@ public class ExportTableCommand extends 
   
   @Override
   public Options getOptions() {
-    Options o = new Options();
+    final Options o = new Options();
     
     tableOpt = new Option(Shell.tableOption, "table", true, "table to export");
     
@@ -67,7 +67,7 @@ public class ExportTableCommand extends 
     return "exports a table";
   }
   
-  public void registerCompletion(Token root, Map<Command.CompletionSet,Set<String>> completionSet) {
+  public void registerCompletion(final Token root, final Map<Command.CompletionSet,Set<String>> completionSet) {
     registerCompletionForTables(root, completionSet);
   }
   

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/FlushCommand.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/FlushCommand.java?rev=1383631&r1=1383630&r2=1383631&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/FlushCommand.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/FlushCommand.java Tue Sep 11 21:50:30 2012
@@ -38,7 +38,7 @@ public class FlushCommand extends TableO
     return "flushes a tables data that is currently in memory to disk";
   }
   
-  protected void doTableOp(Shell shellState, String tableName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
+  protected void doTableOp(final Shell shellState, final String tableName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
     shellState.getConnector().tableOperations().flush(tableName, startRow, endRow, wait);
     Shell.log.info("Flush of table " + tableName + (wait ? " completed." : " initiated..."));
     if (tableName.equals(Constants.METADATA_TABLE_NAME)) {
@@ -50,7 +50,7 @@ public class FlushCommand extends TableO
   }
   
   @Override
-  public int execute(String fullCommand, CommandLine cl, Shell shellState) throws Exception {
+  public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws Exception {
     wait = cl.hasOption(waitOpt.getLongOpt());
     startRow = OptUtil.getStartRow(cl);
     endRow = OptUtil.getEndRow(cl);
@@ -59,7 +59,7 @@ public class FlushCommand extends TableO
   
   @Override
   public Options getOptions() {
-    Options opts = super.getOptions();
+    final Options opts = super.getOptions();
     waitOpt = new Option("w", "wait", false, "wait for flush to finish");
     opts.addOption(waitOpt);
     opts.addOption(OptUtil.startRowOpt());

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/FormatterCommand.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/FormatterCommand.java?rev=1383631&r1=1383630&r2=1383631&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/FormatterCommand.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/FormatterCommand.java Tue Sep 11 21:50:30 2012
@@ -38,13 +38,13 @@ public class FormatterCommand extends Sh
     return "specifies a formatter to use for displaying table entries";
   }
 
-  public static Class<? extends Formatter> getCurrentFormatter(String tableName, Shell shellState) {
+  public static Class<? extends Formatter> getCurrentFormatter(final String tableName, final Shell shellState) {
     return ShellPluginConfigurationCommand.getPluginClass(tableName, shellState, Formatter.class, Property.TABLE_FORMATTER_CLASS);
   }
   
   @Override
   public Options getOptions() {
-    Options options = super.getOptions();
+    final Options options = super.getOptions();
     
     interpeterOption = new Option("i", "interpeter", false, "configure class as interpreter also");
     
@@ -53,15 +53,17 @@ public class FormatterCommand extends Sh
     return options;
   }
   
-  protected void setPlugin(CommandLine cl, Shell shellState, String tableName, String className) throws AccumuloException, AccumuloSecurityException {
+  protected void setPlugin(final CommandLine cl, final Shell shellState, final String tableName, final String className) throws AccumuloException, AccumuloSecurityException {
     super.setPlugin(cl, shellState, tableName, className);
-    if (cl.hasOption(interpeterOption.getOpt()))
+    if (cl.hasOption(interpeterOption.getOpt())) {
       shellState.getConnector().tableOperations().setProperty(tableName, Property.TABLE_INTERPRETER_CLASS.toString(), className);
+    }
   }
   
-  protected void removePlugin(CommandLine cl, Shell shellState, String tableName) throws AccumuloException, AccumuloSecurityException {
+  protected void removePlugin(final CommandLine cl, final Shell shellState, final String tableName) throws AccumuloException, AccumuloSecurityException {
     super.removePlugin(cl, shellState, tableName);
-    if (cl.hasOption(interpeterOption.getOpt()))
+    if (cl.hasOption(interpeterOption.getOpt())) {
       shellState.getConnector().tableOperations().removeProperty(tableName, Property.TABLE_INTERPRETER_CLASS.toString());
+    }
   }
 }

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/GetAuthsCommand.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/GetAuthsCommand.java?rev=1383631&r1=1383630&r2=1383631&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/GetAuthsCommand.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/GetAuthsCommand.java Tue Sep 11 21:50:30 2012
@@ -30,8 +30,8 @@ public class GetAuthsCommand extends Com
   private Option userOpt;
   
   @Override
-  public int execute(String fullCommand, CommandLine cl, Shell shellState) throws AccumuloException, AccumuloSecurityException, IOException {
-    String user = cl.getOptionValue(userOpt.getOpt(), shellState.getConnector().whoami());
+  public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws AccumuloException, AccumuloSecurityException, IOException {
+    final String user = cl.getOptionValue(userOpt.getOpt(), shellState.getConnector().whoami());
     shellState.getReader().printString(shellState.getConnector().securityOperations().getUserAuthorizations(user) + "\n");
     return 0;
   }
@@ -43,7 +43,7 @@ public class GetAuthsCommand extends Com
   
   @Override
   public Options getOptions() {
-    Options o = new Options();
+    final Options o = new Options();
     userOpt = new Option(Shell.userOption, "user", true, "user to operate on");
     userOpt.setArgName("user");
     o.addOption(userOpt);

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/GetGroupsCommand.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/GetGroupsCommand.java?rev=1383631&r1=1383630&r2=1383631&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/GetGroupsCommand.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/GetGroupsCommand.java Tue Sep 11 21:50:30 2012
@@ -30,14 +30,14 @@ import org.apache.hadoop.io.Text;
 public class GetGroupsCommand extends Command {
   
   @Override
-  public int execute(String fullCommand, CommandLine cl, Shell shellState) throws Exception {
-    String tableName = OptUtil.getTableOpt(cl, shellState);
+  public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws Exception {
+    final String tableName = OptUtil.getTableOpt(cl, shellState);
     
-    Map<String,Set<Text>> groups = shellState.getConnector().tableOperations().getLocalityGroups(tableName);
+    final Map<String,Set<Text>> groups = shellState.getConnector().tableOperations().getLocalityGroups(tableName);
     
-    for (Entry<String,Set<Text>> entry : groups.entrySet())
+    for (Entry<String,Set<Text>> entry : groups.entrySet()) {
       shellState.getReader().printString(entry.getKey() + "=" + LocalityGroupUtil.encodeColumnFamilies(entry.getValue()) + "\n");
-    
+    }
     return 0;
   }
   
@@ -53,7 +53,7 @@ public class GetGroupsCommand extends Co
   
   @Override
   public Options getOptions() {
-    Options opts = new Options();
+    final Options opts = new Options();
     opts.addOption(OptUtil.tableOpt("table to fetch locality groups from"));
     return opts;
   }

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/GetSplitsCommand.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/GetSplitsCommand.java?rev=1383631&r1=1383630&r2=1383631&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/GetSplitsCommand.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/GetSplitsCommand.java Tue Sep 11 21:50:30 2012
@@ -49,9 +49,9 @@ public class GetSplitsCommand extends Co
   private Option outputFileOpt, maxSplitsOpt, base64Opt, verboseOpt;
   
   @Override
-  public int execute(String fullCommand, CommandLine cl, final Shell shellState) throws IOException, AccumuloException, AccumuloSecurityException,
+  public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws IOException, AccumuloException, AccumuloSecurityException,
       TableNotFoundException {
-    String tableName = OptUtil.getTableOpt(cl, shellState);
+    final String tableName = OptUtil.getTableOpt(cl, shellState);
     
     final String outputFile = cl.getOptionValue(outputFileOpt.getOpt());
     final String m = cl.getOptionValue(maxSplitsOpt.getOpt());
@@ -59,7 +59,7 @@ public class GetSplitsCommand extends Co
     final boolean encode = cl.hasOption(base64Opt.getOpt());
     final boolean verbose = cl.hasOption(verboseOpt.getOpt());
     
-    PrintLine p = outputFile == null ? new PrintShell(shellState.getReader()) : new PrintFile(outputFile);
+    final PrintLine p = outputFile == null ? new PrintShell(shellState.getReader()) : new PrintFile(outputFile);
     
     try {
       if (!verbose) {
@@ -94,14 +94,15 @@ public class GetSplitsCommand extends Co
     return 0;
   }
   
-  private static String encode(boolean encode, Text text) {
-    if (text == null)
+  private static String encode(final boolean encode, final Text text) {
+    if (text == null) {
       return null;
+    }
     BinaryFormatter.getlength(text.getLength());
     return encode ? new String(Base64.encodeBase64(TextUtil.getBytes(text))) : BinaryFormatter.appendText(new StringBuilder(), text).toString();
   }
   
-  private static String obscuredTabletName(KeyExtent extent) {
+  private static String obscuredTabletName(final KeyExtent extent) {
     MessageDigest digester;
     try {
       digester = MessageDigest.getInstance("MD5");
@@ -126,7 +127,7 @@ public class GetSplitsCommand extends Co
   
   @Override
   public Options getOptions() {
-    Options opts = new Options();
+    final Options opts = new Options();
     
     outputFileOpt = new Option("o", "output", true, "local file to write the splits to");
     outputFileOpt.setArgName("file");

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/GrantCommand.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/GrantCommand.java?rev=1383631&r1=1383630&r2=1383631&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/GrantCommand.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/GrantCommand.java Tue Sep 11 21:50:30 2012
@@ -40,7 +40,7 @@ public class GrantCommand extends TableO
   private String[] permission;
   
   @Override
-  public int execute(String fullCommand, CommandLine cl, Shell shellState) throws Exception {
+  public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws Exception {
     user = cl.hasOption(userOpt.getOpt()) ? cl.getOptionValue(userOpt.getOpt()) : shellState.getConnector().whoami();
     
     permission = cl.getArgs()[0].split("\\.", 2);
@@ -60,7 +60,7 @@ public class GrantCommand extends TableO
   }
   
   @Override
-  protected void doTableOp(Shell shellState, String tableName) throws Exception {
+  protected void doTableOp(final Shell shellState, final String tableName) throws Exception {
     try {
       shellState.getConnector().securityOperations().grantTablePermission(user, tableName, TablePermission.valueOf(permission[1]));
       Shell.log.debug("Granted " + user + " the " + permission[1] + " permission on table " + tableName);
@@ -80,8 +80,8 @@ public class GrantCommand extends TableO
   }
   
   @Override
-  public void registerCompletion(Token root, Map<Command.CompletionSet,Set<String>> completionSet) {
-    Token cmd = new Token(getName());
+  public void registerCompletion(final Token root, final Map<Command.CompletionSet,Set<String>> completionSet) {
+    final Token cmd = new Token(getName());
     cmd.addSubcommand(new Token(TablePermission.printableValues()));
     cmd.addSubcommand(new Token(SystemPermission.printableValues()));
     root.addSubcommand(cmd);
@@ -90,9 +90,9 @@ public class GrantCommand extends TableO
   @Override
   public Options getOptions() {
     super.getOptions();
-    Options o = new Options();
+    final Options o = new Options();
     
-    OptionGroup group = new OptionGroup();
+    final OptionGroup group = new OptionGroup();
     
     systemOpt = new Option("s", "system", false, "grant a system permission");
     

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/GrepCommand.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/GrepCommand.java?rev=1383631&r1=1383630&r2=1383631&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/GrepCommand.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/GrepCommand.java Tue Sep 11 21:50:30 2012
@@ -35,15 +35,15 @@ public class GrepCommand extends ScanCom
   
   private Option numThreadsOpt;
   
-  public int execute(String fullCommand, CommandLine cl, Shell shellState) throws Exception {
+  public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws Exception {
     
-    String tableName = OptUtil.getTableOpt(cl, shellState);
+    final String tableName = OptUtil.getTableOpt(cl, shellState);
     
-    if (cl.getArgList().isEmpty())
+    if (cl.getArgList().isEmpty()) {
       throw new MissingArgumentException("No terms specified");
-    
-    Class<? extends Formatter> formatter = getFormatter(cl, tableName, shellState);
-    ScanInterpreter interpeter = getInterpreter(cl, tableName, shellState);
+    }
+    final Class<? extends Formatter> formatter = getFormatter(cl, tableName, shellState);
+    final ScanInterpreter interpeter = getInterpreter(cl, tableName, shellState);
 
     // handle first argument, if present, the authorizations list to
     // scan with
@@ -51,13 +51,13 @@ public class GrepCommand extends ScanCom
     if (cl.hasOption(numThreadsOpt.getOpt())) {
       numThreads = Integer.parseInt(cl.getOptionValue(numThreadsOpt.getOpt()));
     }
-    Authorizations auths = getAuths(cl, shellState);
-    BatchScanner scanner = shellState.getConnector().createBatchScanner(tableName, auths, numThreads);
+    final Authorizations auths = getAuths(cl, shellState);
+    final BatchScanner scanner = shellState.getConnector().createBatchScanner(tableName, auths, numThreads);
     scanner.setRanges(Collections.singletonList(getRange(cl, interpeter)));
     
-    for (int i = 0; i < cl.getArgs().length; i++)
+    for (int i = 0; i < cl.getArgs().length; i++) {
       setUpIterator(Integer.MAX_VALUE - cl.getArgs().length + i, "grep" + i, cl.getArgs()[i], scanner);
-    
+    }    
     try {
       // handle columns
       fetchColumns(cl, scanner, interpeter);
@@ -71,11 +71,11 @@ public class GrepCommand extends ScanCom
     return 0;
   }
   
-  protected void setUpIterator(int prio, String name, String term, BatchScanner scanner) throws IOException {
-    if (prio < 0)
+  protected void setUpIterator(final int prio, final String name, final String term, final BatchScanner scanner) throws IOException {
+    if (prio < 0) {
       throw new IllegalArgumentException("Priority < 0 " + prio);
-    
-    IteratorSetting grep = new IteratorSetting(prio, name, GrepIterator.class);
+    }    
+    final IteratorSetting grep = new IteratorSetting(prio, name, GrepIterator.class);
     GrepIterator.setTerm(grep, term);
     scanner.addScanIterator(grep);
   }
@@ -87,7 +87,7 @@ public class GrepCommand extends ScanCom
   
   @Override
   public Options getOptions() {
-    Options opts = super.getOptions();
+    final Options opts = super.getOptions();
     numThreadsOpt = new Option("nt", "num-threads", true, "number of threads to use");
     opts.addOption(numThreadsOpt);
     return opts;

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/HelpCommand.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/HelpCommand.java?rev=1383631&r1=1383630&r2=1383631&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/HelpCommand.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/HelpCommand.java Tue Sep 11 21:50:30 2012
@@ -34,26 +34,29 @@ public class HelpCommand extends Command
   private Option disablePaginationOpt;
   private Option noWrapOpt;
   
-  public int execute(String fullCommand, CommandLine cl, Shell shellState) throws ShellCommandException, IOException {
+  public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws ShellCommandException, IOException {
     int numColumns = shellState.getReader().getTermwidth();
-    if (cl.hasOption(noWrapOpt.getOpt()))
+    if (cl.hasOption(noWrapOpt.getOpt())) {
       numColumns = Integer.MAX_VALUE;
-    
+    }
     // print help summary
     if (cl.getArgs().length == 0) {
       int i = 0;
-      for (String cmd : shellState.commandFactory.keySet())
+      for (String cmd : shellState.commandFactory.keySet()) {
         i = Math.max(i, cmd.length());
-      if (numColumns < 40)
+      }
+      if (numColumns < 40) {
         throw new IllegalArgumentException("numColumns must be at least 40 (was " + numColumns + ")");
-      ArrayList<String> output = new ArrayList<String>();
+      }
+      final ArrayList<String> output = new ArrayList<String>();
       for (Entry<String,Command[]> cmdGroup : shellState.commandGrouping.entrySet()) {
         output.add(cmdGroup.getKey());
         for (Command c : cmdGroup.getValue()) {
           String n = c.getName();
           String s = c.description();
-          if (s == null)
+          if (s == null) {
             s = "";
+          }
           int beginIndex = 0;
           int endIndex = s.length();
           while (beginIndex < endIndex && s.charAt(beginIndex) == ' ')
@@ -73,8 +76,9 @@ public class HelpCommand extends Command
             }
             n = "";
             endIndex = s.length();
-            while (beginIndex < endIndex && s.charAt(beginIndex) == ' ')
+            while (beginIndex < endIndex && s.charAt(beginIndex) == ' ') {
               beginIndex++;
+            }
           }
           output.add(String.format("%-" + i + "s  %s  %s", n, dash, s.substring(beginIndex, endIndex)));
         }
@@ -85,11 +89,12 @@ public class HelpCommand extends Command
     
     // print help for every command on command line
     for (String cmd : cl.getArgs()) {
-      Command c = shellState.commandFactory.get(cmd);
-      if (c == null)
+      final Command c = shellState.commandFactory.get(cmd);
+      if (c == null) {
         shellState.getReader().printString(String.format("Unknown command \"%s\".  Enter \"help\" for a list possible commands.\n", cmd));
-      else
+      } else {
         c.printHelp(shellState, numColumns);
+      }
     }
     return 0;
   }
@@ -98,13 +103,13 @@ public class HelpCommand extends Command
     return "provides information about the available commands";
   }
   
-  public void registerCompletion(Token root, Map<Command.CompletionSet,Set<String>> special) {
+  public void registerCompletion(final Token root, final Map<Command.CompletionSet,Set<String>> special) {
     registerCompletionForCommands(root, special);
   }
   
   @Override
   public Options getOptions() {
-    Options o = new Options();
+    final Options o = new Options();
     disablePaginationOpt = new Option("np", "no-pagination", false, "disable pagination of output");
     o.addOption(disablePaginationOpt);
     noWrapOpt = new Option("nw", "no-wrap", false, "disable wrapping of output");

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/HiddenCommand.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/HiddenCommand.java?rev=1383631&r1=1383630&r2=1383631&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/HiddenCommand.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/HiddenCommand.java Tue Sep 11 21:50:30 2012
@@ -35,7 +35,7 @@ public class HiddenCommand extends Comma
   }
   
   @Override
-  public int execute(String fullCommand, CommandLine cl, Shell shellState) throws Exception {
+  public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws Exception {
     if (rand.nextInt(10) == 0) {
       shellState.getReader().beep();
       shellState.getReader().printNewline();
@@ -44,9 +44,9 @@ public class HiddenCommand extends Comma
               + "ICAvICB8Xy58Xy4gIFwKICAvIC98ICAgICAgfFwgXAogfCB8IHwgfFwvfCB8IHwgfAogfF98IHwgfCAgfCB8IHxffAogICAgIC8gIF9fICBcCiAgICAvICAv"
               + "ICBcICBcCiAgIC8gIC8gICAgXCAgXF8KIHwvICAvICAgICAgXCB8IHwKIHxfXy8gICAgICAgIFx8X3wK").getBytes())));
       shellState.getReader().printNewline();
-    } else
+    } else {
       throw new ShellCommandException(ErrorCode.UNRECOGNIZED_COMMAND, getName());
-    
+    }
     return 0;
   }
   
@@ -57,6 +57,6 @@ public class HiddenCommand extends Comma
   
   @Override
   public String getName() {
-    return new String("accvmvlo");
+    return "accvmvlo";
   }
 }

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/HistoryCommand.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/HistoryCommand.java?rev=1383631&r1=1383630&r2=1383631&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/HistoryCommand.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/HistoryCommand.java Tue Sep 11 21:50:30 2012
@@ -34,17 +34,17 @@ public class HistoryCommand extends Comm
   private Option clearHist;
   
   @Override
-  public int execute(String fullCommand, CommandLine cl, Shell shellState) throws Exception {
+  public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws Exception {
     
-    String histDir = System.getenv("HOME") + "/.accumulo";
+    final String histDir = System.getenv("HOME") + "/.accumulo";
     int counter = 0;
     
     if (cl.hasOption(clearHist.getOpt())) {
       
       try {
         
-        FileWriter outFile = new FileWriter(histDir + "/shell_history.txt");
-        PrintWriter out = new PrintWriter(outFile);
+        final FileWriter outFile = new FileWriter(histDir + "/shell_history.txt");
+        final PrintWriter out = new PrintWriter(outFile);
         out.close();
         
       } catch (IOException e) {
@@ -55,7 +55,7 @@ public class HistoryCommand extends Comm
     
     else {
       try {
-        BufferedReader in = new BufferedReader(new FileReader(histDir + "/shell_history.txt"));
+        final BufferedReader in = new BufferedReader(new FileReader(histDir + "/shell_history.txt"));
         String Line;
         try {
           Line = in.readLine();
@@ -90,7 +90,7 @@ public class HistoryCommand extends Comm
   
   @Override
   public Options getOptions() {
-    Options o = new Options();
+    final Options o = new Options();
     
     clearHist = new Option("c", "clear", false, "clear history file");
     clearHist.setRequired(false);

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ImportDirectoryCommand.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ImportDirectoryCommand.java?rev=1383631&r1=1383630&r2=1383631&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ImportDirectoryCommand.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ImportDirectoryCommand.java Tue Sep 11 21:50:30 2012
@@ -37,18 +37,19 @@ public class ImportDirectoryCommand exte
   }
   
   @Override
-  public int execute(String fullCommand, CommandLine cl, Shell shellState) throws IOException, AccumuloException, AccumuloSecurityException,
+  public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws IOException, AccumuloException, AccumuloSecurityException,
       TableNotFoundException {
     shellState.checkTableState();
     
     String dir = cl.getArgs()[0];
     String failureDir = cl.getArgs()[1];
-    boolean setTime = Boolean.parseBoolean(cl.getArgs()[2]);
+    final boolean setTime = Boolean.parseBoolean(cl.getArgs()[2]);
     
-    FileSystem fs = FileSystem.get(CachedConfiguration.getInstance());
-    FileStatus failStatus = fs.getFileStatus(new Path(failureDir));
-    if (failStatus == null || !failStatus.isDir() || fs.listStatus(new Path(failureDir)).length != 0)
+    final FileSystem fs = FileSystem.get(CachedConfiguration.getInstance());
+    final FileStatus failStatus = fs.getFileStatus(new Path(failureDir));
+    if (failStatus == null || !failStatus.isDir() || fs.listStatus(new Path(failureDir)).length != 0) {
       throw new AccumuloException(failureDir + " is not an empty directory");
+    }
     shellState.getConnector().tableOperations().importDirectory(shellState.getTableName(), dir, failureDir, setTime);
     return 0;
   }

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ImportTableCommand.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ImportTableCommand.java?rev=1383631&r1=1383630&r2=1383631&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ImportTableCommand.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ImportTableCommand.java Tue Sep 11 21:50:30 2012
@@ -27,7 +27,7 @@ import org.apache.commons.cli.CommandLin
 public class ImportTableCommand extends Command {
   
   @Override
-  public int execute(String fullCommand, CommandLine cl, Shell shellState) throws AccumuloException, AccumuloSecurityException, TableNotFoundException,
+  public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws AccumuloException, AccumuloSecurityException, TableNotFoundException,
       TableExistsException {
     
     shellState.getConnector().tableOperations().importTable(cl.getArgs()[0], cl.getArgs()[1]);

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/InsertCommand.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/InsertCommand.java?rev=1383631&r1=1383630&r2=1383631&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/InsertCommand.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/InsertCommand.java Tue Sep 11 21:50:30 2012
@@ -40,17 +40,17 @@ import org.apache.hadoop.io.Text;
 public class InsertCommand extends Command {
   private Option insertOptAuths, timestampOpt;
   
-  public int execute(String fullCommand, CommandLine cl, Shell shellState) throws AccumuloException, AccumuloSecurityException, TableNotFoundException,
+  public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws AccumuloException, AccumuloSecurityException, TableNotFoundException,
       IOException, ConstraintViolationException {
     shellState.checkTableState();
     
-    Mutation m = new Mutation(new Text(cl.getArgs()[0].getBytes(Shell.CHARSET)));
-    Text colf = new Text(cl.getArgs()[1].getBytes(Shell.CHARSET));
-    Text colq = new Text(cl.getArgs()[2].getBytes(Shell.CHARSET));
-    Value val = new Value(cl.getArgs()[3].getBytes(Shell.CHARSET));
+    final Mutation m = new Mutation(new Text(cl.getArgs()[0].getBytes(Shell.CHARSET)));
+    final Text colf = new Text(cl.getArgs()[1].getBytes(Shell.CHARSET));
+    final Text colq = new Text(cl.getArgs()[2].getBytes(Shell.CHARSET));
+    final Value val = new Value(cl.getArgs()[3].getBytes(Shell.CHARSET));
     
     if (cl.hasOption(insertOptAuths.getOpt())) {
-      ColumnVisibility le = new ColumnVisibility(cl.getOptionValue(insertOptAuths.getOpt()));
+      final ColumnVisibility le = new ColumnVisibility(cl.getOptionValue(insertOptAuths.getOpt()));
       Shell.log.debug("Authorization label will be set to: " + le.toString());
       
       if (cl.hasOption(timestampOpt.getOpt()))
@@ -62,19 +62,21 @@ public class InsertCommand extends Comma
     else
       m.put(colf, colq, val);
     
-    BatchWriter bw = shellState.getConnector().createBatchWriter(shellState.getTableName(), m.estimatedMemoryUsed() + 0L, 0L, 1);
+    final BatchWriter bw = shellState.getConnector().createBatchWriter(shellState.getTableName(), m.estimatedMemoryUsed() + 0L, 0L, 1);
     bw.addMutation(m);
     try {
       bw.close();
     } catch (MutationsRejectedException e) {
-      ArrayList<String> lines = new ArrayList<String>();
-      if (e.getAuthorizationFailures().isEmpty() == false)
+      final ArrayList<String> lines = new ArrayList<String>();
+      if (e.getAuthorizationFailures().isEmpty() == false) {
         lines.add("	Authorization Failures:");
+      }
       for (KeyExtent extent : e.getAuthorizationFailures()) {
         lines.add("		" + extent);
       }
-      if (e.getConstraintViolationSummaries().isEmpty() == false)
+      if (e.getConstraintViolationSummaries().isEmpty() == false) {
         lines.add("	Constraint Failures:");
+      }
       for (ConstraintViolationSummary cvs : e.getConstraintViolationSummaries()) {
         lines.add("		" + cvs.toString());
       }
@@ -95,7 +97,7 @@ public class InsertCommand extends Comma
   
   @Override
   public Options getOptions() {
-    Options o = new Options();
+    final Options o = new Options();
     insertOptAuths = new Option("l", "visibility-label", true, "formatted visibility");
     insertOptAuths.setArgName("expression");
     o.addOption(insertOptAuths);

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/InterpreterCommand.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/InterpreterCommand.java?rev=1383631&r1=1383630&r2=1383631&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/InterpreterCommand.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/InterpreterCommand.java Tue Sep 11 21:50:30 2012
@@ -39,7 +39,7 @@ public class InterpreterCommand extends 
     return "specifies a scan interpreter to interpret scan range and column arguments";
   }
   
-  public static Class<? extends ScanInterpreter> getCurrentInterpreter(String tableName, Shell shellState) {
+  public static Class<? extends ScanInterpreter> getCurrentInterpreter(final String tableName, final Shell shellState) {
     return ShellPluginConfigurationCommand.getPluginClass(tableName, shellState, ScanInterpreter.class, Property.TABLE_INTERPRETER_CLASS);
   }
 }



Mime
View raw message