Skip to content

Commit

Permalink
Fix license header formatting and checkstyle issues
Browse files Browse the repository at this point in the history
  • Loading branch information
claussni committed Sep 21, 2015
1 parent 65d054e commit 338722c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 18 deletions.
18 changes: 10 additions & 8 deletions src/main/java/org/fcrepo/sword/service/SWORDProviderService.java
@@ -1,12 +1,12 @@
/**
* Copyright 2015 DuraSpace, Inc.
* <p>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down Expand Up @@ -176,13 +176,15 @@ public Service serviceDocument() {
return service;
}

private void addWorkspaces(Service service, FedoraResource fedoraResource) {
private void addWorkspaces(final Service service, final FedoraResource fedoraResource) {
try {
Value[] dcTitles = fedoraResource.getProperty("dc:title").getValues();
final Value[] dcTitles = fedoraResource.getProperty("dc:title").getValues();
if (dcTitles.length > 0) {
try {
String title = dcTitles[0].getString();
if (!title.isEmpty()) service.addWorkspace(title);
final String title = dcTitles[0].getString();
if (!title.isEmpty()) {
service.addWorkspace(title);
}
} catch (IndexOutOfBoundsException | NullPointerException e) {
log.warn("Found workspace container without dc:title property: "
+ fedoraResource.getPath());
Expand Down
@@ -1,12 +1,12 @@
/**
* Copyright 2015 DuraSpace, Inc.
* <p>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down Expand Up @@ -79,7 +79,7 @@ protected HttpResponse requestServiceDocument() throws IOException {
return httpClient.execute(get);
}

protected HttpResponse createWorkspaceNode(String title) throws IOException {
protected HttpResponse createWorkspaceNode(final String title) throws IOException {
final HttpPost post = new HttpPost(String.format("http://%s:%s/%s/",
HOSTNAME,
SERVER_PORT,
Expand Down
@@ -1,12 +1,12 @@
/**
* Copyright 2015 DuraSpace, Inc.
* <p>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down Expand Up @@ -73,7 +73,7 @@ public void canCreateNewWorkspace() throws IOException {

@Test
public void definedWorkspaceGetsListetInServiceDocument() throws IOException {
String title = "Test Workspace";
final String title = "Test Workspace";
createWorkspaceNode(title);
final HttpResponse response = requestServiceDocument();
final Service service = serviceDocumentFromStream(response.getEntity().getContent());
Expand Down

0 comments on commit 338722c

Please sign in to comment.