Skip to content
Permalink
Browse files

Prevent illegal argument exception

  • Loading branch information...
dsand47 committed Jun 8, 2019
1 parent fac0bc2 commit 4733f207764a69bfcd40db802badee297d8bcbf1
@@ -871,7 +871,7 @@ public void moveBean(int row, int column) {
String entry = (String) box.getSelectedItem();
T newNameBean = getBySystemName(entry);
if (oldNameBean != newNameBean) {
oldNameBean.setUserName("");
oldNameBean.setUserName(null);
newNameBean.setUserName(currentName);
InstanceManager.getDefault(NamedBeanHandleManager.class).moveBean(oldNameBean, newNameBean, currentName);
if (nbMan.inUse(newNameBean.getSystemName(), newNameBean)) {
@@ -610,7 +610,10 @@ public void setOccupiedSense(int sense) {
*/
public int getOccupancy() {
if (occupancyNamedSensor == null) {
Sensor s = InstanceManager.sensorManagerInstance().getSensor(occupancySensorName);
Sensor s = null;
if (!occupancySensorName.isEmpty()) {
s = InstanceManager.sensorManagerInstance().getSensor(occupancySensorName);
}
if (s == null) {
//no occupancy sensor, so base upon block occupancy state
if (block != null) {

0 comments on commit 4733f20

Please sign in to comment.
You can’t perform that action at this time.