qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Suresh Kodichath (JIRA)" <qpid-...@incubator.apache.org>
Subject [jira] Commented: (QPID-230) Defaults not properly set in QpidProperties.java.
Date Wed, 27 Dec 2006 19:21:21 GMT
    [ http://issues.apache.org/jira/browse/QPID-230?page=comments#action_12461079 ] 
            
Suresh Kodichath commented on QPID-230:
---------------------------------------

That fix addressed part of the problem., but the code still has an issue.

In trunk:
    private static final String DEFAULT = "unknown"
    private static String productName = DEFAULT;
    private static String releaseVersion = DEFAULT;
    private static String buildVersion = DEFAULT;

    /** Loads the values from the version properties file. */
    static
    {
        ... 
                productName = readPropertyValue(props, PRODUCT_NAME_PROPERTY); 
                releaseVersion = readPropertyValue(props, RELEASE_VERSION_PROPERTY);
                buildVersion = readPropertyValue(props, BUILD_VERSION_PROPERTY);     
       ...
    }
    
After the readProperyValue() calls, everything is set to null when the properties are not
found. Later this causes the broker and the client to hang.

Changing it as follows fixed the issue for me:

    /** Loads the values from the version properties file. */
    static
    {
        ... 
                if (props.getProperty(PRODUCT_NAME_PROPERTY) != null)
                {
                    productName = props.getProperty(PRODUCT_NAME_PROPERTY);
                }
                if (props.getProperty(RELEASE_VERSION_PROPERTY) != null)
                {
                    releaseVersion = props.getProperty(RELEASE_VERSION_PROPERTY);
                }
                if (props.getProperty(BUILD_VERSION_PROPERTY) != null)
                {
                    buildVersion = props.getProperty(BUILD_VERSION_PROPERTY);
                }
       ...
    }




> Defaults not properly set in QpidProperties.java.
> -------------------------------------------------
>
>                 Key: QPID-230
>                 URL: http://issues.apache.org/jira/browse/QPID-230
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Common
>            Reporter: Suresh Kodichath
>
> The defaults for productName, releaseVersion, and buildVersion are not always set. This
is causing some random hangs.
> I have a fix for this, and will post it shortly.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message