Kapkiai commented on code in PR #1268:
URL: https://github.com/apache/bigtop/pull/1268#discussion_r1599415055


##########
packages.gradle:
##########
@@ -102,7 +102,7 @@ def isValidMavenBuildThreads(threads) {
 }
 
 def getPkgNameSuffix(component, type) {
-    def originalSuffix = type.equalsIgnoreCase("deb") ? 
component.deb_pkg_suffix : component.rpm_pkg_suffix
+    def originalSuffix = type.equalsIgnoreCase("deb") ? 
component.deb_pkg_suffix?:"" : component.rpm_pkg_suffix?:"%{nil}"

Review Comment:
   @iwasakims is it a good path to refactor the changes as below?
   
   ``` groovy
   def defaultSuffix = type.equalsIgnoreCase("deb") ?  "" : "%{nil}"
   def originalSuffix = type.equalsIgnoreCase("deb") ?
               component.deb_pkg_suffix ?: defaultSuffix :
               component.rpm_pkg_suffix ?: defaultSuffix
   ```
   
   With that, we will have the defaults defined once.



-- 
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