[rfc][icedtea-web] add switch to trim main-class attribute
Jacob Wisor
gitne at gmx.de
Fri Nov 6 21:35:57 UTC 2015
On 11/06/2015 at 03:41 PM Jiri Vanek wrote:
> Hello!
>
>
> I'm bugged at elast once per month last half a year "oracle can parse this
> jnlp, itw can not". The cause is always same - white char on start or end of
> amin-class attribute value.
>
> This patch is for head, and is adding warning when white-char is there and is
> adding new Xtrimmainclass javaws switch, which will allow trimming (if there si
> whitechat).
>
> I would like to backport to 1.6 the refactoring of Parser to allow print this
> warning also there (so no new switch for 1.6)
>
>
> I recall several discussions about triming by default, and the resutl was always
> no. If mood changes I'm 60:40 ok to change this for head.
>
> Thoughts?
Let me get this straight; are people complaining because of white spaces *in*
fully qualified class names (like fully.qual ifi ed.class. Name) or because of
*leading* and *trailing* white spaces ( fully.qualified.class.Name )?
Or, is it about the "Main-Class" attribute name? Could you please give some
examples?
If this is only about leading and trailing white spaces on the value then I'm
all for it, even for doing it by default, without any new command-line options.
But if this is about white spaces in fully qualified class names then I'm all
against it. Simply because it violates the JNLP specification. And no, I do not
care if other implementations let this slip through or boast themselves falsely
of being "fault tolerant". Violating the specification has nothing to do with
"fault tolerance". It's just mere stupidity and disregard for rules and
standards (either by implementers or authors). The reason why this is
unacceptable is because if we once follow down that path we could as well start
accepting class names and identifiers starting with digit or operator
characters, which would lead effectively to a total indistinguishable mess.
There are good reasons for not doing either.
Regards,
Jacob
p.s.: Please use String.trim() for trimming instead of regex.
More information about the distro-pkg-dev
mailing list