code cleanup and fixes
This commit is contained in:
parent
a58b09d2ff
commit
ebbfde4718
3 changed files with 9 additions and 4 deletions
|
@ -23,6 +23,11 @@
|
||||||
<Package name="ch.ethz.seb.sebserver" />
|
<Package name="ch.ethz.seb.sebserver" />
|
||||||
<Bug pattern="REC_CATCH_EXCEPTION" />
|
<Bug pattern="REC_CATCH_EXCEPTION" />
|
||||||
</Match>
|
</Match>
|
||||||
|
<Match>
|
||||||
|
<Package name="ch.ethz.seb.sebserver.gui" />
|
||||||
|
<Bug pattern="SE_BAD_FIELD" />
|
||||||
|
</Match>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -170,8 +170,6 @@ final class OpenEdxLmsAPITemplate implements LmsAPITemplate {
|
||||||
|
|
||||||
private Result<LmsSetup> initRestTemplateAndRequestAccessToken() {
|
private Result<LmsSetup> initRestTemplateAndRequestAccessToken() {
|
||||||
|
|
||||||
log.info("Initialize Rest Template for OpenEdX API access. LmsSetup: {}", this.lmsSetup);
|
|
||||||
|
|
||||||
return Result.tryCatch(() -> {
|
return Result.tryCatch(() -> {
|
||||||
if (this.restTemplate != null) {
|
if (this.restTemplate != null) {
|
||||||
try {
|
try {
|
||||||
|
@ -185,6 +183,8 @@ final class OpenEdxLmsAPITemplate implements LmsAPITemplate {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log.info("Initialize Rest Template for OpenEdX API access. LmsSetup: {}", this.lmsSetup);
|
||||||
|
|
||||||
final Iterator<String> tokenAccessPaths = this.knownTokenAccessPaths.iterator();
|
final Iterator<String> tokenAccessPaths = this.knownTokenAccessPaths.iterator();
|
||||||
while (tokenAccessPaths.hasNext()) {
|
while (tokenAccessPaths.hasNext()) {
|
||||||
final String accessTokenRequestPath = tokenAccessPaths.next();
|
final String accessTokenRequestPath = tokenAccessPaths.next();
|
||||||
|
|
|
@ -78,8 +78,8 @@ public class HTTPClientBot {
|
||||||
|
|
||||||
public HTTPClientBot(final Map<String, String> args) {
|
public HTTPClientBot(final Map<String, String> args) {
|
||||||
|
|
||||||
//this.webserviceAddress = args.getOrDefault("webserviceAddress", "http://ralph.ethz.ch:8080");
|
this.webserviceAddress = args.getOrDefault("webserviceAddress", "http://ralph.ethz.ch:8080");
|
||||||
this.webserviceAddress = args.getOrDefault("webserviceAddress", "http://localhost:8080");
|
//this.webserviceAddress = args.getOrDefault("webserviceAddress", "http://localhost:8080");
|
||||||
|
|
||||||
this.accessTokenEndpoint = args.getOrDefault("accessTokenEndpoint", "/oauth/token");
|
this.accessTokenEndpoint = args.getOrDefault("accessTokenEndpoint", "/oauth/token");
|
||||||
this.clientId = args.getOrDefault("clientId", "TO_SET");
|
this.clientId = args.getOrDefault("clientId", "TO_SET");
|
||||||
|
|
Loading…
Reference in a new issue