Skip to content

Commit 281049e

Browse files
author
Darren Greaves
committed
Merge pull request boncey#143 from Linus12/master
Update Size.java
2 parents f124e59 + 835e403 commit 281049e

File tree

1 file changed

+2
-2
lines changed
  • Flickr4Java/src/main/java/com/flickr4java/flickr/photos

1 file changed

+2
-2
lines changed

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)