Skip to content

Conversation

@yutaro-sakamoto
Copy link
Contributor

This pull request makes minor code cleanups in the AbstractCobolField.java file by removing unused or placeholder methods. This PR will resolve #757

Most important changes:

Code cleanup:

  • Removed the unused getFieldData() method, which contained placeholder logic for handling sign-separated and sign-leading attributes.
  • Removed the unused getBigDecimal() method, which always returned BigDecimal.ZERO.

@yutaro-sakamoto yutaro-sakamoto marked this pull request as ready for review December 4, 2025 11:31
Copilot AI review requested due to automatic review settings December 4, 2025 11:31
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR performs code cleanup by removing two unused public methods from the AbstractCobolField class: getFieldData() and getBigDecimal(). Both methods were placeholders marked with TODO comments indicating they were "in preparation" (準備中), and searches confirm they are not referenced anywhere in the codebase, including subclasses and tests.

  • Removed the getFieldData() method that returned CobolDataStorage with logic to handle sign-separated and sign-leading attributes
  • Removed the getBigDecimal() method that always returned BigDecimal.ZERO

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

Copy link
Contributor

@tsh-hashimoto tsh-hashimoto left a comment

Choose a reason for hiding this comment

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

Thank you.

getFieldData is certainly not referenced anywhere.

[ask]
getBigDecimal is also unused. However, java.sql.ResultSet does have a getBigDecimal method, and it is referenced in Select.scala in Open COBOL ESQL 4J.

https://github.com/opensourcecobol/Open-COBOL-ESQL-4j/blob/ff0bcf6bbbbcf88deaa3b69e1026aee25fb506ef/dblibj/src/main/scala/Select.scala#L222

Although they share the same name, I understand that they are unrelated (thus it can be deleted).
Please let me know if this assumption is correct.

@yutaro-sakamoto
Copy link
Contributor Author

@tsh-hashimoto
getBigDecimal in java.sql.ResultSet and getBigDecimal in AbstractCobolField are unrelated

@tsh-hashimoto tsh-hashimoto self-requested a review December 5, 2025 01:05
@yutaro-sakamoto yutaro-sakamoto merged commit 09786e0 into opensourcecobol:develop Dec 5, 2025
151 checks passed
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.

Remove and getBigDecimal and getFieldData in AbstractCobolField

2 participants