Skip to content

Commit

Permalink
Require nonNull is Print methods
Browse files Browse the repository at this point in the history
  • Loading branch information
raju249 committed Jan 18, 2021
1 parent c80bddf commit ce4b38d
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions java/client/src/org/openqa/selenium/print/PrintOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

package org.openqa.selenium.print;

import org.openqa.selenium.internal.Require;

public class PrintOptions {

public enum Orientation {
Expand All @@ -36,19 +38,19 @@ public Orientation getOrientation() {
}

public void setOrientation(Orientation orientation) {
this.orientation = orientation;
this.orientation = Require.nonNull("orientation", orientation);
}

public String[] getPageRanges() {
return this.pageRanges;
}

public void setPageRanges(String[] ranges) {
this.pageRanges = ranges;
this.pageRanges = Require.nonNull("pageRanges", ranges);
}

public void setBackground(boolean background) {
this.background = background;
this.background = Require.nonNull("background", background);
}

public boolean getBackground() {
Expand All @@ -71,15 +73,15 @@ public boolean getShrinkToFit() {
}

public void setShrinkToFit(boolean value) {
this.shrinkToFit = value;
this.shrinkToFit = Require.nonNull("value", value);
}

public void setPageSize(PageSize pageSize) {
this.pageSize = pageSize;
this.pageSize = Require.nonNull("pageSize", pageSize);
}

public void setPageMargin(PageMargin margin) {
this.pageMargin = margin;
this.pageMargin = Require.nonNull("margin", margin);
}

public PageSize getPageSize() {
Expand Down

0 comments on commit ce4b38d

Please sign in to comment.