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

Code comments; Refactoring and code quality within the...

Code comments; Refactoring and code quality within the CurrentAnalysisEditorGraphBean; Solved a minor bug by escaping the names of the components
parent f3a305dd
No related branches found
No related tags found
No related merge requests found
...@@ -213,6 +213,13 @@ public final class GraphLayoutServiceImpl implements IGraphLayoutService { ...@@ -213,6 +213,13 @@ public final class GraphLayoutServiceImpl implements IGraphLayoutService {
} }
} }
/**
* This simple method "corrects" an array containing only an empty string.
*
* @param arr
* The array to be corrected.
* @return An corrected version of the array.
*/
private static String[] correctEmptyArray(final String[] arr) { private static String[] correctEmptyArray(final String[] arr) {
return ((arr.length == 1) && arr[0].isEmpty()) ? new String[0] : arr; return ((arr.length == 1) && arr[0].isEmpty()) ? new String[0] : arr;
} }
...@@ -225,6 +232,10 @@ public final class GraphLayoutServiceImpl implements IGraphLayoutService { ...@@ -225,6 +232,10 @@ public final class GraphLayoutServiceImpl implements IGraphLayoutService {
* @param edgesStr * @param edgesStr
* The string containing the information about the edges. * The string containing the information about the edges.
* @return An object containing the layout information for the graph. * @return An object containing the layout information for the graph.
* @throws UninitializedGraphException
* If the graph has not been initialized yet.
* @throws InvalidInputSizeException
* IF the input size of the graph is somehow invalid.
*/ */
private static LayoutInformation assembleLayoutInformation(final String nodesStr, final String edgesStr) throws UninitializedGraphException, private static LayoutInformation assembleLayoutInformation(final String nodesStr, final String edgesStr) throws UninitializedGraphException,
InvalidInputSizeException { InvalidInputSizeException {
......
...@@ -15,4 +15,5 @@ ...@@ -15,4 +15,5 @@
<jdbc:script location="classpath:sql/tables.sql"/> <jdbc:script location="classpath:sql/tables.sql"/>
<jdbc:script location="classpath:sql/test-data.sql"/> <jdbc:script location="classpath:sql/test-data.sql"/>
</jdbc:initialize-database> </jdbc:initialize-database>
</beans> </beans>
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