More FindBugs inspired hygeine.

git-svn-id: https://samskivert.googlecode.com/svn/trunk@2739 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
samskivert
2010-02-10 00:53:15 +00:00
parent 9d9b5a5649
commit 420df91056
4 changed files with 6 additions and 4 deletions
+1 -1
View File
@@ -58,7 +58,7 @@ public class CountMap<K> extends AbstractMap<K, Integer>
{
CountEntry<K> entry = _backing.get(key);
if (entry == null) {
_backing.put(key, entry = new CountEntry<K>(key, amount));
_backing.put(key, new CountEntry<K>(key, amount));
return amount;
}
return (entry.count += amount);
+1 -1
View File
@@ -654,7 +654,7 @@ public class Crypt
System.out.println("Did " + ccount + " crypt()s in " +
duration + "ms.");
System.out.println("crypt()s per second: " +
(ccount*1000)/duration);
(ccount*1000L)/duration);
}
}
}
@@ -43,7 +43,7 @@ public class ObserverListTest extends TestCase
testList(list);
// Log.info("Testing unsafe list.");
testList(list = ObserverList.newFastUnsafe());
testList(ObserverList.<TestObserver>newFastUnsafe());
}
public void testList (final ObserverList<TestObserver> list)
@@ -34,7 +34,7 @@ public class SystemInfoDemo
// allocate a bit of data
System.out.println("\nAllocating test data.");
for (int ii = 0; ii < 10000; ii++) {
@SuppressWarnings("unused") int[] data = new int[100];
_counter += new int[100].length;
}
// update and output the latest system information
@@ -42,4 +42,6 @@ public class SystemInfoDemo
System.out.println("\nUpdated system info:");
System.out.println(info.toString());
}
protected static long _counter;
}