update the getChildrenPropertyValues return type
update the existing tests from RecordsManagementQueryDAOImplTest that test getChildrenPropertyValues() method
Sonar suggested using the Java 8 method Instant.truncatedTo, as it is faster than
DateUtils.truncate. However it has different handling of TimeZones, and the old
version of this code only works when the server is set to use UTC. In order to fix
this 'properly' we need code like:
date = (date == null ? new Date() : date);
return Date.from(date.toInstant().atZone(ZoneId.systemDefault()).truncatedTo(ChronoUnit.DAYS).toInstant());
which is significantly less readable than just using DateUtils.truncate. Given that
this code hasn't ever been highlighted by our profiling, I suggest we revert back
to the older code.
Avoid NPE if calculateListOfEmptyFolders returns null in ScheduleXRecordLoaders.
Fix equals method of a few classes to check against the other instance.
Make synchonisation consistent in AppliedSourceServiceImpl and also remove a
redundant null check.
Use Arrays.toString to make a more readable string representation of an array.
Combine a few if statement branches that do the same thing.
This creates an edge case where DOD audit entries are no longer displayed
if a DOD RM site is deleted and then a standard RM site is created to
replace it. However this seems like an unlikely use case, and there is a
workaround of exporting the audit log before deleting the DOD RM site.
Two audit queries are still made for DOD RM sites because DOD sites cause
some standard audit entries to be created (e.g. the holds container
created event, etc.).
If the empty string is passed as a classification reason or exemption id then the API framework
converts it to null for us. We should throw a 404 (not found) error, because there are no reasons
or exemptions with the empty string as their id (or null for that matter). Add two new REST API
tests for these cases.
Also stopped using the helper method addParam in TopicsWithInstructionsTest, as it is only saving us
about ten characters, causes an extra import and includes an explicit mention of the topicsApi
inside it (i.e. it doesn't work at all with the guidesAPI).