Skip to content

Commit

Permalink
use transferTo #657
Browse files Browse the repository at this point in the history
  • Loading branch information
syjer committed Jun 14, 2019
1 parent 96f54eb commit d867205
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/java/alfio/controller/IndexController.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import org.springframework.core.io.ClassPathResource;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.util.StreamUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

Expand Down Expand Up @@ -74,7 +73,7 @@ public void replyToIndex(HttpServletResponse response) throws IOException {
response.setContentType("text/html");
response.setCharacterEncoding("UTF-8");
try (var is = new ClassPathResource("alfio-public-frontend-index.html").getInputStream(); var os = response.getOutputStream()) {
StreamUtils.copy(is, os);
is.transferTo(os);
}
}
}

0 comments on commit d867205

Please sign in to comment.