Project

General

Profile

« Previous | Next » 

Revision a286b342

Added by Andreas Müller about 7 years ago

fix #6372 fix NPE in datasource view

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/datasource/CdmDataSourceRepository.java
88 88
	 * @return a {@link java.util.List} object.
89 89
	 */
90 90
	public static List<ICdmSource> getAll() {
91
		List<ICdmSource> remoteSources = new ArrayList<ICdmSource>();
91
		List<ICdmSource> remoteSources = new ArrayList<>();
92 92

  
93
		if (CdmPersistentDataSource.getAllDataSources() == null){
94
			MessagingUtils.errorDialog("Could not read root element", CdmPersistentDataSource.class,
95
					"Could not read element in datasources.xml in .cdmLibrary folder. Maybe your datasources.xml file is broken.", 
96
					TaxeditorStorePlugin.PLUGIN_ID, null, true);
97
			return remoteSources;
98
		}
93 99
		for(ICdmDataSource dataSource : CdmPersistentDataSource.getAllDataSources()){
94 100
			try {
95 101
				remoteSources.add(CdmPersistentDataSource.NewInstance(dataSource.getName()));

Also available in: Unified diff