Skip to content

Commit 1634061

Browse files
javier-godoymlopezFC
authored andcommitted
fix: avoid use of org.apache.commons
Close #130
1 parent 0edc732 commit 1634061

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/com/flowingcode/vaadin/addons/DevSourceRequestHandler.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* #%L
33
* Commons Demo
44
* %%
5-
* Copyright (C) 2020 - 2023 Flowing Code
5+
* Copyright (C) 2020 - 2025 Flowing Code
66
* %%
77
* Licensed under the Apache License, Version 2.0 (the "License");
88
* you may not use this file except in compliance with the License.
@@ -26,7 +26,7 @@
2626
import com.vaadin.flow.server.VaadinSession;
2727
import java.io.File;
2828
import java.io.IOException;
29-
import org.apache.commons.io.FileUtils;
29+
import java.nio.file.Files;
3030

3131
public class DevSourceRequestHandler implements RequestHandler {
3232

@@ -48,7 +48,7 @@ public boolean handleRequest(VaadinSession session, VaadinRequest request,
4848
}
4949

5050
if (fileExists(path)) {
51-
byte file[] = FileUtils.readFileToByteArray(getFile(path));
51+
byte file[] = Files.readAllBytes(getFile(path).toPath());
5252
int j = 0;
5353
for (int i = 0; i < file.length; i++) {
5454
if (file[i] != '\r') {

0 commit comments

Comments
 (0)