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
{{ message }}
Repository navigation
Commit a8fb913
Browse filesBrowse the repository at this point in the historyBrowse files
refactor(spring-boot): apply full PR re-review findings #1-#10 (KOJAK-67)
Second comprehensive multi-agent review of PR #49. One correctness defect,
three documentation/comment fixes, two test-quality additions, and DRY cleanup.
Correctness (#1):
- validatePtmDataSourceMatch: when a DelegatingDataSource chain terminates
early (cycle / uninitialised LazyConnectionDataSourceProxy), the `!==` is
inconclusive — we never reached the concrete backing DataSources. Previously
logged a WARN then unconditionally threw the generic "bound to a different
DataSource" error, asserting an unverified mismatch and misdirecting the
operator to qualifier config instead of proxy wiring. Now throws a distinct
proxy-chain-unresolvable error; the mismatch error is reserved for the case
where both sides fully unwrap to concrete, distinct DataSources.
Comments (#3,#4,#8,#9):
- Removed duplicate Hibernate package-move paragraph (ktlint-fix commit
introduced it); trimmed "Strategy N" labels duplicating the method list;
fixed self-referential stale comment ("above, around line 254" was AT 254);
corrected Hibernate version comment drift (said 7.0, pin is 7.1.4).
Tests (#2,#6,#7):
- PROBE test empirically establishes Spring's InitializingBean contract
rejects a TransactionTemplate bean with null transactionManager — the
factory's `?:` fallback is unreachable-via-Spring defensive code, not an
untested gap (production comment updated to point at the proof).
- Restored JpaPtmClassesReflectionGuardTest in okapi-integration-tests
(spring-orm available there); JPA_HIBERNATE_PTM_CLASSES made public for
cross-module access. Guards the set against full bit-rot.
- Trimmed deleted-version history from TransactionTemplateHijackProofTest and
SpringObjectProviderSemanticsAssumptionsTest KDocs.
DRY (#5,#10):
- Extracted byte-identical stubStore()/stubDeliverer()/stubDelivererWithType()
from 7 test files into OkapiSpringTestStubs.kt; added a reified
GenericApplicationContext.registerBean() helper collapsing the
BeanDefinitionBuilder.genericBeanDefinition(...).apply{isPrimary} boilerplate
(9 call sites).
Verified: full ktlintCheck clean, :okapi-spring-boot:test +
:okapi-integration-tests:test green, Spring Boot 3.5.12 matrix simulation
(-PspringBootVersion=3.5.12 -PspringVersion=6.2.7) green.
Copy file name to clipboardExpand all lines: okapi-spring-boot/src/test/kotlin/com/softwaremill/okapi/springboot/DataSourceQualifierAutoConfigurationTest.kt
0 commit comments