Skip to content

core: 12 PMD violations in test sources make ./gradlew build fail #829

Description

@corioliskraft

Description

core/src/test/ contains 12 PMD violations, so ./gradlew build fails on :core:pmdTest in a fresh clone. They went unnoticed because pmdTest has never run in CI — see #821.

Fixing these is a prerequisite for #821: adding .PHONY to the Makefile turns main red until they are resolved.

Steps to reproduce

  1. Clone the repository at fbab9a7
  2. Run ./gradlew build

Actual behavior

:core:pmdTest fails with 12 violations.

File Line Rule
KeyFlowAuthenticatorTest.java 64 FieldNamingConventions
KeyFlowAuthenticatorTest.java 74, 80, 86 ×2, 87 ×2, 89 ReplaceJavaUtilDate
KeyFlowAuthenticatorTest.java 293, 337 CloseResource
auth/SetupAuthTest.java 59, 65 ReplaceJavaUtilDate

Expected behavior

./gradlew build succeeds on a fresh clone.

Environment

  • OS: macOS Sequoia 15.7.7
  • Java version (see java --version): 25.0.1
  • Version of the STACKIT Java SDK: N/A, as this concerns building the repository, not consuming a released artifact.

Additional information
The 2 CloseResource findings are false positives: the Response objects are stubs built via Response.Builder with no body, not live connections. The remaining 10 are straightforward.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions