[rfc][icedtea-web] manifests attributes Validation Moved To Separate Class

Jiri Vanek jvanek at redhat.com
Fri Mar 21 15:06:30 UTC 2014


On 03/21/2014 03:51 PM, Omair Majid wrote:
> * Jiri Vanek <jvanek at redhat.com> [2014-03-20 11:01]:
>> +++ b/netx/net/sourceforge/jnlp/runtime/ManifestsAttributesValidator.java	Thu Mar 20 16:04:20 2014 +0100
>
>> +public class ManifestsAttributesValidator {
>
> Can you please add a unit test for this class? It's nice to 'document'
> the behaviour using a test.
>
>> +     public static URL guessCodeBase(JNLPFile file) {
>> +        if (file.getCodeBase() != null) {
>> +            return file.getCodeBase();
>> +        } else {
>> +            //Fixme: codebase should be the codebase of the Main Jar not
>> +            //the location. Although, it still works in the current state.
>> +            return file.getResources().getMainJAR().getLocation();
>> +        }
>
> I am not sure if UrlUtils is the right place to move this method. It has
> very little to do with manipulating URLs (which is what the rest of the
> methods in this class do).
>
> Thanks,
> Omair
>

uff... This is already pushed, and right now there is really lack of time for unittest.

As this class is inherently tested by  JNLPFile test, I would rather not insists.

As for guessCodeBase -  where to move it?

As I told. I wold rather skipp both suggestions rightnow :(

J.


More information about the distro-pkg-dev mailing list