[rfc][icedtea-web] add switch to trim main-class attribute

Andrew Azores aazores at redhat.com
Thu Nov 19 15:59:40 UTC 2015


On 19/11/15 07:36 AM, Jiri Vanek wrote:
> Here we go, rund two.
> 1.6?
> Thnak you all!
> J.

I think this generally looks pretty good, just a few things:

> +    private static final Pattern enyWhiteSpace = Pattern.compile("\\s");

Please rename, s/eny/any/ .

> +                OutputController.getLogger().log(OutputController.Level.MESSAGE_DEBUG, "Invlaid char in main-class: '" + main.charAt(0) + "'");
> +                    OutputController.getLogger().log(OutputController.Level.MESSAGE_DEBUG, "Invlaid char in main-class: '" + main.charAt(i) + "'");


What about this comment which Jacob made earlier?

> Hence, the compiler accepts this in statements:
> javax.
>   imageio . stream    .
> FileImageInputStream
> So I guess, IcedTea-Web should accept white spaces around valid identifiers and/or the dot
> characters too, wherever it handles Java identifiers, package or fully qualified class names.

Is this also valid for fully qualified main classes in JNLP files? If so 
then it looks to me like this patch doesn't implement this, unless 
Character.isJavaIdentifierPart is allowing whitespace characters?

Either way, I'd like to see a test case for the example Jacob gave, 
where there are whitespaces but they do not break any "words" in the 
fully qualified name, they just are placed around dots.


Andrew Azores

More information about the distro-pkg-dev mailing list