Migrate COBOL codebase to Java/Spring Boot application#67
Open
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
Open
Migrate COBOL codebase to Java/Spring Boot application#67devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
Conversation
Create java-migration/ directory with complete Spring Boot 3.2.5 project: Modules migrated: - Data Layer: Account JPA entity, repository, service (sql/sql_example.cbl) - JSON Serialization: Jackson-based generation (json_generate/json_generate.cbl) - XML Serialization: JAXB-based generation (xml_generate/xml_generate.cbl) - Batch Processing: Spring Batch merge/sort (merge_sort/merge_sort_test.cbl) - Report Generation: Text-based formatter (report_writer/report_test.cbl) - Subprogram Architecture: State-retaining services (sub_program/*.cbl) - Utilities: StringUtils, NumericUtils, ComputationalTypes, SearchUtils, RedefinesExample Infrastructure: - Maven build with Spring Boot 3.2.5, Java 17+ - Spring Data JPA with PostgreSQL driver - Flyway migration from create_test_db.sql - H2 in-memory database for tests - application.yml and application-test.yml configs Tests: 98 tests covering all modules (all passing) Co-Authored-By: Jerry Oliphant <jerry.oliphant@cognition.ai>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Migrate COBOL codebase to Java/Spring Boot application
Summary
Adds a complete
java-migration/directory containing a Spring Boot 3.2.5 (Java 17+) project that translates all 15 COBOL programs from the repository into idiomatic Java. The existing COBOL code is untouched.Modules migrated (7 major + 5 utilities):
AccountJPA entity + Spring Data repository replacing embedded SQL cursors@JsonPropertyand JAXB@XmlRootElement/@XmlAttributereplacingJSON GENERATE/XML GENERATEComparator-based sort@Servicesimulating WORKING-STORAGE state retention,MutableStringwrapper for by-reference semanticsStringUtils(TRIM/UNSTRING),NumericUtils(IS NUMERIC/NUMVAL),ComputationalTypes(COMP-3 packed decimal ↔ BigDecimal),SearchUtils(SEARCH/SEARCH ALL),RedefinesExample(ByteBuffer memory sharing)Infrastructure: Maven build, Flyway migration from
create_test_db.sql, PostgreSQL driver (production), H2 (tests), 98 passing JUnit 5 tests.Review & Testing Checklist for Human
ComputationalTypes.comp3ToBigDecimal/bigDecimalToComp3): Bit-manipulation code had a bug during development (test byte arrays were wrong). Verify edge cases — zero values, max PIC sizes, odd vs even digit counts — against actual COBOL COMP-3 behavior.redifines/redefines.cblfield definitions. Character encoding is assumed ASCII — verify this matches GnuCOBOL's encoding.MergeSortBatchConfigdefines@Beanmethods formergeSortJob/mergeSortStepwithFlatFileItemReader/FlatFileItemWriter, but tests only exercise the pure-Java merge/sort methods. Consider running the actual batch job in an integration test.AccountRepository.searchAccounts()usesLIKE ... escape ''which was tested on H2 only. Verify it works on PostgreSQL. The Flyway migration (V1__create_accounts_table.sql) is also never executed in tests (Flyway is disabled, H2 usesddl-auto: create-drop).Recommended test plan: Clone the branch, run
cd java-migration && mvn clean testto confirm 98 tests pass. Then compare a few key outputs side-by-side against actual COBOL program outputs (especially JSON/XML format and report layout) to verify semantic equivalence.Notes