Commit 31cacc7
authored
Three small carry-over items from the v1.6.7 senior review,
bundled into one PR because they share a topic (the I3
auto-invalidating registry wrapper) and a CHANGELOG section.
J2 — symmetric closed-session behaviour:
InvalidatingNodeRegistry.register now calls ensureOpen() before
super.register(). Previously the two registration entry points
(session.registry().register and session.registerNodeDefinition)
disagreed on what happens after session.close(): the dedicated
method threw IllegalStateException, the registry().register
path silently mutated and invalidated a closed-session cache.
After J2 both throw the same exception type with the same
message. ensureOpen() inside the constructor's default-
definitions setup is safe because the `closed` flag is field-
initialised to false before the constructor body runs.
J3 — negative test:
DocumentSessionTest.registryRegisterOnClosedSessionThrowsIllegalStateException
pins the new contract. Pairs with the existing positive cache-
invalidation test from I3 so the senior-bar "positive + negative"
pattern (cf PR-7.3) is complete.
J4 — NodeRegistry @SInCE note:
Class-level Javadoc on NodeRegistry now explicitly calls out
the v1.6.7 non-final relaxation. The class became non-final in
v1.6.7 (Track I3) so DocumentSession could install the auto-
invalidating subclass; the change was already binary-compatible
(japicmp: semver PATCH). The Javadoc just makes the rationale
discoverable without reading the CHANGELOG.
Test plan:
- DocumentSessionTest now has 26 tests (25 prev + 1 new negative).
- ./mvnw verify -pl . -P japicmp — 1058 tests, 0 failures.
japicmp vs v1.6.7 baseline: semver PATCH (compatible — no public
signature changes; ensureOpen() is a behavioural strengthening
on an existing public method, well-known semver-PATCH territory).
1 parent 06f467b commit 31cacc7
4 files changed
Lines changed: 68 additions & 8 deletions
File tree
- src
- main/java/com/demcha/compose/document
- api
- layout
- test/java/com/demcha/compose/document/api
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
18 | 41 | | |
19 | 42 | | |
20 | 43 | | |
| |||
Lines changed: 13 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
913 | 913 | | |
914 | 914 | | |
915 | 915 | | |
916 | | - | |
917 | | - | |
918 | | - | |
919 | | - | |
920 | | - | |
921 | | - | |
922 | | - | |
923 | | - | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
924 | 928 | | |
925 | 929 | | |
926 | 930 | | |
927 | 931 | | |
| 932 | + | |
928 | 933 | | |
929 | 934 | | |
930 | 935 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
22 | 28 | | |
23 | 29 | | |
24 | 30 | | |
| |||
Lines changed: 26 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
760 | 760 | | |
761 | 761 | | |
762 | 762 | | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
763 | 789 | | |
764 | 790 | | |
765 | 791 | | |
| |||
0 commit comments