Skip to content

Code review#507

Merged
mernst merged 5 commits into
plume-lib:masterfrom
mernst:code-review
Jul 5, 2026
Merged

Code review#507
mernst merged 5 commits into
plume-lib:masterfrom
mernst:code-review

Conversation

@mernstplume

Copy link
Copy Markdown
Contributor

No description provided.

@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@mernst, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 53 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 35e34846-c298-4cd7-b85e-bdb231c56909

📥 Commits

Reviewing files that changed from the base of the PR and between 5ec3b29 and 7a3d595.

📒 Files selected for processing (1)
  • src/main/java/org/plumelib/reflection/SignatureRegexes.java
📝 Walkthrough

Walkthrough

Changes

This PR updates FieldDescriptorWithoutPackageRegex to accept multidimensional reference-type descriptors with repeated leading [ characters. It changes classfilenameToBaseName to use the later of '/' and the platform directory separator when extracting the base name. It also clarifies the classForName Javadoc retry description and adds tests for Signatures.isFieldDescriptorWithoutPackage, including a helper for building multidimensional descriptors.

Sequence Diagram(s)

Not applicable.

Possibly related PRs

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/main/java/org/plumelib/reflection/SignatureRegexes.java`:
- Around line 267-269: The regex change is correct, and no functional fix is
needed; if you want to simplify the `FieldDescriptorWithoutPackageRegex`
definition in `SignatureRegexes`, merge the primitive alternatives in the
anchored pattern so `FD_PRIMITIVE` and `\\[+FD_PRIMITIVE` are expressed with a
single array/primitive branch while keeping the existing `\\[+L` object-array
handling unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 5e7efbdc-eaa5-4346-a227-3e25952e9f97

📥 Commits

Reviewing files that changed from the base of the PR and between 60d91cb and 8052d79.

📒 Files selected for processing (4)
  • src/main/java/org/plumelib/reflection/ReflectionPlume.java
  • src/main/java/org/plumelib/reflection/SignatureRegexes.java
  • src/main/java/org/plumelib/reflection/Signatures.java
  • src/test/java/org/plumelib/reflection/TestSignatures.java

Comment thread src/main/java/org/plumelib/reflection/SignatureRegexes.java Outdated

@coderabbitai coderabbitai 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.

♻️ Duplicate comments (1)
src/main/java/org/plumelib/reflection/SignatureRegexes.java (1)

267-269: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Primitive descriptors no longer match.

\[+ on the primitive branch rejects bare descriptors like "I", even though Signatures.isFieldDescriptorWithoutPackage("I") should return true. Keep \[* for primitives and \[+ for the reference-type branch.

Proposed fix
   public static final `@Regex` String FieldDescriptorWithoutPackageRegex =
-      ANCHORED("(\\[+" + FD_PRIMITIVE + "|\\[+L" + IDENTIFIER + NESTED + ";)");
+      ANCHORED("(\\[*" + FD_PRIMITIVE + "|\\[+L" + IDENTIFIER + NESTED + ";)");
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/main/java/org/plumelib/reflection/SignatureRegexes.java` around lines 267
- 269, The FieldDescriptorWithoutPackageRegex pattern in SignatureRegexes is too
strict for primitive descriptors because the primitive branch currently requires
at least one leading “[”, so Signatures.isFieldDescriptorWithoutPackage("I") no
longer matches. Update the regex so the primitive alternative uses zero or more
leading “[” while keeping the reference-type alternative unchanged with one or
more “[”, and verify the anchored pattern still matches bare primitive
descriptors and array forms correctly.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Duplicate comments:
In `@src/main/java/org/plumelib/reflection/SignatureRegexes.java`:
- Around line 267-269: The FieldDescriptorWithoutPackageRegex pattern in
SignatureRegexes is too strict for primitive descriptors because the primitive
branch currently requires at least one leading “[”, so
Signatures.isFieldDescriptorWithoutPackage("I") no longer matches. Update the
regex so the primitive alternative uses zero or more leading “[” while keeping
the reference-type alternative unchanged with one or more “[”, and verify the
anchored pattern still matches bare primitive descriptors and array forms
correctly.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: bf77a37d-8dec-4f61-b0bf-f15b66136cac

📥 Commits

Reviewing files that changed from the base of the PR and between 8052d79 and 5ec3b29.

📒 Files selected for processing (1)
  • src/main/java/org/plumelib/reflection/SignatureRegexes.java

@mernst
mernst merged commit 3c5ec7d into plume-lib:master Jul 5, 2026
6 checks passed
@mernst
mernst deleted the code-review branch July 5, 2026 23:04
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