code cleanup

This commit is contained in:
anhefti 2019-10-08 11:23:53 +02:00
parent eccafd20a5
commit d696c32763
3 changed files with 3 additions and 8 deletions

View file

@ -31,7 +31,6 @@ import org.eclipse.swt.widgets.Label;
import ch.ethz.seb.sebserver.gbl.Constants;
import ch.ethz.seb.sebserver.gui.service.i18n.I18nSupport;
import ch.ethz.seb.sebserver.gui.service.i18n.LocTextKey;
import ch.ethz.seb.sebserver.gui.service.push.ServerPushService;
public class FileUploadSelection extends Composite {
@ -41,7 +40,6 @@ public class FileUploadSelection extends Composite {
new LocTextKey("sebserver.overall.upload");
private final I18nSupport i18nSupport;
private final ServerPushService serverPushService;
private final List<String> supportedFileExtensions = new ArrayList<>();
private final boolean readonly;
@ -53,7 +51,6 @@ public class FileUploadSelection extends Composite {
public FileUploadSelection(
final Composite parent,
final ServerPushService serverPushService,
final I18nSupport i18nSupport,
final boolean readonly) {
@ -66,7 +63,6 @@ public class FileUploadSelection extends Composite {
super.setLayout(gridLayout);
this.i18nSupport = i18nSupport;
this.serverPushService = serverPushService;
this.readonly = readonly;
if (readonly) {

View file

@ -623,7 +623,8 @@ public class WidgetFactory {
final Collection<String> supportedFiles) {
final FileUploadSelection fileUploadSelection =
new FileUploadSelection(parent, null, this.i18nSupport, readonly);
new FileUploadSelection(parent, this.i18nSupport, readonly);
if (supportedFiles != null) {
supportedFiles.forEach(ext -> fileUploadSelection.withSupportFor(ext));
}

View file

@ -16,8 +16,6 @@ import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import com.fasterxml.jackson.databind.ObjectWriter;
import ch.ethz.seb.sebserver.gbl.api.ExamAPIDiscovery;
import ch.ethz.seb.sebserver.gbl.api.ExamAPIDiscovery.ExamAPIVersion;
import ch.ethz.seb.sebserver.gbl.api.JSONMapper;
@ -37,7 +35,7 @@ public class ExamDiscoveryEndpointTest extends ExamAPIIntegrationTester {
.andExpect(status().isOk())
.andReturn().getResponse().getContentAsString();
final ObjectWriter writer = this.jsonMapper.writerWithDefaultPrettyPrinter();
// final ObjectWriter writer = this.jsonMapper.writerWithDefaultPrettyPrinter();
final ExamAPIDiscovery examAPIDiscovery = this.jsonMapper.readValue(contentAsString, ExamAPIDiscovery.class);
assertNotNull(examAPIDiscovery);