Skip to content

Commit ae2ca16

Browse files
committed
Require nonNull is Print methods
1 parent cf7f491 commit ae2ca16

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

java/client/src/org/openqa/selenium/print/PrintOptions.java

+8-6
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717

1818
package org.openqa.selenium.print;
1919

20+
import org.openqa.selenium.internal.Require;
21+
2022
public class PrintOptions {
2123

2224
public enum Orientation {
@@ -36,19 +38,19 @@ public Orientation getOrientation() {
3638
}
3739

3840
public void setOrientation(Orientation orientation) {
39-
this.orientation = orientation;
41+
this.orientation = Require.nonNull("orientation", orientation);
4042
}
4143

4244
public String[] getPageRanges() {
4345
return this.pageRanges;
4446
}
4547

4648
public void setPageRanges(String[] ranges) {
47-
this.pageRanges = ranges;
49+
this.pageRanges = Require.nonNull("pageRanges", ranges);
4850
}
4951

5052
public void setBackground(boolean background) {
51-
this.background = background;
53+
this.background = Require.nonNull("background", background);
5254
}
5355

5456
public boolean getBackground() {
@@ -71,15 +73,15 @@ public boolean getShrinkToFit() {
7173
}
7274

7375
public void setShrinkToFit(boolean value) {
74-
this.shrinkToFit = value;
76+
this.shrinkToFit = Require.nonNull("value", value);
7577
}
7678

7779
public void setPageSize(PageSize pageSize) {
78-
this.pageSize = pageSize;
80+
this.pageSize = Require.nonNull("pageSize", pageSize);
7981
}
8082

8183
public void setPageMargin(PageMargin margin) {
82-
this.pageMargin = margin;
84+
this.pageMargin = Require.nonNull("margin", margin);
8385
}
8486

8587
public PageSize getPageSize() {

0 commit comments

Comments
 (0)