From ebbfde47182b533fe10ab6f8cf2e26da5b9dc8a2 Mon Sep 17 00:00:00 2001 From: anhefti Date: Mon, 9 Sep 2019 13:19:43 +0200 Subject: [PATCH] code cleanup and fixes --- findbugs-excludes.xml | 5 +++++ .../servicelayer/lms/impl/OpenEdxLmsAPITemplate.java | 4 ++-- src/test/java/ch/ethz/seb/sebserver/HTTPClientBot.java | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/findbugs-excludes.xml b/findbugs-excludes.xml index da299227..6880981a 100644 --- a/findbugs-excludes.xml +++ b/findbugs-excludes.xml @@ -23,6 +23,11 @@ + + + + + diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/OpenEdxLmsAPITemplate.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/OpenEdxLmsAPITemplate.java index e6ede94d..258ce25a 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/OpenEdxLmsAPITemplate.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/OpenEdxLmsAPITemplate.java @@ -170,8 +170,6 @@ final class OpenEdxLmsAPITemplate implements LmsAPITemplate { private Result 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 tokenAccessPaths = this.knownTokenAccessPaths.iterator(); while (tokenAccessPaths.hasNext()) { final String accessTokenRequestPath = tokenAccessPaths.next(); diff --git a/src/test/java/ch/ethz/seb/sebserver/HTTPClientBot.java b/src/test/java/ch/ethz/seb/sebserver/HTTPClientBot.java index f01129b0..39a853bf 100644 --- a/src/test/java/ch/ethz/seb/sebserver/HTTPClientBot.java +++ b/src/test/java/ch/ethz/seb/sebserver/HTTPClientBot.java @@ -78,8 +78,8 @@ public class HTTPClientBot { public HTTPClientBot(final Map 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");