More code cleanup

This commit is contained in:
drdev
2014-01-15 05:48:53 +00:00
parent d7f8231717
commit a5a0c510b5
5 changed files with 21 additions and 22 deletions

View File

@@ -78,9 +78,9 @@ public abstract class StorageReaderFile<T> extends StorageReaderBase<T> {
idx++; idx++;
String newKey = keySelector.apply(item); String newKey = keySelector.apply(item);
if( result.containsKey(newKey)) if (result.containsKey(newKey)) {
System.err.println("StorageReader: Overwriting an object with key " + newKey); System.err.println("StorageReader: Overwriting an object with key " + newKey);
}
result.put(newKey, item); result.put(newKey, item);
} }

View File

@@ -92,9 +92,9 @@ public abstract class StorageReaderFolder<T> extends StorageReaderBase<T> {
throw new RuntimeException(msg); throw new RuntimeException(msg);
} }
String newKey = keySelector.apply(newDeck); String newKey = keySelector.apply(newDeck);
if( result.containsKey(newKey)) if (result.containsKey(newKey)) {
System.err.println("StorageReader: Overwriting an object with key " + newKey); System.err.println("StorageReader: Overwriting an object with key " + newKey);
}
result.put(newKey, newDeck); result.put(newKey, newDeck);
} catch (final NoSuchElementException ex) { } catch (final NoSuchElementException ex) {
final String message = String.format("%s failed to load because ---- %s", file.getName(), ex.getMessage()); final String message = String.format("%s failed to load because ---- %s", file.getName(), ex.getMessage());
@@ -128,7 +128,6 @@ public abstract class StorageReaderFolder<T> extends StorageReaderBase<T> {
@Override @Override
public Iterable<File> getSubFolders() { public Iterable<File> getSubFolders() {
File[] list = this.directory.listFiles(new FileFilter() { File[] list = this.directory.listFiles(new FileFilter() {
@Override @Override
public boolean accept(File file) { public boolean accept(File file) {
return file.isDirectory() && !file.isHidden(); return file.isDirectory() && !file.isHidden();