Skip to content

Commit

Permalink
Code format
Browse files Browse the repository at this point in the history
  • Loading branch information
hpehl committed May 17, 2024
1 parent 384cda3 commit 73c857b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions core/src/main/java/org/jboss/elemento/BodyObserver.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ static void addAttachObserver(HTMLElement element, ObserverCallback callback) {
if (!ready) {
startObserving();
}
String id = Id.unique();
String id = Id.unique("a");
attachObservers.add(createObserver(id, element, ATTACH_UID_KEY, callback));
if (logger.isEnabled(DEBUG)) {
logger.debug("Add attach observer %s for %o%s", id, element, count());
logger.debug("Add attach observer %s for %o %s", id, element, count());
}
}

Expand All @@ -72,10 +72,10 @@ static void addDetachObserver(HTMLElement element, ObserverCallback callback) {
if (!ready) {
startObserving();
}
String id = Id.unique();
String id = Id.unique("d");
detachObservers.add(createObserver(id, element, DETACH_UID_KEY, callback));
if (logger.isEnabled(DEBUG)) {
logger.debug("Add detach observer %s for %o%s", id, element, count());
logger.debug("Add detach observer %s for %o %s", id, element, count());
}
}

Expand Down Expand Up @@ -136,7 +136,7 @@ private static void onElementsAppended(MutationRecord record) {
removeId(eo.element, ATTACH_UID_KEY, eo.id);
iterator.remove();
if (logger.isEnabled(DEBUG)) {
logger.debug("Remove attach observer %s for %o%s", eo.id, eo.element, count());
logger.debug("Remove attach observer %s for %o %s", eo.id, eo.element, count());
}
}
}
Expand Down Expand Up @@ -168,7 +168,7 @@ private static void onElementsRemoved(MutationRecord record) {
removeId(eo.element, DETACH_UID_KEY, eo.id);
iterator.remove();
if (logger.isEnabled(DEBUG)) {
logger.debug("Remove detach observer %s for %o%s", eo.id, eo.element, count());
logger.debug("Remove detach observer %s for %o %s", eo.id, eo.element, count());
}
}
}
Expand Down Expand Up @@ -223,7 +223,7 @@ private static JsArray<String> ids(HTMLElement element, String attribute) {
}

private static String count() {
return " (a:" + attachObservers.size() + "|d:" + detachObservers.size() + ")";
return "(a:" + attachObservers.size() + "|d:" + detachObservers.size() + ")";
}


Expand Down

0 comments on commit 73c857b

Please sign in to comment.