-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
misspelled getCaseSensisitiveId in SpdxListedLicenseModelStore #266
Comments
As SpdxListedLicenseModelStore implements IListedLicenseStore, which extends IModelStore, probably have to look at IModelStore in spdx-java-core: The PR is a breaking change. |
@bact - I saw this as well - since this is public, I'm not going to fix it until we do another major release - worried it may break some downstream code |
One option would be to rename these methods to the correct spellings, then add the old spellings back, marked as deprecated and delegating to the methods with the correct spellings. This has the advantage of being backwards compatible while also giving users the option to migrate to the new methods when they're ready. |
Thank you @pmonks , I think that would work for methods. For enum, if we can specify the value of two enums to be the same, will it work too? |
@bact I don't believe Java allows one Enum to alias another, or have multiple symbols in a single Enum that have the same value, but it's been a while since I've been a regular Java user so I may very well be wrong. |
You're right. Java Enum works at instance level, not value. So it will not work :( |
Looking at this again, it's a bit complicated than I was thought as |
Find probably a solution. Java 8 introduces a "default method" that can solve this issue. @pmonks do you mind to see if spdx/spdx-java-core#8 makes sense? Thank you What I'm not certain is which method should be a default one. |
It looks like the default method approach should work. To be honest, this is the first time I heard about the approach. Let's give spdx/spdx-java-core#8 a try and see if anything downstream breaks. |
Two misspelling here:
getCaseSensisitiveId
->getCaseSensitiveId
caseInsensisitiveId
->caseInsensitiveId
Spdx-Java-Library/src/main/java/org/spdx/storage/listedlicense/SpdxListedLicenseModelStore.java
Lines 1249 to 1256 in 28835c6
The text was updated successfully, but these errors were encountered: