Skip to content

Commit

Permalink
[bugfix] adapt to the new tei completer release
Browse files Browse the repository at this point in the history
  • Loading branch information
marmoure committed Jan 19, 2024
1 parent 386ef38 commit 44f4dfa
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,18 @@ public List<CIValue> filterAttributeValues(List<CIValue> list, final WhatPossibl
return list;
}

@Override
protected Configuration getConfiguration() {
if(configuration == null) {
synchronized(this) {
if(configuration == null) {
this.configuration = ConfigurationFactory.getInstance().loadConfiguration();
}
}
}
return configuration;
}
//why do we need to override this function? the implementation is the same
// @Override
// protected Configuration getConfiguration() {
// if(configuration == null) {
// synchronized(this) {
// if(configuration == null) {
// this.configuration = ConfigurationFactory.getInstance().loadConfiguration();
// }
// }
// }
// return configuration;
// }

@Override
protected ClientFactory getClientFactory() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.humanistika.oxygen.tei.completer.configuration.beans.Dependent;
import org.humanistika.oxygen.tei.completer.configuration.beans.RequestInfo;
import org.humanistika.oxygen.tei.completer.configuration.beans.ResponseAction;
import org.humanistika.oxygen.tei.completer.configuration.beans.Selection;
import org.jetbrains.annotations.Nullable;

import java.util.Map;
Expand All @@ -35,7 +36,7 @@ public class AutoComplete extends org.humanistika.oxygen.tei.completer.configura
private final UploadInfo uploadInfo;

public AutoComplete(final Map<String, String> namespaceBindings, final String context, final String attribute, final Dependent dependent, final String selection, final RequestInfo requestInfo, final ResponseAction responseAction, final UploadInfo uploadInfo) {
super(namespaceBindings, context, attribute, dependent, selection, requestInfo, responseAction);
super(namespaceBindings, context, attribute, dependent, new Selection(selection, ""), requestInfo, responseAction);
this.uploadInfo = uploadInfo;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ private List<AutoComplete> expandConfig(final Config config) {
} else {
dependent = new Dependent(
autoComplete.getDependent().getDefault(),
autoComplete.getDependent().getValue()
autoComplete.getDependent().getValue(),
""
);
}

Expand Down

0 comments on commit 44f4dfa

Please sign in to comment.