Skip to content

Commit 835e403

Browse files
committed
Update Size.java
1 parent 5836027 commit 835e403

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • Flickr4Java/src/main/java/com/flickr4java/flickr/photos

Flickr4Java/src/main/java/com/flickr4java/flickr/photos/Size.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ public void setWidth(int width) {
260260

261261
public void setWidth(String width) {
262262

263-
if (width != null) {
263+
if (!(width == null || "".equals(width))) { // checking both null and empty
264264
setWidth(Integer.parseInt(width));
265265
}
266266
}
@@ -277,7 +277,7 @@ public void setHeight(int height) {
277277

278278
public void setHeight(String height) {
279279

280-
if (height != null) {
280+
if (!(height == null || "".equals(height))) { // checking both null and empty
281281
setHeight(Integer.parseInt(height));
282282
}
283283
}

0 commit comments

Comments
 (0)