You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (match.isSecondary() && !entry.isSecondary()) {
70
+
// secondary loses
71
+
match = entry;
72
+
return;
73
+
}
74
+
if (match.isPrimary()) {
75
+
if (entry.isPrimary()) {
76
+
thrownewIllegalStateException("Expecting only 1 bean match but have multiple primary beans " + match.getBean() + " and " + entry.getBean());
77
+
}
78
+
// leave as is, current primary wins
79
+
return;
80
+
}
81
+
if (entry.isSecondary()) {
82
+
if (match.isSecondary()) {
83
+
ignoredSecondaryMatch = entry;
84
+
}
85
+
return;
86
+
}
87
+
if (entry.isPrimary()) {
88
+
// new primary wins
89
+
match = entry;
90
+
return;
91
+
}
92
+
thrownewIllegalStateException("Expecting only 1 bean match but have multiple matching beans " + match.getBean() + " and " + entry.getBean());
93
+
}
94
+
95
+
ObjectgetBean() {
96
+
if (match == null) {
97
+
returnnull;
98
+
}
99
+
if (match.isSecondary() && ignoredSecondaryMatch != null) {
100
+
thrownewIllegalStateException("Expecting only 1 bean match but have multiple secondary beans " + match.getBean() + " and " + ignoredSecondaryMatch.getBean());
0 commit comments