Skip to content
Snippets Groups Projects
Commit c1c95e9e authored by Nils Christian Ehmke's avatar Nils Christian Ehmke
Browse files

Some minor code modifications for checkstyle.

parent 1f29e450
No related branches found
No related tags found
No related merge requests found
Showing
with 54 additions and 27 deletions
......@@ -2,7 +2,7 @@
* Copyright 2012 by
* + Christian-Albrechts-University of Kiel
* + Department of Computer Science
* + Software Engineering Group
* + Software Engineering Group
* and others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
......@@ -66,6 +66,9 @@ public final class ProjectsBean {
// No code necessary
}
/**
* Initializes this bean.
*/
@SuppressWarnings("unused")
@PostConstruct
private void init() {
......@@ -158,7 +161,13 @@ public final class ProjectsBean {
public String getAnalysisControllerState(final String project) {
final AnalysisController controller = this.analysisController.get(project);
return (controller == null) ? "N/A" : controller.getState().toString();
final String controllerState;
if (controller == null) {
controllerState = "N/A";
} else {
controllerState = controller.getState().toString();
}
return controllerState;
}
/**
......
......@@ -2,7 +2,7 @@
* Copyright 2012 by
* + Christian-Albrechts-University of Kiel
* + Department of Computer Science
* + Software Engineering Group
* + Software Engineering Group
* and others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
......
......@@ -2,7 +2,7 @@
* Copyright 2012 by
* + Christian-Albrechts-University of Kiel
* + Department of Computer Science
* + Software Engineering Group
* + Software Engineering Group
* and others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
......
......@@ -2,7 +2,7 @@
* Copyright 2012 by
* + Christian-Albrechts-University of Kiel
* + Department of Computer Science
* + Software Engineering Group
* + Software Engineering Group
* and others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
......
......@@ -2,7 +2,7 @@
* Copyright 2012 by
* + Christian-Albrechts-University of Kiel
* + Department of Computer Science
* + Software Engineering Group
* + Software Engineering Group
* and others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
......
......@@ -2,7 +2,7 @@
* Copyright 2012 by
* + Christian-Albrechts-University of Kiel
* + Department of Computer Science
* + Software Engineering Group
* + Software Engineering Group
* and others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
......
......@@ -2,7 +2,7 @@
* Copyright 2012 by
* + Christian-Albrechts-University of Kiel
* + Department of Computer Science
* + Software Engineering Group
* + Software Engineering Group
* and others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
......@@ -155,7 +155,13 @@ public final class CurrentWorkSpaceProjectBean {
}
// Now deliver the correct navigation page
return (this.project != null) ? CurrentWorkSpaceProjectBean.PAGE_PROJECT_WORK_SPACE : "";
final String navigationPage;
if (this.project != null) {
navigationPage = CurrentWorkSpaceProjectBean.PAGE_PROJECT_WORK_SPACE;
} else {
navigationPage = "";
}
return navigationPage;
}
/**
......
......@@ -2,7 +2,7 @@
* Copyright 2012 by
* + Christian-Albrechts-University of Kiel
* + Department of Computer Science
* + Software Engineering Group
* + Software Engineering Group
* and others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
......
......@@ -2,7 +2,7 @@
* Copyright 2012 by
* + Christian-Albrechts-University of Kiel
* + Department of Computer Science
* + Software Engineering Group
* + Software Engineering Group
* and others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
......@@ -251,7 +251,7 @@ public final class FSManager {
final List<String> result = new ArrayList<String>();
// Get all directories within our root-dir
final File files[] = new File(FSManager.ROOT_DIRECTORY).listFiles();
final File[] files = new File(FSManager.ROOT_DIRECTORY).listFiles();
for (final File file : files) {
if (file.isDirectory()) {
result.add(file.getName());
......@@ -298,7 +298,13 @@ public final class FSManager {
final Object newLock = new Object();
final Object existLock = this.projectLocksMap.putIfAbsent(project, newLock);
return (existLock != null) ? existLock : newLock;
final Object lock;
if (existLock != null) {
lock = existLock;
} else {
lock = newLock;
}
return lock;
}
/**
......@@ -375,7 +381,7 @@ public final class FSManager {
synchronized (lock) {
// Run through the libs and put them into our list.
final File libDir = new File(FSManager.ROOT_DIRECTORY + File.separator + projectName + File.separator + FSManager.LIB_DIRECTORY);
final File files[] = libDir.listFiles();
final File[] files = libDir.listFiles();
if (files != null) {
for (final File file : files) {
if (file.getName().endsWith("." + FSManager.LIB_EXTENSION)) {
......@@ -409,7 +415,7 @@ public final class FSManager {
synchronized (lock) {
// Run through the libs and put them into our list.
final File libDir = new File(FSManager.ROOT_DIRECTORY + File.separator + projectName + File.separator + FSManager.LIB_DIRECTORY);
final File files[] = libDir.listFiles();
final File[] files = libDir.listFiles();
if (files != null) {
for (final File file : files) {
if (file.getName().endsWith("." + FSManager.LIB_EXTENSION)) {
......@@ -465,7 +471,7 @@ public final class FSManager {
synchronized (lock) {
// Run through the libs and put them into our list.
final File libDir = new File(FSManager.ROOT_DIRECTORY + File.separator + projectName + File.separator + FSManager.LIB_DIRECTORY);
final File files[] = libDir.listFiles();
final File[] files = libDir.listFiles();
if (files != null) {
for (final File file : files) {
if (file.getName().endsWith("." + FSManager.LIB_EXTENSION)) {
......
......@@ -2,7 +2,7 @@
* Copyright 2012 by
* + Christian-Albrechts-University of Kiel
* + Department of Computer Science
* + Software Engineering Group
* + Software Engineering Group
* and others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
......@@ -26,21 +26,21 @@ package kieker.webgui.common;
* @author Nils Christian Ehmke
* @version 1.0
*
* @param <FST>
* @param <F>
* The type of the first element.
* @param <SND>
* @param <S>
* The type of the second element.
*/
public class Pair<FST, SND> {
public class Pair<F, S> {
/**
* This is the first element.
*/
private FST fst;
private F fst;
/**
* This is the second element.
*/
private SND snd;
private S snd;
/**
* Creates a new instance of this class with null values stored for the elements.
......@@ -57,7 +57,7 @@ public class Pair<FST, SND> {
* @param snd
* The second element to be stored in this object.
*/
public Pair(final FST fst, final SND snd) {
public Pair(final F fst, final S snd) {
this.fst = fst;
this.snd = snd;
}
......@@ -67,7 +67,7 @@ public class Pair<FST, SND> {
*
* @return The first element.
*/
public FST getFst() {
public F getFst() {
return this.fst;
}
......@@ -77,7 +77,7 @@ public class Pair<FST, SND> {
* @param fst
* The new first element.
*/
public void setFst(final FST fst) {
public void setFst(final F fst) {
this.fst = fst;
}
......@@ -86,7 +86,7 @@ public class Pair<FST, SND> {
*
* @return The second element.
*/
public SND getSnd() {
public S getSnd() {
return this.snd;
}
......@@ -96,7 +96,7 @@ public class Pair<FST, SND> {
* @param snd
* The new second element.
*/
public void setSnd(final SND snd) {
public void setSnd(final S snd) {
this.snd = snd;
}
......
......@@ -20,6 +20,12 @@
package kieker.webgui.common.exception;
/**
* This exception shows that an project with the same name exists already.
*
* @author Nils Christian Ehmke
* @version 1.0
*/
public class ProjectAlreadyExistingException extends Exception {
private static final long serialVersionUID = 1L;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment