Skip to content

Commit

Permalink
eval: add checks for line style params (#1644)
Browse files Browse the repository at this point in the history
Put in some sanity checks to notice quickly if it gets
misconfigured.
  • Loading branch information
brharrington authored Mar 31, 2024
1 parent de7423f commit 8d421c6
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,9 @@ import java.awt.Color
* @param lineWidth
* Width of the stroke when rendering the line.
*/
case class LineStyleMetadata(plot: Int, color: Color, lineStyle: LineStyle, lineWidth: Float)
case class LineStyleMetadata(plot: Int, color: Color, lineStyle: LineStyle, lineWidth: Float) {

require(color != null, "color cannot be null")
require(lineStyle != null, "lineStyle cannot be null")
require(lineWidth >= 0.0f, "lineWidth cannot be negative")
}

0 comments on commit 8d421c6

Please sign in to comment.