[rfc][icedtea-web][policyeditor] Parsing enhancements and unit tests

Andrew Azores aazores at redhat.com
Thu Mar 6 20:18:17 UTC 2014

Thanks for review! Hopefully the new attached patch is nicer.


Andrew A

----- Original Message -----
From: "Jiri Vanek" <jvanek at redhat.com>
To: "Andrew Azores" <aazores at redhat.com>
Cc: "IcedTea" <distro-pkg-dev at openjdk.java.net>
Sent: Thursday, March 6, 2014 9:07:46 AM
Subject: Re: [rfc][icedtea-web][policyeditor] Parsing enhancements and unit tests

On 03/05/2014 06:01 PM, Andrew Azores wrote:
> Hi,
> The previous thread was diverging into two quite different patches, so I'm splitting it.
> This patch improves parsing, especially handling of comments, and adds a lot of new unit testing for this. A few small bugs were found and fixed along the way.

The Messages.properties changes are missing in in-pathc chagelog

public static CustomPermission fromString - more more and more tests. Try to hack yourself.  But generally ok.
Well the comment is poem-writer's masterpiece :) But better then nothing :)
The [\\w.] do not osund correct. The dot should be escaped to match dot, not any char. Or not? So this part will be:
[[\\w\\.]+\\w+] (nottested - to match [java.][io.][permissions] and nto eg dsgfgogfdsgjsfdghjsfd[hj as now :)
The content of quotes may be anything, ok? What about content to be qutes itself? (not jsut ${} eg?
The first quotes are mandatory, and the scond not? As far as I read from regex.
Why is compiled patter not global constant? It should be. It will not need recompile each launch time... Then there can be also some tests only to the regex itself.

Why is the  CustomPermission.fromStirng copypasted to PolicyEditorPermissions ???

Quick glance over tests is ook.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: policy-editor-parsing-tests.patch
Type: text/x-patch
Size: 53575 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20140306/78e05e8e/policy-editor-parsing-tests-0001.patch 

More information about the distro-pkg-dev mailing list