On Nov 13, 1:05 pm, Attila Szegedi <[EMAIL PROTECTED]> wrote: > Hi folks, > > I've been going through the CVS HEAD doing some "gardening" work. > "Gardening" is defined as "run FindBugs and fix very obvious stuff". > > So far, I've replaced all occurrences of "new Integer()" with > "Integer.valueOf()" which uses prefabricated values in range > -128..127, same for other primitive wrappers from Byte to Double. That > will lessen the amount of short lived garbage. Another thing is > replacing iteration over a Map's keySet + get() in the loop body with > iteration over a Map's entrySet, or making inner classes static where > they can be and so forth. > > I also eliminated some dead code here and there (unnecessary casts and > such). > > I have few genuine problems too that seem like potential bugs: > 1. org.mozilla.javascript.ast.Comment#value field is never written to. > 2. org.mozilla.javascript.regexp.NativeRegExp#num field is never used. > > Some other bugs I was able to easily fix: > 1. org.mozilla.javascript.xmlimpl.Namespace overrode equals but not > hashCode > 2. QName ditto > > This by no means means I eliminated everything FindBugs reported -- > there are some other things, most notably synchronization > inconsistencies etc. that I'll also try to tackle soon. > > Attila. > > -- > home:http://www.szegedi.org > twitter:http://twitter.com/szegedi > weblog:http://constc.blogspot.com
I haven't propagated these into the 1.7R2 branch since they are somewhat intertwined with more recent changes. --N _______________________________________________ dev-tech-js-engine-rhino mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino
