Commit 984fe36
Close the two real Codecov patch-coverage gaps from this PR
DeleteWhereImplementer.isCompatibleReturnType and
AbstractServiceImplementer.isValidParameter each had one branch missing
on lines Codecov flagged. Added a compile-error test for a @where delete
method with an incompatible (non-void, non-Number) return type, and a
save-with-id-named-parameter test that exercises isValidParameter's
GormProperties.IDENTITY branch directly (SaveImplementer, unlike
UpdateOneImplementer, doesn't strip the id parameter before validating
it). Both branches now fully covered.
The third flagged line, FindAllByImplementer's matchSpec == null error
path, was verified empirically rather than assumed unreachable: a probe
test with an edge-case DSL input (findAllBy() with no property suffix)
showed doesImplement() already computes the identical memoized matchSpec
before selecting this implementer, so doImplement() can never observe a
null matchSpec -- the method falls through to FindAllImplementer instead
whenever matchSpec would be null. Genuinely unreachable through the
public DSL, not a gap.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent 4f354f4 commit 984fe36
1 file changed
Lines changed: 49 additions & 0 deletions
File tree
- grails-datamapping-core/src/test/groovy/grails/gorm/services
grails-datamapping-core/src/test/groovy/grails/gorm/services/ServiceImplementerEdgeCaseSpec.groovy
Lines changed: 49 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
361 | 361 | | |
362 | 362 | | |
363 | 363 | | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
364 | 413 | | |
0 commit comments