[icedtea-web] RFC: Handle a requested heap size of '1g'
omajid at redhat.com
Mon Mar 31 14:32:45 UTC 2014
* Jiri Vanek <jvanek at redhat.com> [2014-03-31 10:08]:
> I think you will see the benefit in this a bitmore refactored version.
> + this.initialHeapSize = checkHeapSize(initialHeapSize);
> + this.maximumHeapSize = checkHeapSize(maximumHeapSize);
I like this change, a lot.
> +++ b/tests/netx/unit/net/sourceforge/jnlp/JREDescTest.java Mon Mar 31 16:06:59 2014 +0200
> + JREDesc a = new JREDesc(null, null, null, null, null, null);
> + s = JREDesc.checkHeapSize("1 ");
> + Assert.assertEquals("1", s);
For the record, I think there is quite a lot of duplication between
IMHO, it would be better to test the public methods of this class
(Constructor and .getMaximumHeapSize()) and treat checkHeapSize as an
internal implementation detail. We should get the same test coverage
either way (and at the boundary that we care about).
PGP Key: 66484681 (http://pgp.mit.edu/)
Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681
More information about the distro-pkg-dev