Conversation
adamjohnwright
approved these changes
Jan 29, 2026
Contributor
adamjohnwright
left a comment
There was a problem hiding this comment.
Here are some suggestions from claude:
- Package naming convention - The new package is StableIdMapper (PascalCase), but Java convention is lowercase package names (e.g., stableidmapper or stableid). Consider renaming for consistency.
- Null safety in StableIdMapping - What happens if an empty list is passed to the constructor? Does getPrimaryId() throw an IndexOutOfBoundsException? Consider adding validation or returning Optional.
- Test coverage - Are there unit tests for the new StableIdMapping class? The filtering logic in filterOutMismatchedIdentifiers() and species abbreviation extraction would benefit from explicit test cases, especially edge cases (single ID, all mismatched, etc.). 4. Immutability - Consider making StableIdMapping immutable by storing a defensive copy of the input list and making fields final. This prevents subtle bugs if the original list is modified elsewhere.
- Species abbreviation extraction - The logic extracting the species code (e.g., "HSA" from "R-HSA-12345") should be documented or extracted into a named method for clarity. What happens with malformed IDs that don't follow the expected pattern?
- The double-negative was confusing - The original condition !(stableIds.size() < 2) (meaning "size >= 2") was hard to read. Good cleanup, but ensure the new logic is semantically identical.
you can choose to do them or not.
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.
Adds StableIdMapping data structure and filter out mis-matches between species in stable id mappings