Permalink
Browse files

Added NoAvatar option/class, which is now the default

  • Loading branch information...
rictic committed Oct 23, 2008
1 parent c93feaf commit 506fe07593a7c9b0035621ae08b9f642626059af
Showing with 13 additions and 3 deletions.
  1. +1 −2 src/AvatarFetcher.java
  2. +11 −0 src/NoAvatar.java
  3. +1 −1 src/code_swarm.java
View
@@ -16,8 +16,7 @@ public AvatarFetcher(CodeSwarmConfig cfg) {
}
public String fetchUserImage(String username) {
- //Override fetchUserImage in your Avatar Fetcher
- return null;
+ throw new RuntimeException("Override fetchUserImage in your Avatar Fetcher");
}
protected static String getFilename(String key){
View
@@ -0,0 +1,11 @@
+
+public class NoAvatar extends AvatarFetcher {
+
+ public NoAvatar(CodeSwarmConfig cfg) {
+ super(cfg);
+ }
+
+ public String fetchUserImage(String username) {
+ return null;
+ }
+}
View
@@ -243,7 +243,7 @@ public void setup() {
isInputSorted = cfg.getBooleanProperty(CodeSwarmConfig.IS_INPUT_SORTED_KEY, false);
- avatarFetcher = getAvatarFetcher(cfg.getStringProperty("AvatarFetcher","AvatarFetcher"));
+ avatarFetcher = getAvatarFetcher(cfg.getStringProperty("AvatarFetcher","NoAvatar"));
/**
* This section loads config files and calls the setup method for all physics engines.

0 comments on commit 506fe07

Please sign in to comment.