-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 06/28/2012 06:20 AM, Samuel Mutel wrote:

> Please find below the change I made on file SnmpAttribute.java 
> (package org.opennms.netmgt.collectd):

Samuel, thanks for this enhancement.  Can you resend your proposed
changes in the form of a context diff, e.g. by running "git diff"?

Design-wise, I have two pieces of input:

1. Move the regular expression parts so that they're called only after
we have caught a NumberFormatException.  Evaluating this match is
expensive compared to Double.valueOf(String).

2. Use the find() method rather than the matches() method.  Since find()
stops scanning the input string after it makes a single match, it's
cheaper than matches(), which attempts to match the entire input string.

> This peace of code could be integrated into the next release, what 
> do you think about that ?

Only with accompanying unit tests and an executed contributor agreement
(http://www.opennms.org/wiki/OCA).

I can help you get started writing tests if you're not familiar with
doing that.

- -jeff


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJP7HOmAAoJEEfedldKS64sFXIQAI6UnjI7yH9FpiE3A3XYSFti
KiXfmw9TWXq1ofGaVns5oTwDpl2SlRRvmWJdE/wzcOO5k52waIhVqA9cyc8EWCX3
cJ2xpurQvMq0Ts44+qQTFl81NlyuJ/U0tr2rOq0AWgulcvyS7rA2tapu+NLqB2Hd
99Ms0NSg5Xxy1c1XtaV28Xz5dDdctNLy6/Ft2CTss2sapVTCV83U1nQAa40VaDz7
h6chTLDK6wdjzVd6aiUN0lurgn7i9Q87J1itgqRhIjFdpGoVhzsf7Xz24oxR6yaB
BbgjaNvnZJYLQvRgCpLH0ei7DeS8KWgEgPbHDv0zPPxX4REBQDliPUBFU+3ookL1
Lr8WEAxUR8tQIIosIZiZbMkRYZGX+KjZ+t4cAd8sRa0OLPc1NvbHGp3yRH61GdW1
r8LCPUVvYgcpKXZEbSaQJU8AApTvsScStJyj1dafBHQG8cJ7cfMvu5e7VbVHvoW/
yO8h96aQ54lgiupoFvIH7rBtdPSyJrAT5KsRBdiHEl5rP0iZ2uQGv7GoQHXeSFfR
aNUfRhcYhBanWW4lmh2vsW4FShq+URTkEAAZxilq4xw96X0QQZ8BgpmE48NMKoMy
izffwhWQTENHIu/y34vXwtkGELkNHxGA7v+ykVk2gyevooOQYvNfA+Ndz+WUyRyI
3HyqS8KcnmIP3VqYt0aS
=JNGE
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ

opennms-devel mailing list

To *unsubscribe* or change your subscription options, see the bottom of this 
page:
https://lists.sourceforge.net/lists/listinfo/opennms-devel

Reply via email to