Fixing bug which creates infinite number of EventFacet
This commit is contained in:
parent
261057df42
commit
a617cd972a
|
@ -314,16 +314,13 @@ public class EServiceManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(c.getTarget() instanceof EventFacet) {
|
if(c.getTarget() instanceof EventFacet) {
|
||||||
eventFacet = (EventFacet) c.getTarget();
|
EventFacet foundEventFacet = (EventFacet) c.getTarget();
|
||||||
String value = eventFacet.getEvent();
|
String value = foundEventFacet.getEvent();
|
||||||
if(value.compareTo(getState())==0) {
|
if(value.compareTo(getState())==0) {
|
||||||
// This facet must be updated (the date must be updated) so it must not be removed from udpate
|
// This facet must be updated (the date must be updated) so it must not be removed from udpate
|
||||||
eventFacet.setDate(date);
|
foundEventFacet.setDate(date);
|
||||||
|
eventFacet = foundEventFacet;
|
||||||
continue;
|
continue;
|
||||||
}else {
|
|
||||||
// This is not the event facet to be updated
|
|
||||||
// Setting the variable to null so it will be created if the event does not already exists.
|
|
||||||
eventFacet = null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -335,7 +332,7 @@ public class EServiceManager {
|
||||||
// Removing the ones that have not to be changed.
|
// Removing the ones that have not to be changed.
|
||||||
consistsOfList.removeAll(consistsOfToRemove);
|
consistsOfList.removeAll(consistsOfToRemove);
|
||||||
|
|
||||||
|
/* The eventFacet for the event does not exists. Going to create it */
|
||||||
if(eventFacet == null) {
|
if(eventFacet == null) {
|
||||||
eventFacet = getEventFacet(date);
|
eventFacet = getEventFacet(date);
|
||||||
eService.addFacet(eventFacet);
|
eService.addFacet(eventFacet);
|
||||||
|
|
|
@ -215,16 +215,13 @@ public class HostingNodeManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(c.getTarget() instanceof EventFacet) {
|
if(c.getTarget() instanceof EventFacet) {
|
||||||
eventFacet = (EventFacet) c.getTarget();
|
EventFacet foundEventFacet = (EventFacet) c.getTarget();
|
||||||
String value = eventFacet.getEvent();
|
String value = foundEventFacet.getEvent();
|
||||||
if(value.compareTo(getState())==0) {
|
if(value.compareTo(getState())==0) {
|
||||||
// This facet must be updated (the date must be updated) so it must not be removed from udpate
|
// This facet must be updated (the date must be updated) so it must not be removed from update
|
||||||
eventFacet.setDate(date);
|
foundEventFacet.setDate(date);
|
||||||
|
eventFacet = foundEventFacet;
|
||||||
continue;
|
continue;
|
||||||
}else {
|
|
||||||
// This is not the event facet to be updated
|
|
||||||
// Setting the variable to null so it will be created if the event does not already exists.
|
|
||||||
eventFacet = null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -236,6 +233,8 @@ public class HostingNodeManager {
|
||||||
// Removing the ones that have not to be changed.
|
// Removing the ones that have not to be changed.
|
||||||
consistsOfList.removeAll(consistsOfToRemove);
|
consistsOfList.removeAll(consistsOfToRemove);
|
||||||
|
|
||||||
|
|
||||||
|
/* The eventFacet for the event does not exists. Going to create it */
|
||||||
if(eventFacet == null) {
|
if(eventFacet == null) {
|
||||||
eventFacet = getEventFacet(date);
|
eventFacet = getEventFacet(date);
|
||||||
hostingNode.addFacet(eventFacet);
|
hostingNode.addFacet(eventFacet);
|
||||||
|
|
Loading…
Reference in New Issue