Commit c0d643a3450ab2eab643d426d2c7941bb446757a

Authored by Fernando Ribeiro
1 parent 1655bf3715
Exists in OPENAIRE5.X

Revert to original state.

setup-data/dspace-source/dspace-api/src/main/java/org/dspace/content/authority/OpenAIREAuthority.java
... ... @@ -87,7 +87,6 @@ public class OpenAIREAuthority implements ChoiceAuthority
87 87 private static final String MinimumChars = "openaire.projects.suggest.minchar";
88 88 private static final String MaxSuggests = "openaire.projects.suggest.max";
89 89 private static final int MaxSuggestionLength = 66;
90   - private static long filelength = 0;
91 90  
92 91  
93 92 private static List<Pair<String, String>> pairs = null;
... ... @@ -98,13 +97,9 @@ public class OpenAIREAuthority implements ChoiceAuthority
98 97 */
99 98 @SuppressWarnings("unused")
100 99 private static void load () {
101   - String defsFile = ConfigurationManager.getProperty(OpenAIREAuthority.FileProperty);
102   - long newFilelength = (new File(defsFile)).length();
103   -
104   - if (OpenAIREAuthority.pairs == null || OpenAIREAuthority.pairs.size() == 0 || (newFilelength > 0 && filelength != newFilelength)) {
  100 + if (OpenAIREAuthority.pairs == null) {
105 101 OpenAIREAuthority.pairs = new ArrayList<Pair<String, String>>();
106   - OpenAIREAuthority.pairs.clear();
107   - //String defsFile = ConfigurationManager.getProperty(OpenAIREAuthority.FileProperty);
  102 + String defsFile = ConfigurationManager.getProperty(OpenAIREAuthority.FileProperty);
108 103 if (defsFile == null) OpenAIREAuthority.log.error("Configuration "+OpenAIREAuthority.FileProperty+" not found in dspace.cfg file.");
109 104 else {
110 105 try {
... ...