Skip to content

Commit 973da6c

Browse files
committed
refactor: more accurate name
Signed-off-by: Chris Laprun <claprun@redhat.com>
1 parent faba864 commit 973da6c

File tree

1 file changed

+3
-3
lines changed
  • operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/event

1 file changed

+3
-3
lines changed

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/event/EventSources.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,17 @@ public void clear() {
6060

6161
@SuppressWarnings("unchecked")
6262
public <R> EventSource<R, P> existingEventSourceOfSameNameAndType(EventSource<R, P> source) {
63-
return (EventSource<R, P>) existingEventSourceOfSameType(source).get(source.name());
63+
return (EventSource<R, P>) existingEventSourcesOfSameType(source).get(source.name());
6464
}
6565

66-
private <R> Map<String, EventSource<?, P>> existingEventSourceOfSameType(
66+
private <R> Map<String, EventSource<?, P>> existingEventSourcesOfSameType(
6767
EventSource<R, P> source) {
6868
return sources.getOrDefault(keyFor(source), Collections.emptyMap());
6969
}
7070

7171
public <R> void add(EventSource<R, P> eventSource) {
7272
final var name = eventSource.name();
73-
final var existing = existingEventSourceOfSameType(eventSource);
73+
final var existing = existingEventSourcesOfSameType(eventSource);
7474
if (existing.get(name) != null) {
7575
throw new IllegalArgumentException("Event source " + existing
7676
+ " is already registered with name: " + name);

0 commit comments

Comments
 (0)