Revision c2e4881e
Added by Katja Luther about 5 years ago
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/source/CdmServerInfo.java | ||
---|---|---|
10 | 10 |
|
11 | 11 |
import java.io.File; |
12 | 12 |
import java.io.FileInputStream; |
13 |
import java.io.FileNotFoundException; |
|
13 | 14 |
import java.io.FileOutputStream; |
14 | 15 |
import java.io.IOException; |
15 | 16 |
import java.net.InetSocketAddress; |
... | ... | |
373 | 374 |
|
374 | 375 |
|
375 | 376 |
public static List<CdmServerInfo> getCdmServers() { |
376 |
List<CdmServerInfoConfig> configList = loadFromConfigFile(new File(ConfigFileUtil.perUserCdmFolder(), CDM_REMOTE_SERVERS_CONFIG_FILE)); |
|
377 |
List<CdmServerInfoConfig> configList; |
|
378 |
File file = new File(ConfigFileUtil.perUserCdmFolder(), CDM_REMOTE_SERVERS_CONFIG_FILE); |
|
379 |
if (file.exists()){ |
|
380 |
configList = loadFromConfigFile(file); |
|
381 |
}else{ |
|
382 |
configList = loadFromConfigFile(new File(ConfigFileUtil.perUserCdmFolderFallback(), CDM_REMOTE_SERVERS_CONFIG_FILE)); |
|
383 |
} |
|
377 | 384 |
List<CdmServerInfo> serverInfoList = new ArrayList<CdmServerInfo>(configList.size()); |
378 | 385 |
for(CdmServerInfoConfig config : configList) { |
379 | 386 |
serverInfoList.add(new CdmServerInfo(config)); |
Also available in: Unified diff
changes in CdmServerInfo