Bug fixes and event
This commit is contained in:
@@ -342,11 +342,13 @@ public class Puck extends DeviceBase {
|
||||
}
|
||||
|
||||
public void setId(String value) {
|
||||
for (Device d : getParent().getChildren()) {
|
||||
if (d instanceof Puck) {
|
||||
if (((Puck)d).getId() != null){
|
||||
if (((Puck)d).getId().equals(value)){
|
||||
((Puck)d).setId(null);
|
||||
if (value!=null){
|
||||
for (Device d : getParent().getChildren()) {
|
||||
if (d instanceof Puck) {
|
||||
if (((Puck)d).getId() != null){
|
||||
if (isSameId (((Puck)d).getId(), value)){
|
||||
((Puck)d).setId(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -355,6 +357,9 @@ public class Puck extends DeviceBase {
|
||||
}
|
||||
|
||||
public static boolean isSameId(String id1, String id2){
|
||||
if ((id1==null) || (id2==null)){
|
||||
return false;
|
||||
}
|
||||
return id1.equals(id2) || BarcodeMatcher.matchBarcodes(id1,id2);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user