-
Notifications
You must be signed in to change notification settings - Fork 75
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
NCL-6600 Add API for using latest version #840
Conversation
Codecov Report
@@ Coverage Diff @@
## master #840 +/- ##
============================================
+ Coverage 83.17% 83.42% +0.25%
+ Complexity 1871 1863 -8
============================================
Files 115 115
Lines 6940 6896 -44
Branches 1209 1201 -8
============================================
- Hits 5772 5753 -19
+ Misses 686 663 -23
+ Partials 482 480 -2
Continue to review full report at Codecov.
|
36065bd
to
ad2dfa5
Compare
core/src/main/java/org/commonjava/maven/ext/core/impl/RESTCollector.java
Outdated
Show resolved
Hide resolved
…e task split code for endpoints.
0945d93
to
2da3396
Compare
@dwalluck Did you have any last comments on this else I'll merge it tomorrow |
io/src/test/java/org/commonjava/maven/ext/io/rest/handler/AddSuffixJettyHandler.java
Show resolved
Hide resolved
Map<ProjectVersionRef, String> pvResultResult = state.getVersionTranslator().lookupProjectVersions( restLookupProjectVersionParamList ); | ||
logger.info ("REST Client returned for project versions: {} ", pvResultResult); | ||
Map<ProjectRef, Set<String>> versionStates = new HashMap<>(); | ||
pvResultResult.forEach( ( key, value ) -> { | ||
Set<String> versions = versionStates.computeIfAbsent( key.asProjectRef(), k -> new HashSet<>() ); | ||
versions.add( value ); | ||
} ); | ||
vs.setRESTMetadata( versionStates ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am trying to understand the difference in the contents of pvResultResult
and versionStates
. It seems that they have virtually identical keys (ProjectVersionRef
vs. ProjectRef
), but the value is String
vs. Set<String>
. Is the value of versionStates
always a singleton because there's only ever one key so there's only ever one value added? I feel like there is something obfuscated about this code.
In any case, we may be able to simplify with something like vs.setRESTMetadata( Stream.of( pvResultResult ).collect( Collectors.toMap() ) )
.
io/src/main/java/org/commonjava/maven/ext/io/rest/DefaultTranslator.java
Show resolved
Hide resolved
io/src/main/java/org/commonjava/maven/ext/io/rest/DefaultTranslator.java
Show resolved
Hide resolved
io/src/main/java/org/commonjava/maven/ext/io/rest/DefaultTranslator.java
Show resolved
Hide resolved
For future reference, I have entered #846 to resolve comments raised after merge. |
No description provided.