forked from Cookies_Github_mirror/AquaDX
[general] Refactoring chunithm UpsertUserAll request and some clean up
This commit is contained in:
@@ -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();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user