summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
1ead2fa)
refs #7719
Change-Id: If5e3366a390f7c2cae581d7d0994f85a404a326d
public class Development {
private static final Logger LOGGER = LoggerFactory.getLogger(Development.class);
public class Development {
private static final Logger LOGGER = LoggerFactory.getLogger(Development.class);
- public static TreeMap<String,Integer> histogram = new TreeMap<String,Integer>();
+ public static TreeMap<String,Integer> histogram = new TreeMap<>();
public static final boolean DEVELOPMENT = false;
public static final boolean DEVELOPMENT = false;
- final static private HashMap<String, Variant> properties = new HashMap<String, Variant>();
+ final static private HashMap<String, Variant> properties = new HashMap<>();
- final static private CopyOnWriteArrayList<DevelopmentListener> listeners = new CopyOnWriteArrayList<DevelopmentListener>();
+ final static private CopyOnWriteArrayList<DevelopmentListener> listeners = new CopyOnWriteArrayList<>();
public static void recordHistogram(Object o) {
String key = o.toString();
public static void recordHistogram(Object o) {
String key = o.toString();
- Integer i = Development.histogram.get(key);
- if(i == null) i = 0;
- int newValue = i+1;
- if (newValue == 1000) {
- newValue = newValue;
- }
- Development.histogram.put(key, newValue);
+ Integer i = histogram.get(key);
+ histogram.put(key, i == null ? 1 : i+1);