Skip to content

Commit

Permalink
[Fix] Fix deploy module calling without username/password
Browse files Browse the repository at this point in the history
  • Loading branch information
blcham committed Jul 15, 2023
1 parent c67b3bd commit 4f11b77
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import java.io.IOException;
import java.io.StringReader;
import java.io.StringWriter;
import java.util.Optional;

public class Rdf4jDeployModule extends AbstractModule {

Expand Down Expand Up @@ -181,8 +182,12 @@ public void loadConfiguration() {
rdf4jContextIRI = getEffectiveValue(P_RDF4J_CONTEXT_IRI).asLiteral().getString();
}
isReplaceContext = this.getPropertyValue(P_IS_REPLACE_CONTEXT_IRI, false);
rdf4jSecuredUsernameVariable = getEffectiveValue(P_RDF4J_REPOSITORY_USERNAME).asLiteral().getString();
rdf4jSecuredPasswordVariable = getEffectiveValue(P_RDF4J_REPOSITORY_PASSWORD).asLiteral().getString();
rdf4jSecuredUsernameVariable = Optional.ofNullable(
getEffectiveValue(P_RDF4J_REPOSITORY_USERNAME)).map(n -> n.asLiteral().getString()
).orElse(null);
rdf4jSecuredPasswordVariable = Optional.ofNullable(
getEffectiveValue(P_RDF4J_REPOSITORY_PASSWORD)).map(n -> n.asLiteral().getString()
).orElse(null);
}

private boolean isRdf4jContextIRIDefined() {
Expand Down

0 comments on commit 4f11b77

Please sign in to comment.