Skip to content

Avoid generic parameters in Chromatogram(Selection)#2068

Merged
eselmeister merged 1 commit intoeclipse-chemclipse:developfrom
Mailaender:ungeneric-chromatogram
Feb 17, 2025
Merged

Avoid generic parameters in Chromatogram(Selection)#2068
eselmeister merged 1 commit intoeclipse-chemclipse:developfrom
Mailaender:ungeneric-chromatogram

Conversation

@Mailaender
Copy link
Contributor

This is a gigantic API change with the aim of removing generic parameters from commonly used API which introduces numerous wildcard characters that should be avoided especially in method returns, and it causes many warnings because type checks fail. I see that the root cause is the way that Java generics are limited by not allowing implementing generic interfaces again, making lists with bound generic types read-only etc.

But it is also conceptually wrong to define a chromatogram by its peak (and which only differ slightly by peak model MSD) and not its scans, which are defining content. Doing both would probably create even harder to read/maintain code, so I try to put the generic types into lists instead and override the interfaces. This is still using generics but defined by inheritance, which is nearer to the legacy code.

@Mailaender Mailaender force-pushed the ungeneric-chromatogram branch from 75b166a to be62ee3 Compare February 4, 2025 16:59
@Mailaender Mailaender force-pushed the ungeneric-chromatogram branch 2 times, most recently from 61d6c59 to 4f8f455 Compare February 7, 2025 17:04
@Mailaender Mailaender marked this pull request as ready for review February 7, 2025 17:04
@Mailaender Mailaender force-pushed the ungeneric-chromatogram branch 3 times, most recently from c6e6ac9 to e343eac Compare February 11, 2025 09:49
@Mailaender Mailaender force-pushed the ungeneric-chromatogram branch from e343eac to 77589be Compare February 17, 2025 09:46
@eselmeister eselmeister merged commit ef7097b into eclipse-chemclipse:develop Feb 17, 2025
3 checks passed
@Mailaender Mailaender deleted the ungeneric-chromatogram branch February 17, 2025 10:54
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.

2 participants