Project

General

Profile

« Previous | Next » 

Revision 98a682cb

Added by Andreas Kohlbecker almost 11 years ago

fixing instance base urls in cdmserver manager and avoiding NPEs in development environments

View differences:

src/main/java/eu/etaxonomy/cdm/server/Bootloader.java
197 197
    private String logPath = null;
198 198

  
199 199
    private Server server = null;
200
    private ContextHandlerCollection contexts = new ContextHandlerCollection();
200
    private final ContextHandlerCollection contexts = new ContextHandlerCollection();
201 201

  
202 202
    private CommandLine cmdLine;
203 203

  
......
550 550
    }
551 551

  
552 552
    public String readCdmRemoteVersion() throws IOException {
553
    	String version = "cdmlib version unreadable";
553 554
        InputStream versionInStream = Bootloader.class.getClassLoader().getResourceAsStream(VERSION_PROPERTIES_FILE);
554
         Properties versionProperties = new Properties();
555
         versionProperties.load(versionInStream);
556
         String version = versionProperties.getProperty(CDMLIB_REMOTE_WEBAPP_VERSION);
555
        if (versionInStream != null){
556
        	Properties versionProperties = new Properties();
557
        	versionProperties.load(versionInStream);
558
        	version = versionProperties.getProperty(CDMLIB_REMOTE_WEBAPP_VERSION, version);
559
        }
557 560
        return version;
558 561
    }
559 562

  

Also available in: Unified diff