Project

General

Profile

« Previous | Next » 

Revision 30064

fixed case list of backend is null

View differences:

modules/dnet-modular-index-service/trunk/src/main/java/eu/dnetlib/functionality/index/MdFormatNotificationHandler.java
1 1
package eu.dnetlib.functionality.index;
2 2

  
3 3
import java.io.StringReader;
4
import java.util.List;
4 5

  
5 6
import javax.annotation.Resource;
6 7

  
......
79 80
					final MetadataReference mdRef = mdFactory.getMetadata(format, layout, interpretation);
80 81
					final Document fields = parse(element.selectSingleNode("./FIELDS").asXML());
81 82

  
82
					for (String backendId : serviceTools.getBackendIds(mdRef)) {
83
					List<String> backends = serviceTools.getBackendIds(mdRef);
84

  
85
					if ((backends == null) || backends.isEmpty()) {
86
						log.info("Warning there is no a backendId registered in the profile");
87
					}
88

  
89
					for (String backendId : backends) {
83 90
						IndexServerDAO idxDao = indexServerDAOMap.getIndexServerDAO(backendId);
84 91
						if (idxDao == null) throw new RuntimeException("No index found for the mdformat " + mdRef);
85 92
						log.info("Found index DAO which serve this mdFormat");

Also available in: Unified diff