mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Reduce Sonar issues from automation-community-rest-api
This commit is contained in:
@@ -109,7 +109,7 @@ public class Record extends TestModel implements IRestModel<RestNodeModel>
|
||||
@Override
|
||||
public ModelAssertion<RestNodeModel> assertThat()
|
||||
{
|
||||
return new ModelAssertion<RestNodeModel>(this);
|
||||
return new ModelAssertion<>(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -53,7 +53,7 @@ import lombok.NoArgsConstructor;
|
||||
@AllArgsConstructor
|
||||
public class RecordCategory extends TestModel
|
||||
{
|
||||
public final static String DEFAULT_FILE_PLAN_ALIAS = "-filePlan-";
|
||||
public static final String DEFAULT_FILE_PLAN_ALIAS = "-filePlan-";
|
||||
|
||||
/*************************/
|
||||
/** Mandatory parameters */
|
||||
|
@@ -53,7 +53,7 @@ import lombok.NoArgsConstructor;
|
||||
@AllArgsConstructor
|
||||
public class RecordCategoryChild extends TestModel
|
||||
{
|
||||
public final static String RECORD_FOLDER_NODE_TYPE = "rma:recordFolder";
|
||||
public static final String RECORD_FOLDER_NODE_TYPE = "rma:recordFolder";
|
||||
|
||||
/*************************/
|
||||
/** Mandatory parameters */
|
||||
|
@@ -28,7 +28,6 @@ package org.alfresco.rest.rm.community.requests.gscore.api;
|
||||
|
||||
import static org.alfresco.rest.core.RestRequest.simpleRequest;
|
||||
import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryString;
|
||||
import static org.apache.commons.lang3.StringUtils.EMPTY;
|
||||
import static org.springframework.http.HttpMethod.POST;
|
||||
|
||||
import org.alfresco.rest.core.RMRestWrapper;
|
||||
|
@@ -54,6 +54,10 @@ public class PojoUtility
|
||||
*/
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(PojoUtility.class);
|
||||
|
||||
/** Private constructor to prevent instantiation. */
|
||||
private PojoUtility()
|
||||
{}
|
||||
|
||||
/**
|
||||
* see {@link #toJson(Object, Class, Class)}
|
||||
*/
|
||||
@@ -122,7 +126,7 @@ public class PojoUtility
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
LOGGER.error("Unable to convert the json into a java object.", e.toString());
|
||||
LOGGER.error("Unable to convert the json into a java object.", e);
|
||||
}
|
||||
|
||||
return obj;
|
||||
@@ -152,7 +156,7 @@ public class PojoUtility
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
LOGGER.error("Unable to convert the json array into a java collection.", e.toString());
|
||||
LOGGER.error("Unable to convert the json array into a java collection.", e);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -105,7 +105,7 @@ public class CustomDefinitionsAPI extends BaseAPI
|
||||
}
|
||||
catch (JSONException error)
|
||||
{
|
||||
LOGGER.error("Unable to get the refId for the custom reference definition " + customDefinition);
|
||||
LOGGER.error("Unable to get the refId for the custom reference definition {}", customDefinition);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@@ -76,7 +76,7 @@ public class RMAuditAPI extends BaseAPI
|
||||
}
|
||||
catch (UnsupportedEncodingException e)
|
||||
{
|
||||
LOGGER.error("Unable to encode the event name" + e.getMessage());
|
||||
LOGGER.error("Unable to encode the event name {}", e.getMessage());
|
||||
}
|
||||
JSONArray auditEntries = doGetRequest(user, password,
|
||||
MessageFormat.format(RM_AUDIT_LOG_API,"{0}", parameters)).getJSONObject("data").getJSONArray("entries");
|
||||
|
@@ -102,7 +102,7 @@ public class SearchAPI extends BaseAPI
|
||||
String filters,
|
||||
String sortby)
|
||||
{
|
||||
List<BasicNameValuePair> searchParameters = new ArrayList<BasicNameValuePair>();
|
||||
List<BasicNameValuePair> searchParameters = new ArrayList<>();
|
||||
searchParameters.add(new BasicNameValuePair("query", query));
|
||||
searchParameters.add(new BasicNameValuePair("filters", filters));
|
||||
if (sortby != null)
|
||||
|
Reference in New Issue
Block a user