[REFACTOR] Заключительная часть.

This commit is contained in:
Zaxar163 2020-04-05 10:31:05 +03:00
parent 0d5dbe7794
commit fd5803ca32
14 changed files with 15 additions and 3 deletions

View file

@ -146,7 +146,7 @@ private static Serializer<?> serializerClass(int opcode) {
@Override @Override
public InsnList serialize(Number value) { public InsnList serialize(Number value) {
InsnList ret = new InsnList(); InsnList ret = new InsnList();
ret.add(NodeUtils.push(((Number) value).intValue())); ret.add(NodeUtils.push(value.intValue()));
ret.add(new InsnNode(opcode)); ret.add(new InsnNode(opcode));
return ret; return ret;
} }

View file

@ -52,11 +52,13 @@ public static class authRequest {
final String password; final String password;
final String ip; final String ip;
String apiKey; String apiKey;
public authRequest(String username, String password, String ip) { public authRequest(String username, String password, String ip) {
this.username = username; this.username = username;
this.password = password; this.password = password;
this.ip = ip; this.ip = ip;
} }
public authRequest(String username, String password, String ip, String apiKey) { public authRequest(String username, String password, String ip, String apiKey) {
this.username = username; this.username = username;
this.password = password; this.password = password;

View file

@ -19,6 +19,7 @@ public final class RejectAuthProvider extends AuthProvider implements Reconfigur
public RejectAuthProvider() { public RejectAuthProvider() {
} }
public RejectAuthProvider(String message) { public RejectAuthProvider(String message) {
this.message = message; this.message = message;
} }

View file

@ -29,6 +29,7 @@ public class ProguardConf {
public final Path mappings; public final Path mappings;
public final Path words; public final Path words;
public transient final LaunchServer srv; public transient final LaunchServer srv;
public ProguardConf(LaunchServer srv) { public ProguardConf(LaunchServer srv) {
proguard = srv.dir.resolve("proguard"); proguard = srv.dir.resolve("proguard");
config = proguard.resolve("proguard.config"); config = proguard.resolve("proguard.config");

View file

@ -36,6 +36,7 @@ public class CertificateAutogenTask implements LauncherBuildTask {
public X509CertificateHolder bcCertificate; public X509CertificateHolder bcCertificate;
public CMSSignedDataGenerator signedDataGenerator; public CMSSignedDataGenerator signedDataGenerator;
private LaunchServer server; private LaunchServer server;
public CertificateAutogenTask(LaunchServer server) { public CertificateAutogenTask(LaunchServer server) {
this.server = server; this.server = server;
} }

View file

@ -34,6 +34,7 @@ public class MainBuildTask implements LauncherBuildTask {
public IOHookSet<BuildContext> preBuildHook = new IOHookSet<>(); public IOHookSet<BuildContext> preBuildHook = new IOHookSet<>();
public IOHookSet<BuildContext> postBuildHook = new IOHookSet<>(); public IOHookSet<BuildContext> postBuildHook = new IOHookSet<>();
public Map<String, Object> properties = new HashMap<>(); public Map<String, Object> properties = new HashMap<>();
public MainBuildTask(LaunchServer srv) { public MainBuildTask(LaunchServer srv) {
server = srv; server = srv;
reader = new ClassMetadataReader(); reader = new ClassMetadataReader();

View file

@ -24,6 +24,7 @@ public final class IndexAssetCommand extends Command {
public static final String OBJECTS_DIR = "objects"; public static final String OBJECTS_DIR = "objects";
private static final Gson gson = new Gson(); private static final Gson gson = new Gson();
private static final String JSON_EXTENSION = ".json"; private static final String JSON_EXTENSION = ".json";
public IndexAssetCommand(LaunchServer server) { public IndexAssetCommand(LaunchServer server) {
super(server); super(server);
} }

View file

@ -122,6 +122,7 @@ public static class AuthContext {
public final Client client; public final Client client;
@Deprecated @Deprecated
public int password_length; //Use AuthProvider for get password public int password_length; //Use AuthProvider for get password
public AuthContext(Client client, String login, String profileName, String ip, ConnectTypes authType) { public AuthContext(Client client, String login, String profileName, String ip, ConnectTypes authType) {
this.client = client; this.client = client;
this.login = login; this.login = login;

View file

@ -7,6 +7,7 @@ public class ExceptionEvent extends RequestEvent {
public final String message; public final String message;
@LauncherNetworkAPI @LauncherNetworkAPI
public final String clazz; public final String clazz;
public ExceptionEvent(Exception e) { public ExceptionEvent(Exception e) {
this.message = e.getMessage(); this.message = e.getMessage();
this.clazz = e.getClass().getName(); this.clazz = e.getClass().getName();

View file

@ -17,6 +17,7 @@ public class AuthRequestEvent extends RequestEvent {
public String protectToken; public String protectToken;
@LauncherNetworkAPI @LauncherNetworkAPI
public long session; public long session;
public AuthRequestEvent() { public AuthRequestEvent() {
} }

View file

@ -15,6 +15,7 @@ public GetAvailabilityAuthRequestEvent(List<AuthAvailability> list) {
this.list = list; this.list = list;
this.features = ServerFeature.FEATURE_SUPPORT.val; this.features = ServerFeature.FEATURE_SUPPORT.val;
} }
public GetAvailabilityAuthRequestEvent(List<AuthAvailability> list, long features) { public GetAvailabilityAuthRequestEvent(List<AuthAvailability> list, long features) {
this.list = list; this.list = list;
this.features = features; this.features = features;

View file

@ -9,6 +9,6 @@
@Retention(CLASS) @Retention(CLASS)
@Target(FIELD) @Target(FIELD)
public @interface LauncherInject { public @interface LauncherInject {
public String value(); // target of inject String value(); // target of inject
} }

View file

@ -69,6 +69,7 @@ public final class LogHelper {
} }
} }
} }
private LogHelper() { private LogHelper() {
} }

@ -1 +1 @@
Subproject commit 07e4380ad52c4ef08378b8eb2202d8a1bd3639a2 Subproject commit fc31be1ed9ce7cc57e8c33d7de80d75261d39aef