[CST-5587] Fixed LGTM alerts

This commit is contained in:
Luca Giamminonni
2022-06-10 12:55:43 +02:00
parent bc7d6a8a70
commit c77350c253
7 changed files with 19 additions and 20 deletions

View File

@@ -254,7 +254,8 @@ public class OrcidQueueConsumer implements Consumer {
}
if (StringUtils.isBlank(putCode)) {
LOGGER.warn("The orcid history record with id {} should have a not blank put code");
LOGGER.warn("The orcid history record with id {} should have a not blank put code",
historyRecord.getID());
continue;
}

View File

@@ -76,7 +76,7 @@ public interface OrcidQueueDAO extends GenericDAO<OrcidQueue> {
*
* @param context DSpace context object
* @param entity the entity item
* @param recordType the record type
* @param type the record type
* @throws SQLException if database error occurs
*/
public List<OrcidQueue> findByEntityAndRecordType(Context context, Item entity, String type) throws SQLException;
@@ -86,7 +86,7 @@ public interface OrcidQueueDAO extends GenericDAO<OrcidQueue> {
*
* @param context DSpace context object
* @param owner the owner item
* @param recordType the record type
* @param type the record type
* @throws SQLException if database error occurs
*/
public List<OrcidQueue> findByOwnerAndRecordType(Context context, Item owner, String type) throws SQLException;

View File

@@ -80,18 +80,18 @@ public interface OrcidHistoryService {
/**
* Delete an OrcidHistory
*
* @param context context
* @param OrcidHistory orcidHistory
* @throws SQLException if database error
* @param context context
* @param orcidHistory the OrcidHistory entity to delete
* @throws SQLException if database error
*/
public void delete(Context context, OrcidHistory orcidHistory) throws SQLException;
/**
* Update the OrcidHistory
*
* @param context context
* @param OrcidHistory orcidHistory
* @throws SQLException if database error
* @param context context
* @param orcidHistory the OrcidHistory entity to update
* @throws SQLException if database error
*/
public void update(Context context, OrcidHistory orcidHistory) throws SQLException;

View File

@@ -142,10 +142,8 @@ public interface OrcidQueueService {
* Get the orcid queue records by the owner and entity.
*
* @param context DSpace context object
* @param ownerId the owner item
* @param entityId the entity item
* @param limit limit
* @param offset offset
* @param owner the owner item
* @param entity the entity item
* @return the found OrcidQueue records
* @throws SQLException if an SQL error occurs
*/
@@ -195,7 +193,7 @@ public interface OrcidQueueService {
* Delete an OrcidQueue
*
* @param context DSpace context object
* @param OrcidQueue orcidQueue
* @param orcidQueue the orcidQueue record to delete
* @throws SQLException if database error
* @throws AuthorizeException if authorization error
*/
@@ -234,9 +232,9 @@ public interface OrcidQueueService {
/**
* Update the OrcidQueue
*
* @param context context
* @param OrcidQueue orcidQueue
* @throws SQLException if database error
* @param context context
* @param orcidQueue the OrcidQueue to update
* @throws SQLException if database error
*/
public void update(Context context, OrcidQueue orcidQueue) throws SQLException;
}

View File

@@ -82,7 +82,7 @@ public interface OrcidSynchronizationService {
*
* @param context the relevant DSpace Context.
* @param profile the researcher profile to update
* @param value the new synchronization preference value
* @param values the new synchronization preference values
* @return true if the value has actually been updated,
* false if the value to be set is the same as
* the one already configured

View File

@@ -64,7 +64,7 @@ public class ExternalSourceEntryOrcidQueueUriListHandler
matcher.find();
String id = matcher.group(1);
Integer queueId = Integer.parseInt(id);
int queueId = Integer.parseInt(id);
try {
orcidQueue = orcidQueueService.find(context, queueId);
} catch (SQLException e) {

View File

@@ -68,7 +68,7 @@ public class OrcidHistorySendToOrcidRestPermissionEvaluatorPlugin extends RestOb
matcher.find();
String id = matcher.group(1);
Integer queueId = Integer.parseInt(id);
int queueId = Integer.parseInt(id);
OrcidQueue orcidQueue = null;
try {
orcidQueue = orcidQueueService.find(context, queueId);