Made a code review.

This commit is contained in:
Christian P. MOMON 2020-01-22 19:37:28 +01:00
parent 4e52f3ebd6
commit 4d8d0f4fda
14 changed files with 113 additions and 52 deletions

View file

@ -1,3 +1,3 @@
#Build Number for ANT. Do not edit! #Build Number for ANT. Do not edit!
#Wed Jan 22 19:29:14 CET 2020 #Wed Jan 22 19:36:44 CET 2020
build.number=4 build.number=4

View file

@ -38,7 +38,7 @@ public final class SQLUtils
private static Logger logger = LoggerFactory.getLogger(SQLUtils.class); private static Logger logger = LoggerFactory.getLogger(SQLUtils.class);
/** /**
* Instantiates a new connector. * Instantiates a new SQL utils.
*/ */
private SQLUtils() private SQLUtils()
{ {
@ -155,12 +155,19 @@ public final class SQLUtils
} }
/** /**
* Gets the connexion.
* *
* This method launch CLI. * @param serverUrl
* * the server url
* @param args * @param databaseName
* necessary arguments * the database name
* @param login
* the login
* @param password
* the password
* @return the connexion
* @throws AgirStatoolException * @throws AgirStatoolException
* the agir statool exception
*/ */
public static Connection getConnexion(final String serverUrl, final String databaseName, final String login, final String password) throws AgirStatoolException public static Connection getConnexion(final String serverUrl, final String databaseName, final String login, final String password) throws AgirStatoolException
{ {
@ -207,6 +214,17 @@ public final class SQLUtils
return result; return result;
} }
/**
* Gets the nullable long.
*
* @param resultSet
* the result set
* @param index
* the index
* @return the nullable long
* @throws SQLException
* the SQL exception
*/
public static Long getNullableLong(final ResultSet resultSet, final int index) throws SQLException public static Long getNullableLong(final ResultSet resultSet, final int index) throws SQLException
{ {
Long result; Long result;

View file

@ -225,12 +225,8 @@ public class AgirStatool
/** /**
* Fetch week concluded count. * Fetch week concluded count.
* *
* In Redmine database: closed_on when resolved, rejected or closed.
*
* @param project * @param project
* the project * the project
* @param consolidated
* the consolidated
* @return the date count map * @return the date count map
* @throws AgirStatoolException * @throws AgirStatoolException
* the agir statool exception * the agir statool exception
@ -311,8 +307,6 @@ public class AgirStatool
* *
* @param project * @param project
* the project * the project
* @param consolidated
* the consolidated
* @return the date count map * @return the date count map
* @throws AgirStatoolException * @throws AgirStatoolException
* the agir statool exception * the agir statool exception
@ -389,9 +383,9 @@ public class AgirStatool
} }
/** /**
* Gets the project all. * Gets the root project.
* *
* @return the project all * @return the root project
* @throws AgirStatoolException * @throws AgirStatoolException
* the agir statool exception * the agir statool exception
*/ */
@ -693,10 +687,10 @@ public class AgirStatool
} }
/** /**
* List projects. * List projects with stats.
* *
* @param consolidated * @param type
* the consolidated * the type
* @return the projects * @return the projects
* @throws AgirStatoolException * @throws AgirStatoolException
* the agir statool exception * the agir statool exception

View file

@ -286,9 +286,13 @@ public class AgirStatoolUtils
} }
/** /**
* To human short.
*
* @param value * @param value
* the value
* @param defaultValue * @param defaultValue
* @return * the default value
* @return the string
*/ */
public static String toHumanShort(final LocalDateTime value, final String defaultValue) public static String toHumanShort(final LocalDateTime value, final String defaultValue)
{ {

View file

@ -141,7 +141,9 @@ public class Project
} }
/** /**
* @return * Checks for issue.
*
* @return true, if successful
*/ */
public boolean hasIssue() public boolean hasIssue()
{ {

View file

@ -17,8 +17,10 @@ public class ProjectComparator implements Comparator<Project>
private Sorting sorting; private Sorting sorting;
/** /**
* Instantiates a new project comparator.
* *
* @param sorting * @param sorting
* the sorting
*/ */
public ProjectComparator(final Sorting sorting) public ProjectComparator(final Sorting sorting)
{ {
@ -41,7 +43,15 @@ public class ProjectComparator implements Comparator<Project>
} }
/** /**
* Compare.
* *
* @param alpha
* the alpha
* @param bravo
* the bravo
* @param sorting
* the sorting
* @return the int
*/ */
public static int compare(final Project alpha, final Project bravo, final Sorting sorting) public static int compare(final Project alpha, final Project bravo, final Sorting sorting)
{ {
@ -74,9 +84,11 @@ public class ProjectComparator implements Comparator<Project>
} }
/** /**
* Gets the id.
* *
* @param source * @param source
* @return * the source
* @return the id
*/ */
public static Long getId(final Project source) public static Long getId(final Project source)
{ {
@ -96,9 +108,11 @@ public class ProjectComparator implements Comparator<Project>
} }
/** /**
* Gets the identifier.
* *
* @param source * @param source
* @return * the source
* @return the identifier
*/ */
public static String getIdentifier(final Project source) public static String getIdentifier(final Project source)
{ {
@ -118,9 +132,11 @@ public class ProjectComparator implements Comparator<Project>
} }
/** /**
* Gets the name.
* *
* @param source * @param source
* @return * the source
* @return the name
*/ */
public static String getName(final Project source) public static String getName(final Project source)
{ {

View file

@ -40,8 +40,14 @@ public class ChartBarView
/** /**
* Builds the. * Builds the.
* *
* @param projects * @param title
* the projects * the title
* @param labelTitle
* the label title
* @param labels
* the labels
* @param values
* the values
* @return the string * @return the string
* @throws AgirStatoolException * @throws AgirStatoolException
* the agir statool exception * the agir statool exception

View file

@ -40,8 +40,14 @@ public class ChartPolarView
/** /**
* Builds the. * Builds the.
* *
* @param projects * @param title
* the projects * the title
* @param labelTitle
* the label title
* @param labels
* the labels
* @param values
* the values
* @return the string * @return the string
* @throws AgirStatoolException * @throws AgirStatoolException
* the agir statool exception * the agir statool exception

View file

@ -97,10 +97,12 @@ public class CreatedConcludedCountChartView
} }
/** /**
* Builds the. * Builds the full.
* *
* @param projects * @param title
* the projects * the title
* @param project
* the project
* @return the string * @return the string
* @throws AgirStatoolException * @throws AgirStatoolException
* the agir statool exception * the agir statool exception
@ -167,10 +169,15 @@ public class CreatedConcludedCountChartView
} }
/** /**
* Builds the previous year.
*
* @param title * @param title
* the title
* @param project * @param project
* @return * the project
* @return the string
* @throws AgirStatoolException * @throws AgirStatoolException
* the agir statool exception
*/ */
public static String buildPreviousYear(final String title, final Project project) throws AgirStatoolException public static String buildPreviousYear(final String title, final Project project) throws AgirStatoolException
{ {

View file

@ -35,8 +35,10 @@ public class IssueStatChartView
/** /**
* Builds the. * Builds the.
* *
* @param projects * @param title
* the projects * the title
* @param project
* the project
* @return the string * @return the string
* @throws AgirStatoolException * @throws AgirStatoolException
* the agir statool exception * the agir statool exception
@ -64,8 +66,10 @@ public class IssueStatChartView
/** /**
* Builds the grouped. * Builds the grouped.
* *
* @param stats * @param title
* the stats * the title
* @param project
* the project
* @return the string * @return the string
* @throws AgirStatoolException * @throws AgirStatoolException
* the agir statool exception * the agir statool exception

View file

@ -39,8 +39,8 @@ public class ProjectPage
/** /**
* Builds the. * Builds the.
* *
* @param projects * @param project
* the projects * the project
* @return the string * @return the string
* @throws AgirStatoolException * @throws AgirStatoolException
* the agir statool exception * the agir statool exception

View file

@ -42,8 +42,8 @@ public class ProjectsGroupedView
/** /**
* Builds the. * Builds the.
* *
* @param projects * @param project
* the projects * the project
* @return the string * @return the string
* @throws AgirStatoolException * @throws AgirStatoolException
* the agir statool exception * the agir statool exception

View file

@ -40,8 +40,8 @@ public class ProjectsRawView
/** /**
* Builds the. * Builds the.
* *
* @param projects * @param project
* the projects * the project
* @return the string * @return the string
* @throws AgirStatoolException * @throws AgirStatoolException
* the agir statool exception * the agir statool exception

View file

@ -34,10 +34,12 @@ public class UnassignedPolarChartView
private static Logger logger = LoggerFactory.getLogger(UnassignedPolarChartView.class); private static Logger logger = LoggerFactory.getLogger(UnassignedPolarChartView.class);
/** /**
* Builds the grouped. * Builds the.
* *
* @param stats * @param title
* the stats * the title
* @param project
* the project
* @return the string * @return the string
* @throws AgirStatoolException * @throws AgirStatoolException
* the agir statool exception * the agir statool exception
@ -64,10 +66,12 @@ public class UnassignedPolarChartView
} }
/** /**
* Builds the. * Builds the grouped.
* *
* @param projects * @param title
* the projects * the title
* @param project
* the project
* @return the string * @return the string
* @throws AgirStatoolException * @throws AgirStatoolException
* the agir statool exception * the agir statool exception