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

Minor modifications for quality reasons.

parent 11b63109
No related branches found
No related tags found
No related merge requests found
...@@ -769,14 +769,12 @@ public final class ClassAndMethodContainer { ...@@ -769,14 +769,12 @@ public final class ClassAndMethodContainer {
return method.invoke(obj, values); return method.invoke(obj, values);
} catch (final IllegalAccessException ex) { } catch (final IllegalAccessException ex) {
ClassAndMethodContainer.LOG.error("An error occured during a reflection method call.", ex); ClassAndMethodContainer.LOG.error("An error occured during a reflection method call.", ex);
return defaultReturn;
} catch (final IllegalArgumentException ex) { } catch (final IllegalArgumentException ex) {
ClassAndMethodContainer.LOG.error("An error occured during a reflection method call.", ex); ClassAndMethodContainer.LOG.error("An error occured during a reflection method call.", ex);
return defaultReturn;
} catch (final InvocationTargetException ex) { } catch (final InvocationTargetException ex) {
ClassAndMethodContainer.LOG.error("An error occured during a reflection method call.", ex); ClassAndMethodContainer.LOG.error("An error occured during a reflection method call.", ex);
return defaultReturn;
} }
return defaultReturn;
} }
/** /**
...@@ -794,18 +792,14 @@ public final class ClassAndMethodContainer { ...@@ -794,18 +792,14 @@ public final class ClassAndMethodContainer {
return constructor.newInstance(values); return constructor.newInstance(values);
} catch (final InstantiationException ex) { } catch (final InstantiationException ex) {
ClassAndMethodContainer.LOG.error("An error occured during a reflection constructor call.", ex); ClassAndMethodContainer.LOG.error("An error occured during a reflection constructor call.", ex);
return null;
} catch (final IllegalAccessException ex) { } catch (final IllegalAccessException ex) {
ClassAndMethodContainer.LOG.error("An error occured during a reflection constructor call.", ex); ClassAndMethodContainer.LOG.error("An error occured during a reflection constructor call.", ex);
return null;
} catch (final IllegalArgumentException ex) { } catch (final IllegalArgumentException ex) {
ClassAndMethodContainer.LOG.error("An error occured during a reflection constructor call.", ex); ClassAndMethodContainer.LOG.error("An error occured during a reflection constructor call.", ex);
return null;
} catch (final InvocationTargetException ex) { } catch (final InvocationTargetException ex) {
ClassAndMethodContainer.LOG.error("An error occured during a reflection constructor call.", ex); ClassAndMethodContainer.LOG.error("An error occured during a reflection constructor call.", ex);
return null;
} }
return null;
} }
/** /**
......
...@@ -209,16 +209,16 @@ public final class ACManager { ...@@ -209,16 +209,16 @@ public final class ACManager {
final Enum<?> state = analysis.getCurrentState(); final Enum<?> state = analysis.getCurrentState();
if (state != null) { if (state != null) {
if (STATE.FAILED.toString().equals(state.toString())) { if (STATE.FAILED.toString().equals(state.toString())) { // NOPMD (deeply nested if)
retState = STATE.FAILED; retState = STATE.FAILED;
} }
if (STATE.READY.toString().equals(state.toString())) { if (STATE.READY.toString().equals(state.toString())) { // NOPMD (deeply nested if)
retState = STATE.READY; retState = STATE.READY;
} }
if (STATE.RUNNING.toString().equals(state.toString())) { if (STATE.RUNNING.toString().equals(state.toString())) { // NOPMD (deeply nested if)
retState = STATE.RUNNING; retState = STATE.RUNNING;
} }
if (STATE.TERMINATED.toString().equals(state.toString())) { if (STATE.TERMINATED.toString().equals(state.toString())) { // NOPMD (deeply nested if)
retState = STATE.TERMINATED; retState = STATE.TERMINATED;
} }
} }
......
...@@ -36,7 +36,6 @@ import kieker.webgui.common.exception.AnalysisInitializationException; ...@@ -36,7 +36,6 @@ import kieker.webgui.common.exception.AnalysisInitializationException;
import kieker.webgui.common.exception.AnalysisStateException; import kieker.webgui.common.exception.AnalysisStateException;
import kieker.webgui.common.exception.ProjectNotExistingException; import kieker.webgui.common.exception.ProjectNotExistingException;
import kieker.webgui.service.IProjectService; import kieker.webgui.service.IProjectService;
import kieker.webgui.web.beans.application.ProjectsBean;
/** /**
* /** * /**
...@@ -55,8 +54,6 @@ public final class CurrentControllerBean { ...@@ -55,8 +54,6 @@ public final class CurrentControllerBean {
private final List<String> logEntries = new ArrayList<String>(); private final List<String> logEntries = new ArrayList<String>();
private String projectName; private String projectName;
@Autowired
private ProjectsBean projectsBean;
/** /**
* Creates a new instance of this class. <b>Do not use this constructor. This bean is Spring managed.</b> * Creates a new instance of this class. <b>Do not use this constructor. This bean is Spring managed.</b>
...@@ -170,12 +167,11 @@ public final class CurrentControllerBean { ...@@ -170,12 +167,11 @@ public final class CurrentControllerBean {
return this.projectService.getCurrentState(this.projectName) == AnalysisController.STATE.RUNNING; return this.projectService.getCurrentState(this.projectName) == AnalysisController.STATE.RUNNING;
} catch (final ProjectNotExistingException ex) { } catch (final ProjectNotExistingException ex) {
CurrentControllerBean.LOG.info("The project does not exist.", ex); CurrentControllerBean.LOG.info("The project does not exist.", ex);
return false;
} catch (final NullPointerException ex) { } catch (final NullPointerException ex) {
// This exception can occur, when the projectsBean has not been initialized // This exception can occur, when the projectsBean has not been initialized
CurrentControllerBean.LOG.warn("A null pointer exception occured.", ex); CurrentControllerBean.LOG.warn("A null pointer exception occured.", ex);
return false;
} }
return false;
} }
/** /**
...@@ -188,13 +184,11 @@ public final class CurrentControllerBean { ...@@ -188,13 +184,11 @@ public final class CurrentControllerBean {
return this.projectService.getCurrentState(this.projectName) == AnalysisController.STATE.READY; return this.projectService.getCurrentState(this.projectName) == AnalysisController.STATE.READY;
} catch (final ProjectNotExistingException ex) { } catch (final ProjectNotExistingException ex) {
CurrentControllerBean.LOG.info("The project does not exist.", ex); CurrentControllerBean.LOG.info("The project does not exist.", ex);
return false;
} catch (final NullPointerException ex) { } catch (final NullPointerException ex) {
// This exception can occur, when the projectsBean has not been initialized // This exception can occur, when the projectsBean has not been initialized
CurrentControllerBean.LOG.warn("A null pointer exception occured.", ex); CurrentControllerBean.LOG.warn("A null pointer exception occured.", ex);
return false;
} }
return false;
} }
/** /**
...@@ -203,18 +197,15 @@ public final class CurrentControllerBean { ...@@ -203,18 +197,15 @@ public final class CurrentControllerBean {
* @return true if and only if the analysis is <b>not</b> available. * @return true if and only if the analysis is <b>not</b> available.
*/ */
public synchronized boolean isAnalysisNotAvailable() { public synchronized boolean isAnalysisNotAvailable() {
try { try {
return this.projectService.getCurrentState(this.projectName) == null; return this.projectService.getCurrentState(this.projectName) == null;
} catch (final ProjectNotExistingException ex) { } catch (final ProjectNotExistingException ex) {
CurrentControllerBean.LOG.info("The project does not exist.", ex); CurrentControllerBean.LOG.info("The project does not exist.", ex);
return true;
} catch (final NullPointerException ex) { } catch (final NullPointerException ex) {
// This exception can occur, when the projectsBean has not been initialized // This exception can occur, when the projectsBean has not been initialized
CurrentControllerBean.LOG.warn("A null pointer exception occured.", ex); CurrentControllerBean.LOG.warn("A null pointer exception occured.", ex);
return true;
} }
return true;
} }
/** /**
...@@ -223,18 +214,15 @@ public final class CurrentControllerBean { ...@@ -223,18 +214,15 @@ public final class CurrentControllerBean {
* @return true if and only if the analysis has been terminated. * @return true if and only if the analysis has been terminated.
*/ */
public synchronized boolean isAnalysisTerminated() { public synchronized boolean isAnalysisTerminated() {
try { try {
return this.projectService.getCurrentState(this.projectName) == AnalysisController.STATE.TERMINATED; return this.projectService.getCurrentState(this.projectName) == AnalysisController.STATE.TERMINATED;
} catch (final ProjectNotExistingException ex) { } catch (final ProjectNotExistingException ex) {
CurrentControllerBean.LOG.info("The project does not exist.", ex); CurrentControllerBean.LOG.info("The project does not exist.", ex);
return false;
} catch (final NullPointerException ex) { } catch (final NullPointerException ex) {
// This exception can occur, when the projectsBean has not been initialized // This exception can occur, when the projectsBean has not been initialized
CurrentControllerBean.LOG.warn("A null pointer exception occured.", ex); CurrentControllerBean.LOG.warn("A null pointer exception occured.", ex);
return false;
} }
return false;
} }
/** /**
...@@ -243,18 +231,15 @@ public final class CurrentControllerBean { ...@@ -243,18 +231,15 @@ public final class CurrentControllerBean {
* @return true if and only if the analysis has failed. * @return true if and only if the analysis has failed.
*/ */
public synchronized boolean isAnalysisFailed() { public synchronized boolean isAnalysisFailed() {
try { try {
return this.projectService.getCurrentState(this.projectName) == AnalysisController.STATE.FAILED; return this.projectService.getCurrentState(this.projectName) == AnalysisController.STATE.FAILED;
} catch (final ProjectNotExistingException ex) { } catch (final ProjectNotExistingException ex) {
CurrentControllerBean.LOG.info("The project does not exist.", ex); CurrentControllerBean.LOG.info("The project does not exist.", ex);
return false;
} catch (final NullPointerException ex) { } catch (final NullPointerException ex) {
// This exception can occur, when the projectsBean has not been initialized // This exception can occur, when the projectsBean has not been initialized
CurrentControllerBean.LOG.warn("A null pointer exception occured.", ex); CurrentControllerBean.LOG.warn("A null pointer exception occured.", ex);
return false;
} }
return false;
} }
/** /**
......
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