Thanks Jon. I appreciate the quick fix too! Merry Christmas again. Fewer software bugs and more sunshine enjoyed without a face mask in 2021. Dawid
On Thu, Dec 24, 2020 at 12:26 AM Jonathan Gibbons <jonathan.gibb...@oracle.com> wrote: > > Dawid, > > I'm 99.99% sure I know the cause. The difference between Breaks and > Passes2 is the newline character. There's a bug in the code that tries > to detect malformed attributes by looking for `@` after a newline. The > flag for the newline should have been reset by the intervening non-white > characters, but was not. > > -- Jon > > On 12/23/20 2:40 PM, Dawid Weiss wrote: > > Hi Jon, > > > > Please file a bug (or Uwe do it, if you can) - I don't have access to > > Jira. I also don't care much who gets credited for reporting - can > > be Apache Lucene or my name, does not matter. > > > >> Further experimentation reveals it is strongly related to the `@` > >> character in the mailto: link. Change that character in `Breaks.java` and > >> it passes. > > ...but Passes2 is literally identical content as Breaks (it has an > > '@'), yet it's somehow treated differently... Odd, huh?! ;) > > > > Dawid > > > > On Wed, Dec 23, 2020 at 8:32 PM Jonathan Gibbons > > <jonathan.gibb...@oracle.com> wrote: > >> I'll open a bug later today, if you don't do it first. Mostly, it's just a > >> matter of who gets to be recorded as the "reporter" > >> > >> -- Jon > >> > >> On 12/23/20 10:38 AM, Uwe Schindler wrote: > >> > >> I may open a bug on behalf of Dawid and Apache Lucene, if you haven't done > >> already. > >> > >> Uwe > >> > >> Am December 23, 2020 5:47:41 PM UTC schrieb Jonathan Gibbons > >> <jonathan.gibb...@oracle.com>: > >>> Wow. And Merry Christmas to you too. > >>> > >>> I confirm your results for all your files. > >>> > >>> Further experimentation reveals it is strongly related to the `@` > >>> character in the mailto: link. Change that character in `Breaks.java` > >>> and it passes. > >>> > >>> Do you want to file the bug, or would you like me to? > >>> > >>> -- Jon > >>> > >>> On 12/23/20 2:39 AM, Dawid Weiss wrote: > >>>> Hello and Merry Christmas, > >>>> > >>>> I discovered this odd javac behavior with jdk8 up to jdk15 (didn't > >>>> check the latest head). This source file (note the anchor tag over > >>>> multiple lines): > >>>> > >>>> /** > >>>> * Lucene internals or asking for help on <a > >>>> * > >>>> href="mailto:java-u...@lucene.apache.org">java-u...@lucene.apache.org</a> > >>>> */ > >>>> public class Breaks {} > >>>> > >>>> When compiled with > >>>> > >>>> javac -Xdoclint:all/protected Breaks.java > >>>> > >>>> generates this: > >>>> > >>>> Breaks.java:2: error: malformed HTML > >>>> * Lucene internals or asking for help on <a > >>>> ^ > >>>> Breaks.java:3: error: bad use of '>' > >>>> * > >>>> href="mailto:java-u...@lucene.apache.org">java-u...@lucene.apache.org</a> > >>>> ^ > >>>> Breaks.java:3: error: unexpected end tag: </a> > >>>> * > >>>> href="mailto:java-u...@lucene.apache.org">java-u...@lucene.apache.org</a> > >>>> > >>>> ^ > >>>> What's interesting is that the following two alternatives compile just > >>>> fine: > >>>> > >>>> /** > >>>> * Lucene internals or asking for help on <a > >>>> * > >>>> href="https://urldefense.com/v3/__http://lucene.apache.org__;!!GqivPVa7Brio!LYiyQ3Jp-pVSiKh764B-LZwZPOUiSzf1J_0YDAoCBN9rqPLyxJpgOHVsWHxqUGpBWMrxRA$ > >>>> ">java-u...@lucene.apache.org</a> > >>>> */ > >>>> public class Passes {} > >>>> > >>>> /** > >>>> * Lucene internals or asking for help on <a > >>>> > >>>> href="mailto:java-u...@lucene.apache.org">java-u...@lucene.apache.org</a> > >>>> to figure out why. > >>>> */ > >>>> public class Passes2 {} > >>>> > >>>> Is it just me or all these should compile just fine?... > >>>> > >>>> Dawid > >>>> > >>>> [1] Just in case mail clients attempt to reformat the pasted examples, > >>>> here's a gist with > >>>> the sources: > >>>> > >>>> https://urldefense.com/v3/__https://gist.github.com/dweiss/c1c9f218c6a8e5d2f253193806a9f472__;!!GqivPVa7Brio!LYiyQ3Jp-pVSiKh764B-LZwZPOUiSzf1J_0YDAoCBN9rqPLyxJpgOHVsWHxqUGr0CPKrkA$