Merge pull request #941 from sinthuja/master

Fixing https://github.com/wso2/product-iots/issues/1374.
4.x.x
sameeragunarathne 7 years ago committed by GitHub
commit 6cbedc2ed5

@ -30,7 +30,7 @@ public class Constants {
public static final String DEFAULT_STREAM_VERSION = "1.0.0"; public static final String DEFAULT_STREAM_VERSION = "1.0.0";
public static final String SCOPE = "scope"; public static final String SCOPE = "scope";
public static final String JDBC_USERSTOREMANAGER = "org.wso2.carbon.user.core.jdbc.JDBCUserStoreManager"; public static final String JDBC_USERSTOREMANAGER = "org.wso2.carbon.user.core.jdbc.JDBCUserStoreManager";
public static final int DEFAULT_PAGE_LIMIT = 10; public static final int DEFAULT_PAGE_LIMIT = 50;
public final class ErrorMessages { public final class ErrorMessages {

@ -1720,15 +1720,12 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
if (log.isDebugEnabled()) { if (log.isDebugEnabled()) {
log.debug("Get devices by name " + request.toString() + " and requiredDeviceInfo: " + requireDeviceInfo); log.debug("Get devices by name " + request.toString() + " and requiredDeviceInfo: " + requireDeviceInfo);
} }
List<Device> devices = new ArrayList<>();
List<Device> allDevices; List<Device> allDevices;
int limit = DeviceManagerUtil.validateDeviceListPageSize(request.getRowCount()); int limit = DeviceManagerUtil.validateDeviceListPageSize(request.getRowCount());
try { try {
DeviceManagementDAOFactory.openConnection(); DeviceManagementDAOFactory.openConnection();
allDevices = deviceDAO.getDevicesByNameAndType(request.getDeviceName(), request.getDeviceType(), allDevices = deviceDAO.getDevicesByNameAndType(request.getDeviceName(), request.getDeviceType(),
this.getTenantId(), request.getStartIndex(), limit); this.getTenantId(), request.getStartIndex(), limit);
List<Device> filterd = null;
filterd.get(0);
} catch (DeviceManagementDAOException e) { } catch (DeviceManagementDAOException e) {
String msg = "Error occurred while fetching the list of devices that matches to '" String msg = "Error occurred while fetching the list of devices that matches to '"
+ request.getDeviceName() + "'"; + request.getDeviceName() + "'";

Loading…
Cancel
Save