code cleanup and fixes

This commit is contained in:
anhefti 2019-09-09 13:19:43 +02:00
parent a58b09d2ff
commit ebbfde4718
3 changed files with 9 additions and 4 deletions

View file

@ -23,6 +23,11 @@
<Package name="ch.ethz.seb.sebserver" />
<Bug pattern="REC_CATCH_EXCEPTION" />
</Match>
<Match>
<Package name="ch.ethz.seb.sebserver.gui" />
<Bug pattern="SE_BAD_FIELD" />
</Match>

View file

@ -170,8 +170,6 @@ final class OpenEdxLmsAPITemplate implements LmsAPITemplate {
private Result<LmsSetup> initRestTemplateAndRequestAccessToken() {
log.info("Initialize Rest Template for OpenEdX API access. LmsSetup: {}", this.lmsSetup);
return Result.tryCatch(() -> {
if (this.restTemplate != null) {
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();
while (tokenAccessPaths.hasNext()) {
final String accessTokenRequestPath = tokenAccessPaths.next();

View file

@ -78,8 +78,8 @@ public class HTTPClientBot {
public HTTPClientBot(final Map<String, String> args) {
//this.webserviceAddress = args.getOrDefault("webserviceAddress", "http://ralph.ethz.ch:8080");
this.webserviceAddress = args.getOrDefault("webserviceAddress", "http://localhost:8080");
this.webserviceAddress = args.getOrDefault("webserviceAddress", "http://ralph.ethz.ch:8080");
//this.webserviceAddress = args.getOrDefault("webserviceAddress", "http://localhost:8080");
this.accessTokenEndpoint = args.getOrDefault("accessTokenEndpoint", "/oauth/token");
this.clientId = args.getOrDefault("clientId", "TO_SET");