More FindBugs inspired hygeine.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2739 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -58,7 +58,7 @@ public class CountMap<K> extends AbstractMap<K, Integer>
|
|||||||
{
|
{
|
||||||
CountEntry<K> entry = _backing.get(key);
|
CountEntry<K> entry = _backing.get(key);
|
||||||
if (entry == null) {
|
if (entry == null) {
|
||||||
_backing.put(key, entry = new CountEntry<K>(key, amount));
|
_backing.put(key, new CountEntry<K>(key, amount));
|
||||||
return amount;
|
return amount;
|
||||||
}
|
}
|
||||||
return (entry.count += amount);
|
return (entry.count += amount);
|
||||||
|
|||||||
@@ -654,7 +654,7 @@ public class Crypt
|
|||||||
System.out.println("Did " + ccount + " crypt()s in " +
|
System.out.println("Did " + ccount + " crypt()s in " +
|
||||||
duration + "ms.");
|
duration + "ms.");
|
||||||
System.out.println("crypt()s per second: " +
|
System.out.println("crypt()s per second: " +
|
||||||
(ccount*1000)/duration);
|
(ccount*1000L)/duration);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ public class ObserverListTest extends TestCase
|
|||||||
testList(list);
|
testList(list);
|
||||||
|
|
||||||
// Log.info("Testing unsafe list.");
|
// Log.info("Testing unsafe list.");
|
||||||
testList(list = ObserverList.newFastUnsafe());
|
testList(ObserverList.<TestObserver>newFastUnsafe());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testList (final ObserverList<TestObserver> list)
|
public void testList (final ObserverList<TestObserver> list)
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class SystemInfoDemo
|
|||||||
// allocate a bit of data
|
// allocate a bit of data
|
||||||
System.out.println("\nAllocating test data.");
|
System.out.println("\nAllocating test data.");
|
||||||
for (int ii = 0; ii < 10000; ii++) {
|
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
|
// update and output the latest system information
|
||||||
@@ -42,4 +42,6 @@ public class SystemInfoDemo
|
|||||||
System.out.println("\nUpdated system info:");
|
System.out.println("\nUpdated system info:");
|
||||||
System.out.println(info.toString());
|
System.out.println(info.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected static long _counter;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user