Skip to content

Commit

Permalink
remove unuse code
Browse files Browse the repository at this point in the history
  • Loading branch information
wxbty committed Sep 11, 2023
1 parent 4c4bcb7 commit d7c4a71
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 53 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ public void addListener(MetricsListener<?> listener) {
@Override
@SuppressWarnings({"rawtypes", "unchecked"})
public void publishEvent(MetricsEvent event) {
if (event instanceof EmptyEvent) {
return;
}

if (validateIfApplicationConfigExist(event)) return;
for (MetricsListener listener : listeners) {
if (listener.isSupport(event)) {
Expand Down Expand Up @@ -75,9 +71,6 @@ public void publishErrorEvent(TimeCounterEvent event) {
@SuppressWarnings({"rawtypes"})
private void publishTimeEvent(MetricsEvent event, Consumer<MetricsLifeListener> consumer) {
if (validateIfApplicationConfigExist(event)) return;
if (event instanceof EmptyEvent) {
return;
}
if (event instanceof TimeCounterEvent) {
((TimeCounterEvent) event).getTimePair().end();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,6 @@ public void onEvent(MetricsEvent event) {
}


@Test
void testPublishEvent() {

// emptyEvent do nothing
MetricsEvent emptyEvent = EmptyEvent.instance();
eventMulticaster.publishEvent(emptyEvent);
Assertions.assertSame(obj, objects[0]);

}

@Test
void testPublishFinishEvent() {

Expand Down

0 comments on commit d7c4a71

Please sign in to comment.