[FIX] Некорректный UpdateRequest

This commit is contained in:
Gravit 2019-12-05 02:24:19 +07:00
parent 71018a0cdf
commit 20913cdbc6
No known key found for this signature in database
GPG key ID: 061981E1E85D3216

View file

@ -1,17 +1,18 @@
package pro.gravit.launcher.request.update;
import pro.gravit.launcher.LauncherAPI;
import pro.gravit.launcher.LauncherNetworkAPI;
import pro.gravit.launcher.events.request.UpdateRequestEvent;
import pro.gravit.launcher.request.Request;
import pro.gravit.launcher.request.websockets.StandartClientWebSocketService;
import pro.gravit.launcher.request.websockets.WebSocketRequest;
import pro.gravit.utils.helper.LogHelper;
import java.nio.file.Path;
import java.util.Objects;
public final class UpdateRequest extends Request<UpdateRequestEvent> implements WebSocketRequest {
public UpdateRequest(String dirName) {
this.dirName = dirName;
}
@Override
public String getType() {
return "update";
@ -27,14 +28,5 @@ public UpdateRequestEvent requestDo(StandartClientWebSocketService service) thro
// Instance
@LauncherNetworkAPI
private transient final Path dir;
public Path getDir() {
return dir;
}
@LauncherAPI
public UpdateRequest(Path dir) {
this.dir = Objects.requireNonNull(dir, "dir");
}
private final String dirName;
}