RFR [15] 8238291: Fix inconsistencies in the format of the index files

Jonathan Gibbons jonathan.gibbons at oracle.com
Mon Feb 3 19:58:19 UTC 2020


Approved, but for bonus points, add a comment to SearchIndexItem.toString
listing all the letters we use and what they are used for.

For further consideration (later?), could we have a worker method that 
takes a varargs list of pairs, perhaps similar to Map.of, or even using 
Map.of?  Or use a builder object with methods named for the 
single-characters whose arg is the value ... although the conditional 
get in the way of fluent API usage.

Separately, (later?) what if the description contains a quote character 
('"') ... there is no attempt to escape any values.

-- Jon


On 01/31/2020 05:47 AM, Pavel Rappo wrote:
> Hello,
>
> Please review the change for https://bugs.openjdk.java.net/browse/JDK-8238291:
>
>    http://cr.openjdk.java.net/~prappo/8238291/webrev.00/
>
> This is a tiny cleanup change. The goal is to fix inconsistency in abbreviating
> the fields of the index structure.
>
> The fields of the index structure, such as "label", "containingModule",
> "containingPackage", "containingClass", "holder", and "description" are
> abbreviated in the index files to a single letter, "l", "m", "p", "c", "h", and
> "d" respectively. The "url" field is not. Sometimes it is referred to as "u",
> other times as "url".
>
>  From my archival research it seems that this peculiarity has been there from day 1.
> While "url" was used for indexing packages, types, members, and then modules,
> "u" was used for everything else, which back then comprised the "search tags"
> category. I couldn't find any evidence of that being done for some purpose.
> I do believe it's just a typo, thus I propose to fix it.
>
> Incidentally, this change reduces the size of the index files. In case you
> wonder the reduction is 1% (one percent), otherwise known as "not something to
> brag about".
>
> Thanks,
> -Pavel
>



More information about the javadoc-dev mailing list