Skip to content

Commit

Permalink
Added NoAvatar option/class, which is now the default
Browse files Browse the repository at this point in the history
  • Loading branch information
rictic committed Oct 23, 2008
1 parent c93feaf commit 506fe07
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/AvatarFetcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand Down
11 changes: 11 additions & 0 deletions src/NoAvatar.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

public class NoAvatar extends AvatarFetcher {

public NoAvatar(CodeSwarmConfig cfg) {
super(cfg);
}

public String fetchUserImage(String username) {
return null;
}
}
2 changes: 1 addition & 1 deletion src/code_swarm.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 506fe07

Please sign in to comment.