Commit 479cd595b91df91d4187b018576e8376c46cb51d

Authored by Fernando Ribeiro
1 parent f6ec6234fd
Exists in OPENAIRE5.X

Added another verification to the case when importing form external sources and …

…the bestmatch is called
setup-data/dspace-source/dspace-api/src/main/java/org/dspace/content/authority/OpenAIREAuthority.java
... ... @@ -101,7 +101,7 @@ public class OpenAIREAuthority implements ChoiceAuthority
101 101 String defsFile = ConfigurationManager.getProperty(OpenAIREAuthority.FileProperty);
102 102 long newFilelength = (new File(defsFile)).length();
103 103  
104   - if (OpenAIREAuthority.pairs == null || (newFilelength > 0 && filelength != newFilelength)) {
  104 + if (OpenAIREAuthority.pairs == null || OpenAIREAuthority.pairs.size() == 0 || (newFilelength > 0 && filelength != newFilelength)) {
105 105 OpenAIREAuthority.pairs = new ArrayList<Pair<String, String>>();
106 106 String defsFile = ConfigurationManager.getProperty(OpenAIREAuthority.FileProperty);
107 107 if (defsFile == null) OpenAIREAuthority.log.error("Configuration "+OpenAIREAuthority.FileProperty+" not found in dspace.cfg file.");
... ...