mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fixing findbugs errors: "Method checks the result of a new allocation" and "Overzealous casting".
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@113200 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -578,10 +578,10 @@ public class RecordsManagementSearchBehaviour implements RecordsManagementModel
|
|||||||
// Apply the search aspect
|
// Apply the search aspect
|
||||||
applySearchAspect(record);
|
applySearchAspect(record);
|
||||||
|
|
||||||
Collection<String> events = (List<String>)nodeService.getProperty(record, PROP_RS_DISPOSITION_EVENTS);
|
Collection<String> events = (Collection<String>)nodeService.getProperty(record, PROP_RS_DISPOSITION_EVENTS);
|
||||||
if (events == null)
|
if (events == null)
|
||||||
{
|
{
|
||||||
events = new ArrayList<String>(1);
|
events = new ArrayList<>(1);
|
||||||
}
|
}
|
||||||
events.add((String)nodeService.getProperty(eventExecution, PROP_EVENT_EXECUTION_NAME));
|
events.add((String)nodeService.getProperty(eventExecution, PROP_EVENT_EXECUTION_NAME));
|
||||||
nodeService.setProperty(record, PROP_RS_DISPOSITION_EVENTS, (Serializable)events);
|
nodeService.setProperty(record, PROP_RS_DISPOSITION_EVENTS, (Serializable)events);
|
||||||
|
@@ -116,8 +116,6 @@ public class RecordsManagementSearchServiceImpl implements RecordsManagementSear
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
JSONArray jsonArray = new JSONArray(reportsJSON);
|
JSONArray jsonArray = new JSONArray(reportsJSON);
|
||||||
if (jsonArray != null)
|
|
||||||
{
|
|
||||||
for (int i=0; i < jsonArray.length(); i++)
|
for (int i=0; i < jsonArray.length(); i++)
|
||||||
{
|
{
|
||||||
JSONObject report = jsonArray.getJSONObject(i);
|
JSONObject report = jsonArray.getJSONObject(i);
|
||||||
@@ -163,7 +161,6 @@ public class RecordsManagementSearchServiceImpl implements RecordsManagementSear
|
|||||||
ReportDetails reportDetails = new ReportDetails(name, description, query, searchParameters);
|
ReportDetails reportDetails = new ReportDetails(name, description, query, searchParameters);
|
||||||
reports.add(reportDetails);
|
reports.add(reportDetails);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch (JSONException exception)
|
catch (JSONException exception)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user