src/share/classes/com/sun/tools/hat/internal/server/RefsByTypeQuery.java

Print this page
rev 10195 : 8048267: Replace uses of 'new Long()' with appropriate alternative across core classes
Reviewed-by: chegar, psandoz
Contributed-by: otaviojava@java.net

*** 61,85 **** System.out.println("null class for " + ref); continue; } Long count = referrersStat.get(cl); if (count == null) { ! count = new Long(1); } else { ! count = new Long(count.longValue() + 1); } referrersStat.put(cl, count); } instance.visitReferencedObjects( new AbstractJavaHeapObjectVisitor() { public void visit(JavaHeapObject obj) { JavaClass cl = obj.getClazz(); Long count = refereesStat.get(cl); if (count == null) { ! count = new Long(1); } else { ! count = new Long(count.longValue() + 1); } refereesStat.put(cl, count); } } ); --- 61,85 ---- System.out.println("null class for " + ref); continue; } Long count = referrersStat.get(cl); if (count == null) { ! count = 1L; } else { ! count = count + 1L; } referrersStat.put(cl, count); } instance.visitReferencedObjects( new AbstractJavaHeapObjectVisitor() { public void visit(JavaHeapObject obj) { JavaClass cl = obj.getClazz(); Long count = refereesStat.get(cl); if (count == null) { ! count = 1L; } else { ! count = count + 1L; } refereesStat.put(cl, count); } } );