Skip to content

Java upgrade to 21 - #46

Open
devops-thiago wants to merge 3 commits into
masterfrom
java-upgrade-20251216120325-dkyc
Open

Java upgrade to 21#46
devops-thiago wants to merge 3 commits into
masterfrom
java-upgrade-20251216120325-dkyc

Conversation

@devops-thiago

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings December 16, 2025 15:49
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@codecov

codecov Bot commented Dec 16, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 71 lines in your changes missing coverage. Please review.
✅ Project coverage is 0.00%. Comparing base (40a1fcc) to head (1405a08).

Files with missing lines Patch % Lines
.../mongocom/management/CollectionManagerFactory.java 0.00% 42 Missing ⚠️
...volivre/mongocom/management/CollectionManager.java 0.00% 22 Missing ⚠️
...m/arquivolivre/mongocom/management/MongoQuery.java 0.00% 7 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff           @@
##           master     #46   +/-   ##
======================================
  Coverage    0.00%   0.00%           
======================================
  Files          10      10           
  Lines         537     532    -5     
  Branches       97      98    +1     
======================================
+ Misses        537     532    -5     
Flag Coverage Δ
unittests 0.00% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Repository owner deleted a comment from cursor Bot Dec 16, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 26 out of 26 changed files in this pull request and generated 8 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/ci.yml
@@ -24,7 +24,7 @@ jobs:
- name: Set up JDK 17

Copilot AI Dec 16, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The step name still says "Set up JDK 17" but the Java version has been updated to 21. Update the step name to "Set up JDK 21" to match the actual version being configured.

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/ci.yml
@@ -84,7 +84,7 @@ jobs:
- name: Set up JDK 17

Copilot AI Dec 16, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The step name still says "Set up JDK 17" but the Java version has been updated to 21. Update the step name to "Set up JDK 21" to match the actual version being configured.

Copilot uses AI. Check for mistakes.
@@ -21,7 +21,7 @@ jobs:
- name: Set up JDK 17

Copilot AI Dec 16, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The step name still says "Set up JDK 17" but the Java version has been updated to 21. Update the step name to "Set up JDK 21" to match the actual version being configured.

Copilot uses AI. Check for mistakes.
Comment on lines 118 to +123
public Document getQuery() {
return query;
return query != null ? new Document(query) : new Document();
}

public Document getConstraints() {
return constraints;
return constraints != null ? new Document(constraints) : null;
}

public Document getOrderBy() {
return orderBy;
return orderBy != null ? new Document(orderBy) : null;

Copilot AI Dec 16, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The getQuery(), getConstraints(), and getOrderBy() methods have inconsistent null-handling behavior. getQuery() returns an empty Document when query is null, but getConstraints() and getOrderBy() return null. This inconsistency can lead to confusion and potential NullPointerExceptions. Consider making all three methods consistent by either all returning empty Documents or all returning null when the field is null.

Copilot uses AI. Check for mistakes.
properties.containsKey("mongocom.database")
? properties.getProperty("mongocom.database")
: "";
if (!user.equals("")) {

Copilot AI Dec 16, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inefficient comparison to empty string, check for zero length instead.

Copilot uses AI. Check for mistakes.
if (!user.equals("")) {
builder.append(user).append(":").append(password).append("@");
}
if (host.equals("")) {

Copilot AI Dec 16, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inefficient comparison to empty string, check for zero length instead.

Copilot uses AI. Check for mistakes.
} else {
builder.append(host);
}
if (!port.equals("")) {

Copilot AI Dec 16, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inefficient comparison to empty string, check for zero length instead.

Copilot uses AI. Check for mistakes.
builder.append(port);
}
builder.append("/");
if (!dbName.equals("")) {

Copilot AI Dec 16, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inefficient comparison to empty string, check for zero length instead.

Copilot uses AI. Check for mistakes.
@devops-thiago

Copy link
Copy Markdown
Owner Author

/review

@thrillhousebot

thrillhousebot Bot commented Jul 1, 2026

Copy link
Copy Markdown

🤖 ThrillhouseBot PR Summary

What this PR does

Upgrade the project from Java 17 to 21, update CI workflows to use JDK 21, apply defensive coding (null checks, defensive copies), adopt Java 16+ pattern matching for instanceof, and reformat Javadoc comments.

⚠️ Description vs. Implementation

The PR description does not fully match the change:

  • The removal of the pull_request trigger from the CI workflow is not mentioned and is a significant regression.
  • The behavioral change of returning defensive copies from MongoQuery getters is not described.

Changes Overview

  • Files changed: 26
  • Lines added: +958
  • Lines removed: -186

Changed Files

File Change Summary
.github/workflows/ci.yml Modified Switch to JDK 21, change build command to skip verify, and remove pull_request trigger.
.github/workflows/pr-validation.yml Modified Update to JDK 21, combine test and coverage steps, remove continue-on-error from static analysis.
BUILD_ISSUES_ANALYSIS.md Added -
IMPLEMENTATION_PLAN.md Added -
TEST_COVERAGE_REPORT.md Added -
check-quality.sh Modified Make static analysis checks exit with error instead of continuing on failure.
src/main/java/com/arquivolivre/mongocom/annotations/Document.java Modified -
src/main/java/com/arquivolivre/mongocom/annotations/GeneratedValue.java Modified -
src/main/java/com/arquivolivre/mongocom/annotations/Id.java Modified -
src/main/java/com/arquivolivre/mongocom/annotations/Index.java Modified -
src/main/java/com/arquivolivre/mongocom/annotations/Internal.java Modified -
src/main/java/com/arquivolivre/mongocom/annotations/ObjectId.java Modified -
src/main/java/com/arquivolivre/mongocom/annotations/Reference.java Modified -
src/main/java/com/arquivolivre/mongocom/annotations/Trigger.java Modified -
src/main/java/com/arquivolivre/mongocom/exceptions/NoSuchMongoCollectionException.java Modified -
src/main/java/com/arquivolivre/mongocom/management/CollectionManager.java Modified Add null check for InsertOneResult, use pattern matching for List, iterate over Map.Entry, and adjust formatting.
src/main/java/com/arquivolivre/mongocom/management/CollectionManagerFactory.java Modified Use try-with-resources for file input, add null check for listFiles, and reorder imports.
src/main/java/com/arquivolivre/mongocom/management/MongoQuery.java Modified Add defensive copies for query/constraints/orderBy, use pattern matching for instanceof, and remove unused imports.
src/main/java/com/arquivolivre/mongocom/types/Action.java Modified -
src/main/java/com/arquivolivre/mongocom/types/IndexType.java Modified -

…and 6 more file(s).

Risk Assessment

Risk Count
🔴 Critical 0
🟠 High 1
🟡 Medium 0
🔵 Low 1

Key Findings

  • HIGH: CI no longer runs on pull requests (.github/workflows/ci.yml:4)
  • LOW: Defensive copies of Document may break callers relying on mutation (src/main/java/com/arquivolivre/mongocom/management/MongoQuery.java:116)

⚠️ Required CI Checks Status

Some required checks are still pending or have failed:

Check Type Status Detail
validate check-run ❌ Failed failure

Automated review by ThrillhouseBot. Reply with /review to re-run.

Comment thread .github/workflows/ci.yml
Comment on lines 3 to 5
on:
push:
branches: [ master, main ]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 HIGH — CI no longer runs on pull requests

The pull_request trigger was removed from ci.yml, so the CI pipeline (including tests, coverage, and SonarCloud analysis) will not execute on pull requests. This allows merging code that hasn't passed these quality gates.

Suggested change
on:
push:
branches: [ master, main ]
on:
push:
branches: [ master, main ]
pull_request:
branches: [ master, main ]

Comment on lines 114 to 116
public Document getQuery() {
return query;
return query != null ? new Document(query) : new Document();
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 LOW — Defensive copies of Document may break callers relying on mutation (low confidence — verify before acting)

Methods getQuery(), getConstraints(), and getOrderBy() now return defensive copies of internal Document objects instead of the direct references. External code that intended to modify the query by mutating the returned Document will no longer affect the MongoQuery instance, possibly breaking existing integrations. No regression tests cover this change.

Suggested change
public Document getQuery() {
return query;
return query != null ? new Document(query) : new Document();
}
public Document getQuery() {
return query;
}

@thrillhousebot thrillhousebot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ThrillhouseBot requested changes — see inline comments on the diff.

@devops-thiago

Copy link
Copy Markdown
Owner Author

/describe

@thrillhousebot

thrillhousebot Bot commented Jul 1, 2026

Copy link
Copy Markdown

🤖 ThrillhouseBot — suggested title & description

Suggested title

build: upgrade to Java 21, modernize CI and add quality docs

Suggested description

Summary

Bump the project’s Java version from 17 to 21 across CI/CD, source code, and documentation.

Key Changes

CI / Workflows

  • .github/workflows/ci.yml & pr-validation.yml: set Java to 21, removed the pull_request trigger from CI, and streamlined Maven goals (mvn clean test jacoco:report instead of separate verify/report steps).
  • check-quality.sh: made all quality checks hard failures (Checkstyle, PMD, SpotBugs) instead of soft warnings, and runs them individually with clear pass/fail messages.

Java source code

  • Pattern matching: replaced explicit casts with instanceof pattern matching in CollectionManager.java, MongoQuery.java, and other classes.
  • Javadoc: converted inline @author tags to proper Javadoc blocks across all annotation, type, utility, and management classes.
  • Null safety & clean‑up: added null-guards (result != null before .getInsertedId()), defensive copies in MongoQuery getters, removed unused imports and variables, and corrected raw-type usage hints.
  • Generics & iteration: used entrySet() instead of keySet()+get() for compound indexes; applied List iteration with proper generic types.
  • Resource handling: added a try-with-resources block in CollectionManagerFactory.setup() and an explicit null check for listFiles.

New documentation

  • BUILD_ISSUES_ANALYSIS.md – catalogues known build issues after the upgrade (stale .class file, PMD target‑JDK mismatch, raw types) and a resolution plan.
  • IMPLEMENTATION_PLAN.md – step‑by‑step guide to resolve the identified issues.
  • TEST_COVERAGE_REPORT.md – reports current coverage (60% overall, 161 passing tests), explains why 80% hasn’t been reached, and suggests integration tests with Testcontainers.

Testing

All 161 unit tests continue to pass after the Java 21 change; no functional regressions.


Suggestion only — your PR was not modified. Copy whatever is useful into the title and description. Re-run with /describe.

@devops-thiago

Copy link
Copy Markdown
Owner Author

/changelog

@thrillhousebot

thrillhousebot Bot commented Jul 1, 2026

Copy link
Copy Markdown

🤖 ThrillhouseBot — suggested CHANGELOG entry

Changed

  • Java 21 requirement: The project now targets Java 21; CI pipelines, Maven compiler, and PMD are configured for JDK 21 (Java upgrade to 21 #46).
  • Strict code quality gate: The check-quality.sh script now exits with a non-zero status on any violation, failing the build early instead of continuing (Java upgrade to 21 #46).

Fixed

  • MongoQuery getter immutability: getQuery(), getConstraints(), and getOrderBy() now return defensive copies to prevent accidental mutation of internal query state (Java upgrade to 21 #46).
  • CollectionManagerFactory resource handling: The setup method uses try-with-resources for the configuration file stream and guards against a missing conf directory, avoiding resource leaks and NullPointerException (Java upgrade to 21 #46).

Removed

  • Deprecated dropDups index handling: Removed usage of the deprecated dropDups option in index creation, aligning with MongoDB driver 5.x (Java upgrade to 21 #46).

Suggestion only — nothing was committed. Copy whatever fits into CHANGELOG.md under the [Unreleased] section. Re-run with /changelog.

@devops-thiago

Copy link
Copy Markdown
Owner Author

/help

@thrillhousebot

thrillhousebot Bot commented Jul 1, 2026

Copy link
Copy Markdown

🤖 ThrillhouseBot commands

Command What it does
/review Run a fresh review of this PR
/summary Post the PR summary if one has not been generated yet
/describe Suggest an improved PR title and description from the diff
/changelog Draft a CHANGELOG entry for this PR from the diff
/add-docs Suggest docstrings for the symbols changed in this PR
/resolve Resolve ThrillhouseBot's open finding threads on this PR
/pause Silence the bot on this PR (no automatic or manual reviews)
/resume Re-enable the bot on a paused PR
/help Show this list

You can also use the mention form, e.g. @Thrillhousebot review. Every command except /help requires write access to the repository.

@devops-thiago

Copy link
Copy Markdown
Owner Author

/add-docs

@@ -150,27 +147,27 @@ public <A extends Object> List<A> find(Class<A> collectionClass, MongoQuery quer
A obj = collectionClass.newInstance();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Documentation for CollectionManager.find(Class<A>, MongoQuery)

Suggested change
A obj = collectionClass.newInstance();
/**
* Finds all documents of the given collection class that match the specified query.
* Applies projection, ordering, skip, and limit from the query object.
*
* @param <A> the type of the collection element
* @param collectionClass the class of the collection to query
* @param query the query containing filters and modifiers
* @return a list of objects of type A matching the query
*/
public <A extends Object> List<A> find(Class<A> collectionClass, MongoQuery query) {

@@ -230,12 +227,12 @@ public <A extends Object> A findOne(Class<A> collectionClass, MongoQuery query)
result = collectionClass.newInstance();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Documentation for CollectionManager.findOne(Class<A>, MongoQuery)

Suggested change
result = collectionClass.newInstance();
/**
* Returns the first document of the given collection class that matches the query,
* or {@code null} if none found.
*
* @param <A> the type of the collection element
* @param collectionClass the class of the collection to query
* @param query the query containing filters and modifiers
* @return an object of type A or {@code null}
*/
public <A extends Object> A findOne(Class<A> collectionClass, MongoQuery query) {

@@ -301,13 +298,15 @@ public String insert(Object document) {
String collectionName = reflectCollectionName(document);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Documentation for CollectionManager.insert(Object)

Suggested change
String collectionName = reflectCollectionName(document);
/**
* Inserts the given document into the MongoDB collection derived from its annotations.
* The generated {@code _id} is set back into the document if it carries an {@code @ObjectId} field.
*
* @param document the object to insert
* @return the inserted ID as a string
*/
public String insert(Object document) {

@@ -341,8 +340,9 @@ public void update(
try {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Documentation for CollectionManager.update(Object, MongoQuery, WriteConcern, boolean)
This symbol is missing documentation. Suggested:

  /**
   * Updates one or multiple documents matching the given query with the values
   * extracted from the provided document object.
   *
   * @param document the object whose fields will be used for the update ({@code $set})
   * @param query the query identifying documents to update
   * @param concern the write concern to use for the operation
   * @param multi if {@code true}, updates all matching documents; otherwise only the first
   */
  public void update(
      Object document, MongoQuery query, WriteConcern concern, boolean multi) {

@@ -375,19 +375,19 @@ public String save(Object document) {
Document doc = loadDocument(document);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Documentation for CollectionManager.save(Object)

Suggested change
Document doc = loadDocument(document);
/**
* Saves a document using upsert behavior: inserts if no {@code _id} is present,
* otherwise replaces the existing document with the same {@code _id}.
*
* @param document the object to save
* @return the document's ID as a string
*/
public String save(Object document) {

@@ -666,7 +683,10 @@ public String getStatus() {
for (String name : client.listDatabaseNames()) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Documentation for CollectionManager.getStatus()

Suggested change
for (String name : client.listDatabaseNames()) {
/**
* Returns a human-readable status string containing the MongoDB client connection state,
* a ping result, and the list of available database names.
*
* @return a status string
*/
public String getStatus() {

@@ -76,18 +77,14 @@ public static CollectionManager createCollectionManager(
public static CollectionManager createCollectionManagerFromURI(String uri) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Documentation for CollectionManagerFactory.createCollectionManager(String, int, String, String, String)
This symbol is missing documentation. Suggested:

  /**
   * Creates a {@link CollectionManager} connected to MongoDB using the given connection
   * parameters. Defaults to localhost if host is empty, and default port if zero.
   *
   * @param host the MongoDB host
   * @param port the MongoDB port (0 to use default)
   * @param dbName the database name
   * @param user the authentication username (may be empty)
   * @param password the authentication password (may be empty)
   * @return a new CollectionManager instance, or {@code null} on connection failure
   */
  public static CollectionManager createCollectionManager(
      String host, int port, String dbName, String user, String password) {

.applyConnectionString(connectionString)
.build();
MongoClientSettings settings =
MongoClientSettings.builder().applyConnectionString(connectionString).build();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Documentation for CollectionManagerFactory.createCollectionManagerFromURI(String)

Suggested change
MongoClientSettings.builder().applyConnectionString(connectionString).build();
/**
* Creates a {@link CollectionManager} from a MongoDB connection URI. The database name
* is extracted from the URI.
*
* @param uri the MongoDB connection URI
* @return a new CollectionManager instance, or {@code null} on failure
*/
public static CollectionManager createCollectionManagerFromURI(String uri) {

@@ -164,61 +160,66 @@ public static CollectionManager setup(ServletContext context) {
if (props == null) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Documentation for CollectionManagerFactory.setup(ServletContext)

Suggested change
if (props == null) {
/**
* Initializes a {@link CollectionManager} from configuration files found in the web
* application's {@code /WEB-INF/conf} directory. Supports both a full URI property
* ({@code mongocom.uri}) and individual properties ({@code mongocom.host}, etc.).
*
* @param context the servlet context from which to locate configuration files
* @return a new CollectionManager instance, or {@code null} if configuration is missing
*/
public static CollectionManager setup(ServletContext context) {


public Document getQuery() {
return query;
return query != null ? new Document(query) : new Document();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Documentation for MongoQuery.getQuery()

Suggested change
return query != null ? new Document(query) : new Document();
/**
* Returns the query filter document. The returned document is a defensive copy of the
* internal query, or an empty document if no query was set.
*
* @return the query filter document
*/
public Document getQuery() {

return query;
return query != null ? new Document(query) : new Document();
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Documentation for MongoQuery.getConstraints()

Suggested change
/**
* Returns the projection / constraints document, or {@code null} if none is set.
* The returned document is a defensive copy.
*
* @return the constraints document, or {@code null}
*/
public Document getConstraints() {


public Document getConstraints() {
return constraints;
return constraints != null ? new Document(constraints) : null;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Documentation for MongoQuery.getOrderBy()

Suggested change
return constraints != null ? new Document(constraints) : null;
/**
* Returns the sort order document, or {@code null} if no ordering is specified.
* The returned document is a defensive copy.
*
* @return the sort order document, or {@code null}
*/
public Document getOrderBy() {

return constraints;
return constraints != null ? new Document(constraints) : null;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Documentation for MongoQuery.getLimit()

Suggested change
/**
* Returns the maximum number of documents to return.
*
* @return the limit value
*/
public int getLimit() {

/**
* @author Thiago da Silva Gonzaga <thiagosg@sjrp.unesp.br>
*/
public interface Generator {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Documentation for Generator.generateValue(Class, MongoDatabase)

Suggested change
public interface Generator {
/**
* Generates a value for a field of the given parent class, optionally using the
* provided database context for sequence-like generation.
*
* @param <A> the type of the generated value
* @param parent the class that owns the field to be filled
* @param db the MongoDB database, may be used for ID generation
* @return the generated value
*/
<A extends Object> A generateValue(Class parent, MongoDatabase db);


/** @author Thiago da Silva Gonzaga <thiagosg@sjrp.unesp.br> */
/**
* @author Thiago da Silva Gonzaga <thiagosg@sjrp.unesp.br>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Documentation for DateGenerator.generateValue(Class, MongoDatabase)

Suggested change
* @author Thiago da Silva Gonzaga <thiagosg@sjrp.unesp.br>
/**
* Returns the current date and time. The {@code parent} and {@code db} parameters are
* ignored by this generator.
*
* @param parent ignored
* @param db ignored
* @return the current {@link Date}
*/
public Date generateValue(Class parent, MongoDatabase db) {


/** @author Thiago da Silva Gonzaga <thiagosg@sjrp.unesp.br> */
/**
* @author Thiago da Silva Gonzaga <thiagosg@sjrp.unesp.br>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Documentation for IntegerGenerator.generateValue(Class, MongoDatabase)

Suggested change
* @author Thiago da Silva Gonzaga <thiagosg@sjrp.unesp.br>
/**
* Generates the next integer value from the {@code _sequences} collection for the
* given parent class. Uses the simple name of {@code parent} as the sequence key.
*
* @param <A> the type of the generated value (expected to be {@link Integer})
* @param parent the class that owns the field
* @param db the MongoDB database to access the {@code _sequences} collection
* @return the next sequence value
*/
public <A extends Object> A generateValue(Class parent, MongoDatabase db) {

/** @author Thiago da Silva Gonzaga <thiagosg@sjrp.unesp.br> */
/**
* @author Thiago da Silva Gonzaga <thiagosg@sjrp.unesp.br>
*/

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Documentation for QueryPrototype.select(String...)

Suggested change
*/
/**
* Prototype method that defines the fields to select in a query. This implementation
* does nothing; the actual selection is handled by the {@code MongoQuery} builder.
*
* @param fields the field names to select
*/
public static void select(String... fields) {}


/** @author thiago */
/**
* @author thiago

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Documentation for NoSuchMongoCollectionException(String)

Suggested change
* @author thiago
/**
* Constructs a new exception with the given detail message.
*
* @param message the detail message
*/
public NoSuchMongoCollectionException(String message) {

@thrillhousebot

thrillhousebot Bot commented Jul 1, 2026

Copy link
Copy Markdown

📝 ThrillhouseBot added 16 committable documentation suggestion(s) and drafted 2 more it couldn't post as committable suggestions (declarations that don't map cleanly onto the diff — each note has the docs to add manually). Review each one and commit the suggestions you want to keep.

devops-thiago added a commit to devops-thiago/ThrillhouseBot that referenced this pull request Jul 1, 2026
## What type of PR is this?

- [x] 📝 Documentation
- [x] 📦 Dependency update

## Description

Release prep for **v0.3.0**, in three parts:

- **Docs — stale command lists fixed.** The v0.3.0 commands `/describe`,
`/changelog`, and `/add-docs` were missing from the `webhook/` package
row in `docs/ARCHITECTURE.md` and from the `CommentCommandService` class
javadoc (both still listed only the five older commands). Both now match
the `CommentCommand` enum and the live `/help` output. The `README.md`
summary bullet now mentions the changed-files walkthrough added in
v0.3.0 (#179).
- **Changelog — dated and synced.** The `[0.3.0]` heading moves from
`unreleased` to `2026-06-30`, and a new `### Dependencies` section
records the bumps landed during the cycle.
- **Version bump for tagging.** The Maven project version goes
`0.3.0-SNAPSHOT` → `0.3.0` so the release can be tagged. (The frontend
`package.json` keeps its own independent `1.0.0`.)

No runtime behavior changes — docs, changelog, and version metadata
only.

## Related Issues

N/A (no code fix). This documents already-merged v0.3.0 features
(`/describe` #35, `/changelog` #62, `/add-docs` #56, changed-files
walkthrough #179) and records the dependency bumps #262, #263, #265,
#266, #267 in the changelog.

## How Has This Been Tested?

- [x] Manual testing

The documented v0.3.0 command surface was dogfooded on
`#256` and `devops-thiago/MongOCOM#46`; the
corrected command list matches both the `CommentCommand` enum and the
bot's own `/help` output. Changes are documentation/metadata only, so no
automated tests apply.

## Checklist

- [x] My code follows the project's coding standards
- [x] I have performed a self-review of my own code
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [x] I have updated the documentation accordingly
- [x] My changes generate no new warnings or errors

## Additional Notes

- A copy-editing pass over the v0.3.0 changelog prose (against the
Wikipedia "Signs of AI writing" checklist) found **no changes needed** —
the entries match the established terse-technical voice, so there is no
follow-up commit.
- Three tracking issues surfaced during v0.3.0 dogfooding were filed
**separately** (not part of this PR): #296 (`/describe` `/changelog`
`/add-docs` truncation disclosure), #297 (`/summary` "already exists"
wording), #298 (summary "Changes Overview" count accuracy).
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.

2 participants