Skip to content

Conversation

@peter-lawrey
Copy link
Member

@peter-lawrey peter-lawrey commented Oct 25, 2025

This PR removes the obsolete Takari Maven Wrapper downloader, introduces a reusable code-review Maven profile (Checkstyle, SpotBugs+FindSecBugs, PMD, JaCoCo), refreshes and expands project documentation, aligns copyrights/branding with chronicle.software (2014-2025), and adds targeted tests and minor refactors to tighten behaviour and style.

Why

  • The Takari downloader (.mvn/wrapper/MavenWrapperDownloader.java + maven-wrapper.properties) is legacy and unnecessary in CI and developer environments that already provision Maven.
  • We want a repeatable, automated code-review gate to standardise static analysis across Chronicle repos.
  • Documentation drift made it harder for agents and new contributors to work cleanly; we add authoritative, linkable AsciiDoc.
  • Legal/branding headers needed updating.

What changed

Build & repo hygiene

  • 🔥 Remove Takari wrapper downloader
    Deletes .mvn/wrapper/MavenWrapperDownloader.java and .mvn/wrapper/maven-wrapper.properties.

  • 🛠 Add code-review Maven profile (opt-in):

    • Checkstyle (src/main/config/checkstyle.xml)
    • SpotBugs + FindSecBugs (src/main/config/spotbugs-exclude.xml)
    • PMD (src/main/config/pmd-ruleset.xml, pmd-exclude.properties)
    • JaCoCo with bundle thresholds (${jacoco.line.coverage}=0.918, ${jacoco.branch.coverage}=0.854)
  • 📦 Pin plugin versions via properties; lift hard enforcer rules (removed maven-enforcer-plugin) to reduce friction for consumers.

  • 📄 LICENSE.adoc added (Apache 2.0 pointer).

Documentation (AsciiDoc, British English, ISO-8859-1 policy)

  • New AGENTS.md (house rules for humans/LLMs): language, character-set, commit/PR etiquette, doc-first loop, Nine-Box tags.

  • README.adoc updates:

    • JDK matrix clarified (8, 11, 17, 21), British English, link fixes.
    • Dependency coordinates bumped in examples to 0.27ea1.
    • Adds “Internal documentation” section linking to AsciiDoc set below.
  • New internal docs under src/main/docs/:

    • specifications.adoc (FN/NF/TEST/DOC/OPS)
    • architecture-overview.adoc
    • algorithm-profiles.adoc
    • invariants-and-contracts.adoc
    • testing-strategy.adoc
    • performance-benchmarks.adoc (notes TODOs)
    • unsafe-and-platform-notes.adoc
    • change-log-template.adoc

Source headers & styling

  • Update headers across net.openhft.hashing.* to Copyright 2014-2025 chronicle.software.

  • Micro-refactors for clarity/consistency (no behaviour change intended):

    • MetroHash: simplified rotations (removed redundant parentheses).
    • ModernCompactStringHash: idiomatic comparison.
    • MurmurHash_3/WyHash: explicit casts to long normalised.
    • Util: explicit fallback comment.

Note: LongHashFunction / LongTupleHashFunction internal helpers now reference INSTANCE directly where previously UnsafeAccess.INSTANCE was used. Tests pass; keep an eye on symbol scoping in future refactors.

Tests

  • New: ByteBufferAccessTest, DualHashFunctionTest, ModernCompactStringHashTest.
  • Expanded: LongHashFunctionTest (boolean slices, direct/read-only buffers, char slices).
  • All tests run under mvn -q verify; tuple/long projections cross-checked.

Impact

  • Developers/CI: Use your installed Maven; wrapper downloader is gone. The wrapper scripts (if any) aren’t relied upon by CI.
  • Quality gate (opt-in): -Pcode-review enforces style, bug-finders, PMD, and coverage thresholds.
  • Docs: Far richer internal docs for onboarding and for AI-assisted workflows.
  • Runtime: No intentional behavioural changes; hashing outputs remain stable. Minor internal cleanups only.

Verification

# Standard build
mvn -q verify

# Run the code-review gate locally
mvn -q -Pcode-review verify

@peter-lawrey peter-lawrey changed the title Improve documentation and broaden hashing test coverage Retire Maven Wrapper, add contributor docs, and introduce code-review quality gates Oct 27, 2025
@sonarqubecloud
Copy link

@peter-lawrey peter-lawrey changed the base branch from develop to adv/formatting October 28, 2025 13:37
…view

# Conflicts:
#	.mvn/wrapper/MavenWrapperDownloader.java
#	README.adoc
@peter-lawrey peter-lawrey marked this pull request as draft November 3, 2025 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants