From 32f70ab1903037191e11267dcc60aed31e84a720 Mon Sep 17 00:00:00 2001 From: Javier Godoy <11554739+javier-godoy@users.noreply.github.com> Date: Fri, 26 Dec 2025 08:20:08 -0300 Subject: [PATCH] fix: avoid use of org.apache.commons Close #130 --- .../flowingcode/vaadin/addons/DevSourceRequestHandler.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/flowingcode/vaadin/addons/DevSourceRequestHandler.java b/src/main/java/com/flowingcode/vaadin/addons/DevSourceRequestHandler.java index 7548ebe..78c8f05 100644 --- a/src/main/java/com/flowingcode/vaadin/addons/DevSourceRequestHandler.java +++ b/src/main/java/com/flowingcode/vaadin/addons/DevSourceRequestHandler.java @@ -2,7 +2,7 @@ * #%L * Commons Demo * %% - * Copyright (C) 2020 - 2023 Flowing Code + * Copyright (C) 2020 - 2025 Flowing Code * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ import com.vaadin.flow.server.VaadinSession; import java.io.File; import java.io.IOException; -import org.apache.commons.io.FileUtils; +import java.nio.file.Files; public class DevSourceRequestHandler implements RequestHandler { @@ -48,7 +48,7 @@ public boolean handleRequest(VaadinSession session, VaadinRequest request, } if (fileExists(path)) { - byte file[] = FileUtils.readFileToByteArray(getFile(path)); + byte file[] = Files.readAllBytes(getFile(path).toPath()); int j = 0; for (int i = 0; i < file.length; i++) { if (file[i] != '\r') {