Changeset 5994 in josm for trunk/src


Ignore:
Timestamp:
2013-06-06T23:42:48+02:00 (11 years ago)
Author:
Don-vip
Message:

fix #8770 - Call lsb-release only once

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java

    r5885 r5994  
    2121 */
    2222public class PlatformHookUnixoid implements PlatformHook {
     23   
     24    private String osDescription;
     25   
    2326    @Override
    2427    public void preStartupHook(){
     
    8790    }
    8891
    89     @Override
    90     public String getOSDescription() {
     92    protected String buildOSDescription() {
    9193        String osName = System.getProperty("os.name");
    9294        if ("Linux".equalsIgnoreCase(osName)) {
     
    124126        }
    125127        return osName;
     128    }
     129   
     130    @Override
     131    public String getOSDescription() {
     132        if (osDescription == null) {
     133            osDescription = buildOSDescription();
     134        }
     135        return osDescription;
    126136    }
    127137   
Note: See TracChangeset for help on using the changeset viewer.