GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Refactor CDL row serialization for readability by Fahmida-Hossain-Charu · Pull Request #1062 · stleary/JSON-java

Conversation

@Fahmida-Hossain-Charu

@Fahmida-Hossain-Charu Fahmida-Hossain-Charu commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR refactors CDL.rowToString(JSONArray, char) to improve readability while preserving existing behavior.

Changes

  • Extracted row value appending into a private helper method.
  • Extracted quote-decision logic into a private helper method.
  • Extracted quoted value writing into a private helper method.
  • Kept the change localized to CDL.

Compatibility

  • No public API changes.
  • No dependency changes.
  • No behavior changes intended.
  • No new Java language features introduced.

Validation

Ran the full test suite successfully:

mvn test

Risk

The change is limited to private helper extraction and preserves the existing row serialization logic.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Fahmida-Hossain-Charu
Refactor CDL row serialization
26ee6eb
stleary
stleary reviewed Jun 17, 2026
View reviewed changes
Comment thread src/main/java/org/json/CDL.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

stleary
stleary reviewed Jun 17, 2026
View reviewed changes
Comment thread src/main/java/org/json/CDL.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

stleary
stleary reviewed Jun 17, 2026
View reviewed changes
Comment thread src/main/java/org/json/CDL.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

@stleary stleary added the In review label Jun 17, 2026
@Fahmida-Hossain-Charu
Address CDL row serialization review comments
8353b59
@stleary

stleary commented Jun 17, 2026

Copy link
Copy Markdown
Owner

What problem does this code solve?
Refactors CDL.rowToString() for readability

Does the code still compile with Java6?
Yes

Risks
Low

Changes to the API?
No

Will this require a new release?
No

Should the documentation be updated?
No

Does it break the unit tests?
No. No unit tests were added because coverage was already sufficient.

Was any code refactored in this commit?
This PR was a refactor

Review status
APPROVED

Starting 3-day comment window

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@stleary stleary added Approved - 3-day window and removed In review labels Jun 17, 2026
stleary
stleary approved these changes Jun 21, 2026
View reviewed changes
@stleary
stleary merged commit c91d821 into stleary:master Jun 21, 2026
9 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@stleary stleary removed the Approved - 3-day window label Jun 21, 2026
@sonarqubecloud

sonarqubecloud Bot commented Jun 21, 2026

Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@stleary stleary stleary approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@Fahmida-Hossain-Charu @stleary
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.