Skip to content

Commit 46391f6

Browse files
javier-godoymlopezFC
authored andcommitted
refactor: avoid use of commons.lang3
Close #28
1 parent bcec258 commit 46391f6

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/main/java/com/flowingcode/vaadin/addons/imagecrop/ImageCrop.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
import java.nio.charset.StandardCharsets;
2424
import java.util.Base64;
2525

26-
import org.apache.commons.lang3.StringUtils;
27-
2826
import com.vaadin.flow.component.ComponentEventListener;
2927
import com.vaadin.flow.component.Tag;
3028
import com.vaadin.flow.component.dependency.CssImport;
@@ -377,7 +375,7 @@ public void setImageFullHeight(Boolean fullHeight) {
377375
*/
378376
public byte[] getCroppedImageBase64() {
379377
String croppedDataUri = this.getCroppedImageDataUri();
380-
if (StringUtils.isBlank(croppedDataUri)) {
378+
if (isBlank(croppedDataUri)) {
381379
return null;
382380
}
383381

@@ -389,4 +387,8 @@ public byte[] getCroppedImageBase64() {
389387
return Base64.getDecoder().decode(base64Data.getBytes(StandardCharsets.UTF_8));
390388
}
391389

390+
private static boolean isBlank(String s) {
391+
return s == null || s.isBlank();
392+
}
393+
392394
}

0 commit comments

Comments
 (0)