Small refactoring in searching for attributes

Jiri Vanek jvanek at redhat.com
Fri Oct 25 03:17:22 PDT 2013


ping?

-------- Original Message --------
Subject: Re: Small refactoring in searching for attributes
Date: Mon, 21 Oct 2013 15:29:01 +0200
From: Jiri Vanek <jvanek at redhat.com>
To: Omair Majid <omajid at redhat.com>
CC: IcedTea Distro List <distro-pkg-dev at openjdk.java.net>

On 10/18/2013 05:00 PM, Omair Majid wrote:
> * Jiri Vanek <jvanek at redhat.com> [2013-10-18 09:14]:
>> Please note, this have to go also to 1.4, and that tests are already included n itw.
>
> Patch itself looks okay to me. You have introduced two new public
> methods, though:

thanx, pushed.

>
>> +    public String checkForAttributeInJars(List<JARDesc> jars, Attributes.Name name) {
>
>> +    public String getManifestAttribute(URL location, Attributes.Name  attribute) {
>
> Could you add unit tests for these new methods? Just like the previous
> unit tests give us some guarantee that users of the old methods are
> still covered, it would be nice to have some guarantee that users are
> also covered if these new methods were refactored too.

Here is test. It growe a bit
   - to test the order during search the dummy jnlp file had to be extended to work with set of jars


changes ala

+++ b/netx/net/sourceforge/jnlp/JARDesc.java	Mon Oct 21 15:25:09 2013 +0200

-    private URL location;
+    private final URL location;

...


Are a bit unrelated, but worthy. I wonted to write setter for "main" field, and realised how wrong
this class is. So I did not made the api dirty (used refelction in dummyJnlp) and adde those finals.


Ok for head (both patch and fix?)


Also both, or one, or none :) to 1.4 ?


J.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: testForSearchForAttribute.patch
Type: text/x-patch
Size: 12464 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20131025/3d153c57/testForSearchForAttribute-0001.patch 


More information about the distro-pkg-dev mailing list