Files
document-haness/docs/clean-architecture-backend-template/tech-log-studio/runtime-contract-correctness/case/case-messaging-spring-boot-starter-f03.md
T
DongHyeonkaandClaude Opus 5 b2963105a8 docs(keycloak-session-store): import the session-storage lab as a new project
The keycloak project ended with four open questions that design could not
settle. A two-VM lab was built to answer them by measurement, and this is
that material: 26 experiments, 125 raw command outputs, 22 browser captures.

Follows the import procedure in README.md.

  source/     the originating repository verbatim — 78 documents, 28 SVGs,
              8 manifests, plus .source-revision recording the commit
  final/      the SSOT
    document.md   729 lines written from the 29 experiment documents, not
                  concatenated: what was predicted, what was measured, and
                  where the measurement itself was wrong
    evidence/raw    125 outputs, flattened to <experiment>__<file> because
                    the originals collided (01-baseline.txt appeared three
                    times) and the audit only globs the top level
    evidence/meta   one per raw file; command and exitCode are null and the
                    README says why rather than inventing them
    evidence/browser  22 captures
    assets/       three diagrams through techviz
    .techviz/     their VizSpecs

A separate project rather than an addition to keycloak: the B-layer answers
that project's four questions, but the A, C and D layers are about cluster
failure, SSO and operations, and one document.md should hold one subject.
The four question records there can point here through 관계.

Recorded rather than papered over: only three of the 28 diagrams were
remade. The repository forbids hand-drawn SVG and forbids titles inside the
canvas; all 28 originals carry both, so converting them is redrawing, not
reformatting. They stay in source/ and the gap is written into the document.

verify-pipeline.py passes. audit-records.py reports no issues.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-04 22:51:59 +09:00

3.5 KiB

kind, slug, title, topic, project, status, sourceRevision, rootTreeNode, evidenceCapturedOn, assets, evidence, source, module, priority
kind slug title topic project status sourceRevision rootTreeNode evidenceCapturedOn assets evidence source module priority
CASE messaging-spring-boot-starter-f03 죽은 매개변수 하나가 유일한 비기본값에서 NPE 를 낳는다 runtime-contract-correctness clean-architecture-backend-template 게시 전 21234e38cdb9a926cbc92bb97a2aee2e4a7d2916 case:messaging-spring-boot-starter-f03 2026-09-01
key file
messaging-spring-boot-starter-f03 ../../../final/evidence/rendered/messaging-spring-boot-starter-f03.svg
../../../final/evidence/raw/messaging-spring-boot-starter-f03.txt
원본 분석 절은 analysis/messaging/messaging-spring-boot-starter.md#L319 이다.
messaging-spring-boot-starter P3

죽은 매개변수 하나가 유일한 비기본값에서 NPE 를 낳는다

호출처가 셋이고 전부 () -> true 다. 그래서 이 매개변수는 값을 하나만 갖는다.

관계

  • 검증기는 발행이 아니라 주입이 강제다 같은 분석 리프에서 끌어낸 규칙이다.

문제

호출처가 셋이고 전부 () -> true 다.

그래서 이 매개변수는 값을 하나만 갖는다.

결론

그리고 그것이 죽어 있다는 것보다 나쁜 성질이 있다 — 이 매개변수가 존재하는 이유("이 역할은 선택적이다")대로 () -> false 를 넘기면 credential == null 인 경로가 가드를 지나 다음 줄의 credential.type() 에서 NPE 로 죽는다.

즉 이 매개변수의 유일한 비기본값이 의도한 동작이 아니라 널 역참조다.

수정은 매개변수를 지우고 널 검사를 무조건으로 만드는 것이다.

선택적 역할이 필요해지는 날에는 Optional 을 돌려주는 별도 메서드가 그 자리다 — admin 이 이미 호출처에서 그렇게 다뤄진다.

검증 환경

OpenJDK : 21.0.12 java -version 으로 확인 Gradle : 9.0.0 src/gradle/wrapper/gradle-wrapper.properties 의 distributionUrl 로 확인 확인 방식 : 이 매개변수의 호출처 셋을 전수 확인해 넘어오는 값의 종류 집계 소스 수정 : x

재현 조건

원문은 analysis/messaging/messaging-spring-boot-starter.md#L319 에 있다.

본문

호출처가 셋이고 전부 () -> true 다. 그래서 이 매개변수는 값을 하나만 갖는다.

매개변수가 갖는 값의 개수

:::evidence key="messaging-spring-boot-starter-f03" alt="분석 문서 analysis/messaging/messaging-spring-boot-starter.md 에서 이 기록의 근거 절을 그대로 잘라낸 15줄. 코드베이스를 측정한 것이 아니라 원본 판정이 무엇을 적었는지를 보여 준다." caption="analysis/messaging/messaging-spring-boot-starter.md 발췌 — 15줄" zoom="true" :::

죽어 있다는 것보다 나쁜 성질

이 매개변수가 존재하는 이유("이 역할은 선택적이다")대로 () -> false 를 넘기면 credential == null 인 경로가 가드를 지나 다음 줄의 credential.type() 에서 NPE 로 죽는다. 즉 이 매개변수의 유일한 비기본값이 의도한 동작이 아니라 널 역참조다.

수정

매개변수를 지우고 널 검사를 무조건으로 만든다. 선택적 역할이 필요해지는 날에는 Optional 을 돌려주는 별도 메서드가 그 자리다 — admin 이 이미 호출처에서 그렇게 다뤄진다.

확인하지 못한 것

기본값이 아닌 값을 넘겨 NPE 를 재현하지 않았다. 호출처 셋이 전부 같은 값을 넘긴다는 것과 본문의 널 취급으로 판정했다.