mbeckerle commented on code in PR #1433:
URL: https://github.com/apache/daffodil/pull/1433#discussion_r1956248359


##########
project/OsgiCheck.scala:
##########
@@ -83,7 +83,7 @@ object OsgiCheckPlugin extends AutoPlugin {
         // should be a list of one.
         val packageOwnersMap = packageOwnerTuples
           .groupBy { case (packageName, _) => packageName }
-          .mapValues { list => list.map { case (_, packageOwner) => 
packageOwner } }
+          .map { case (k, list) => k -> list.map { case (_, packageOwner) => 
packageOwner } }

Review Comment:
   I probably wouldn't have spotted this if Josh hadn't already highlighted 
this.
   
   But.... anyway I can't get any intuition about now this map, nor the prior 
mapValues actually work. I read this as 'it needs to be flatmap', but I expect 
that's untrue.
   
   How about change k and _ into names of the things in those tuples (even 
though they are unused) to help me out.
   (I'm not sure about that. Might end up cluttered. Maybe just initials like k 
could be pn, and list could be pnPoPairs.  The _ could be pn,)
   
   Please also add the type to packageOwnersMap so I can at least see what this 
is trying to create. 
   
   Or.... and I'm really starting to think it is preferable, add the RichMap 
conversion so we don't have to touch any of these mapValues calls. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to