fix: critical bugs in JET, MSSQL converters and SparxImporter#22
Open
Mitchel85 wants to merge 1 commit into
Open
fix: critical bugs in JET, MSSQL converters and SparxImporter#22Mitchel85 wants to merge 1 commit into
Mitchel85 wants to merge 1 commit into
Conversation
Fix schmitze87#1: Remove duplicate processSystem call in SparxJETConverter (line 57) - usyst_system table was processed twice, creating duplicate System nodes Fix #2: Replace return null with RuntimeException in SparxMSSQLConverter - When all 3 connection attempts fail, throw instead of returning null Fix #3: Add null-safety checks in SparxImporter (importEAP, importMySQL, importMSSQL) - IOException now re-throws as RuntimeException - Null model check after converter.convert() Closes schmitze87#19 Closes schmitze87#20 Closes schmitze87#21
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.
🔧 Bug Fixes
This PR addresses 3 critical bugs discovered during a code review of the AAroN codebase.
Fix 1: Duplicate
processSysteminSparxJETConverterFile:
AAroN-Core/…/SparxJETConverter.javaBug:
usyst_systemtable processed twice (lines 55 + 57), creating duplicate System nodes in Neo4j.Fix: Removed duplicate line 57.
Fix 2:
SparxMSSQLConverterreturns null on connection failureFile:
AAroN-Core/…/SparxMSSQLConverter.javaBug: When all 3 connection attempts fail, method returns
null, causing NPE in callers.Fix: Throw
RuntimeExceptionwith meaningful message instead ofreturn null.Fix 3:
SparxImporterNPE when converter throws IOExceptionFile:
AAroN-Plugin/…/SparxImporter.javaBug: All three import procedures (
importEAP,importMySQL,importMSSQL) catchIOExceptionbut leavemodel = null, causing NPE inModelProcessor.process().Fix: Re-throw as
RuntimeException+ add null check after conversion.Related Issues: Closes #19, Closes #20, Closes #21
Tested: Not yet — these are targeted fixes for clear logic bugs. A test suite would be valuable for the processor pipeline (see #21 for discussion).