[general] Refactoring chunithm UpsertUserAll request and some clean up

This commit is contained in:
samnyan
2020-03-28 22:23:22 +09:00
parent 9a4ca3a612
commit 528b2f8b4d
70 changed files with 310 additions and 241 deletions

View File

@@ -12,7 +12,7 @@ import java.io.IOException;
*/
public class CompressRequestWrapper extends HttpServletRequestWrapper {
private ByteArrayInputStream input;
private final ByteArrayInputStream input;
private ServletInputStream filterInput;
public CompressRequestWrapper(HttpServletRequest request, byte[] input) {
@@ -22,7 +22,7 @@ public class CompressRequestWrapper extends HttpServletRequestWrapper {
@Override
public ServletInputStream getInputStream() throws IOException {
public ServletInputStream getInputStream() {
if (filterInput == null) {
filterInput = new ServletInputStream() {
@Override
@@ -41,7 +41,7 @@ public class CompressRequestWrapper extends HttpServletRequestWrapper {
}
@Override
public int read() throws IOException {
public int read() {
return input.read();
}
};

View File

@@ -12,7 +12,7 @@ import java.io.IOException;
*/
public class CompressResponseWrapper extends HttpServletResponseWrapper {
private ByteArrayOutputStream output;
private final ByteArrayOutputStream output;
private ServletOutputStream filterOutput;
@@ -22,7 +22,7 @@ public class CompressResponseWrapper extends HttpServletResponseWrapper {
}
@Override
public ServletOutputStream getOutputStream() throws IOException {
public ServletOutputStream getOutputStream() {
if (filterOutput == null) {
filterOutput = new ServletOutputStream() {
@Override
@@ -36,7 +36,7 @@ public class CompressResponseWrapper extends HttpServletResponseWrapper {
}
@Override
public void write(int b) throws IOException {
public void write(int b) {
output.write(b);
}
};

View File

@@ -61,7 +61,7 @@ public class CompressionFilter extends OncePerRequestFilter {
}
@Override
protected boolean shouldNotFilter(HttpServletRequest request) throws ServletException {
protected boolean shouldNotFilter(HttpServletRequest request) {
String path = request.getServletPath();
boolean notFilter = true;
for (String prefix : filterList) {

View File

@@ -0,0 +1,18 @@
package icu.samnyan.aqua.sega.general.model.response;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author samnyan (privateamusement@protonmail.com)
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class UserRecentRating {
private int musicId;
private int difficultId;
private String romVersionCode;
private int score;
}