base/common/src/main/com/thesett/common/properties/ParsedProperties.java
public static String setSysPropertyIfNull(String propname, String value)
    {
        String property = System.getProperty(propname);

        if (property == null)
        {
            System.setProperty(propname, value);

            return value;
        }
        else
        {
            return property;
        }
    }
public static String setSysPropertyIfNull(String propname, String value)
    {
        String property = System.getProperty(propname);

        if (property == null)
        {
            System.setProperty(propname, value);

            return value;
        }
        else
        {
            return property;
        }
    }
Helper method for setting system properties to defaults when they are not already set.

@param  propname The name of the system property to set.
@param  value    The value to set it to.

@return The value of the system property after this method call.