Github user JoshRosen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/1980#discussion_r18432549
  
    --- Diff: core/src/main/scala/org/apache/spark/ui/JettyUtils.scala ---
    @@ -205,10 +231,88 @@ private[spark] object JettyUtils extends Logging {
         ServerInfo(server, boundPort, collection)
       }
     
    +  private def newURI(scheme: String, server: String, port: Int, path: 
String, query: String) = {
    +    val builder = newURIBuilder(scheme, server, port)
    +    builder.append(path)
    +    if (query != null && query.length > 0) 
builder.append('?').append(query)
    +    builder.toString
    +  }
    +
    +  private def newURIBuilder(scheme: String, server: String, port: Int) = {
    +    val builder = new StringBuilder
    +    appendSchemeHostPort(builder, scheme, server, port)
    +    builder
    +  }
    +
    +  private def appendSchemeHostPort(url: StringBuilder, scheme: String, 
server: String, port: Int) {
    --- End diff --
    
    Similarly, this function is only called from one place and it's kind of 
confusing, so I'd prefer to inline this code in `newURI` (or define it as a 
nested block / function there).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to