Paul Martin
2016-04-30 a502d96a860456ec5e8c96761db70f7cabb74751
src/main/java/com/gitblit/transport/ssh/IPublicKeyManager.java
@@ -16,6 +16,7 @@
package com.gitblit.transport.ssh;
import java.text.MessageFormat;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
@@ -46,7 +47,11 @@
         .build(new CacheLoader<String, List<SshKey>>() {
            @Override
            public List<SshKey> load(String username) {
               return getKeysImpl(username);
               List<SshKey> keys = getKeysImpl(username);
               if (keys == null) {
                  return Collections.emptyList();
               }
               return Collections.unmodifiableList(keys);
            }
         });
@@ -74,6 +79,17 @@
      return null;
   }
   public final void renameUser(String oldName, String newName) {
      List<SshKey> keys = getKeys(oldName);
      if (keys == null || keys.isEmpty()) {
         return;
      }
      removeAllKeys(oldName);
      for (SshKey key : keys) {
         addKey(newName, key);
      }
   }
   protected abstract boolean isStale(String username);
   protected abstract List<SshKey> getKeysImpl(String username);