Skip to content

fix: critical bugs in JET, MSSQL converters and SparxImporter#22

Open
Mitchel85 wants to merge 1 commit into
schmitze87:mainfrom
Mitchel85:fix/critical-bugs
Open

fix: critical bugs in JET, MSSQL converters and SparxImporter#22
Mitchel85 wants to merge 1 commit into
schmitze87:mainfrom
Mitchel85:fix/critical-bugs

Conversation

@Mitchel85

Copy link
Copy Markdown

🔧 Bug Fixes

This PR addresses 3 critical bugs discovered during a code review of the AAroN codebase.

Fix 1: Duplicate processSystem in SparxJETConverter

File: AAroN-Core/…/SparxJETConverter.java
Bug: usyst_system table processed twice (lines 55 + 57), creating duplicate System nodes in Neo4j.
Fix: Removed duplicate line 57.

Fix 2: SparxMSSQLConverter returns null on connection failure

File: AAroN-Core/…/SparxMSSQLConverter.java
Bug: When all 3 connection attempts fail, method returns null, causing NPE in callers.
Fix: Throw RuntimeException with meaningful message instead of return null.

Fix 3: SparxImporter NPE when converter throws IOException

File: AAroN-Plugin/…/SparxImporter.java
Bug: All three import procedures (importEAP, importMySQL, importMSSQL) catch IOException but leave model = null, causing NPE in ModelProcessor.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).

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant