You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary Gregory (JIRA)" <ji...@apache.org> on 2018/09/19 18:15:00 UTC

[jira] [Updated] (DAEMON-393) Revered code comments for JRE and JDK locations in the registry

     [ https://issues.apache.org/jira/browse/DAEMON-393?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Gregory updated DAEMON-393:
--------------------------------
    Description: 
According to the description in DAEMON-376 (and to my experience) these two comments (same file and same ticket) should be the other way round:

    L"SOFTWARE\\JavaSoft\\JRE
",                       /* Oracle Java 8 and earlier */
     L"SOFTWARE\\JavaSoft
Java Runtime Environment
",  /* Oracle Java 9 (and hopefully later) */

 The correct comments should be:
{code}
/* Predefined Java keys
 * The code below assumes the JRE and JDK arrays are the same length
 */
static LPCWSTR JRE_REGKEYS[] = {
    L"SOFTWARE\\JavaSoft\\JRE\\",                       /* Oracle Java 9 (and hopefully later) */
    L"SOFTWARE\\JavaSoft\\Java Runtime Environment\\",  /* Oracle Java 8 (and older) */
    L"SOFTWARE\\IBM\\Java2 Runtime Environment\\",      /* IBM */
    NULL
};
static LPCWSTR JDK_REGKEYS[] = {
    L"SOFTWARE\\JavaSoft\\JDK\\",                       /* Oracle Java 9 and (and hopefully later) */
    L"SOFTWARE\\JavaSoft\\Java Development Kit\\",      /* Oracle Java 8 (and older) */
    L"SOFTWARE\\IBM\\Java2 Development Kit\\",          /* IBM */
    NULL
};
{code}

  was:
in the code added when fixing DAEMON-376 and DAEMON-311 undefined behaviour and a wrong comment was introduced. See [https://stackoverflow.com/questions/4968854/is-i-i-truly-a-undefined-behavior] for the undefined behaviour.

 

According to the description in DAEMON-376 (and to my experience) these two comments (same file and same ticket) should be the other way round:

    L"SOFTWARE\\JavaSoft\\JRE
",                       /* Oracle Java 8 and earlier */
     L"SOFTWARE\\JavaSoft
Java Runtime Environment
",  /* Oracle Java 9 (and hopefully later) */

 


> Revered code comments for JRE and JDK locations in the registry
> ---------------------------------------------------------------
>
>                 Key: DAEMON-393
>                 URL: https://issues.apache.org/jira/browse/DAEMON-393
>             Project: Commons Daemon
>          Issue Type: Bug
>            Reporter: Daniel Hofmann
>            Priority: Major
>
> According to the description in DAEMON-376 (and to my experience) these two comments (same file and same ticket) should be the other way round:
>     L"SOFTWARE\\JavaSoft\\JRE
> ",                       /* Oracle Java 8 and earlier */
>      L"SOFTWARE\\JavaSoft
> Java Runtime Environment
> ",  /* Oracle Java 9 (and hopefully later) */
>  The correct comments should be:
> {code}
> /* Predefined Java keys
>  * The code below assumes the JRE and JDK arrays are the same length
>  */
> static LPCWSTR JRE_REGKEYS[] = {
>     L"SOFTWARE\\JavaSoft\\JRE\\",                       /* Oracle Java 9 (and hopefully later) */
>     L"SOFTWARE\\JavaSoft\\Java Runtime Environment\\",  /* Oracle Java 8 (and older) */
>     L"SOFTWARE\\IBM\\Java2 Runtime Environment\\",      /* IBM */
>     NULL
> };
> static LPCWSTR JDK_REGKEYS[] = {
>     L"SOFTWARE\\JavaSoft\\JDK\\",                       /* Oracle Java 9 and (and hopefully later) */
>     L"SOFTWARE\\JavaSoft\\Java Development Kit\\",      /* Oracle Java 8 (and older) */
>     L"SOFTWARE\\IBM\\Java2 Development Kit\\",          /* IBM */
>     NULL
> };
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)