Skip to content

Commit

Permalink
Merge pull request #948 from fanf/bug_7360/exception_exception_caught…
Browse files Browse the repository at this point in the history
…_during_polcy_update_process_empty_max

Fixes #7360: Exception: Exception caught during polcy update process: empty.max
  • Loading branch information
ncharles committed Nov 3, 2015
2 parents 8f942cf + 88a9c47 commit 6a4bc75
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ class PrepareTemplateVariablesImpl(

//utilitary method for formating list of "promisee usebundle => bundlename;"
def formatUsebundle(x:Seq[(Technique, String, Bundle)]) = {
val alignWidth = x.map(_._2.size).max
val alignWidth = if(x.size <= 0) 0 else x.map(_._2.size).max
x.map { case (t, promiser, bundle) => s""""${promiser}"${" "*Math.max(0, alignWidth - promiser.size)} usebundle => ${bundle.name};"""}.mkString( "\n")
}

Expand Down

0 comments on commit 6a4bc75

Please sign in to comment.