mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Merge branch 'master' into 'master'
Fix only reading one result when multiple results are present See merge request entgra/carbon-device-mgt!436
This commit is contained in:
commit
c8c817750e
@ -1837,7 +1837,7 @@ public abstract class AbstractDeviceDAOImpl implements DeviceDAO {
|
||||
try (ResultSet rs = ps.executeQuery()) {
|
||||
List<Device> devices = new ArrayList<>();
|
||||
DeviceInfo deviceInfo = new DeviceInfo();
|
||||
if (rs.next()) {
|
||||
while (rs.next()) {
|
||||
Device device = DeviceManagementDAOUtil.loadDevice(rs);
|
||||
deviceInfo.setOsVersion(rs.getString(Constants.OS_VERSION));
|
||||
deviceInfo.setOsBuildDate(rs.getString(Constants.OS_BUILD_DATE));
|
||||
|
||||
@ -876,7 +876,7 @@ public class OracleDeviceDAOImpl extends AbstractDeviceDAOImpl {
|
||||
try (ResultSet rs = ps.executeQuery()) {
|
||||
List<Device> devices = new ArrayList<>();
|
||||
DeviceInfo deviceInfo = new DeviceInfo();
|
||||
if (rs.next()) {
|
||||
while (rs.next()) {
|
||||
Device device = DeviceManagementDAOUtil.loadDevice(rs);
|
||||
deviceInfo.setOsVersion(rs.getString(Constants.OS_VERSION));
|
||||
deviceInfo.setOsBuildDate(rs.getString(Constants.OS_BUILD_DATE));
|
||||
|
||||
@ -160,7 +160,6 @@ public class ReportManagementServiceImpl implements ReportManagementService {
|
||||
public PaginationResult getDevicesExpiredByOSVersion(PaginationRequest request)
|
||||
throws ReportManagementException, DeviceTypeNotFoundException {
|
||||
if (request == null ||
|
||||
StringUtils.isBlank(request.getDeviceType()) ||
|
||||
StringUtils.isBlank(request.getDeviceType()) ||
|
||||
!request.getProperties().containsKey(Constants.OS_BUILD_DATE) ||
|
||||
(Long) request.getProperty(Constants.OS_BUILD_DATE) == 0) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user