[FIX] Человекочитаемая ошибка UpdateResponse и org.apache.commons.logging в конфиге ProGuard

This commit is contained in:
Gravit 2019-04-13 04:42:04 +07:00
parent 02c59cc457
commit c3fa410964
No known key found for this signature in database
GPG key ID: 061981E1E85D3216
2 changed files with 10 additions and 2 deletions

View file

@ -3,7 +3,9 @@
import io.netty.channel.ChannelHandlerContext;
import ru.gravit.launcher.events.request.ErrorRequestEvent;
import ru.gravit.launcher.events.request.UpdateRequestEvent;
import ru.gravit.launcher.hasher.HashedDir;
import ru.gravit.launcher.profiles.ClientProfile;
import ru.gravit.launcher.serialize.signed.SignedObjectHolder;
import ru.gravit.launchserver.LaunchServer;
import ru.gravit.launchserver.socket.Client;
import ru.gravit.launchserver.websocket.WebSocketService;
@ -32,6 +34,12 @@ public void execute(WebSocketService service, ChannelHandlerContext ctx, Client
}
}
}
service.sendObject(ctx, new UpdateRequestEvent(LaunchServer.server.updatesDirMap.get(dirName).object, LaunchServer.server.config.netty.downloadURL.replace("%dirname%",dirName)));
SignedObjectHolder<HashedDir> dir = LaunchServer.server.updatesDirMap.get(dirName);
if(dir == null)
{
service.sendObject(ctx, new ErrorRequestEvent(String.format("Directory %s not found", dirName)));
return;
}
service.sendObject(ctx, new UpdateRequestEvent(dir.object, LaunchServer.server.config.netty.downloadURL.replace("%dirname%",dirName)));
}
}

View file

@ -22,7 +22,7 @@
-keeppackagenames com.mojang.**,net.minecraftforge.fml.**,cpw.mods.fml.**,oshi.**,com.sun.jna.**,com.google.gson.**
-keep class com.mojang.**,net.minecraftforge.fml.**,cpw.mods.fml.**,oshi.**,com.sun.jna.**,com.google.gson.**,org.slf4j.**,oshi.jna.**,com.sun.jna.** {
-keep class com.mojang.**,net.minecraftforge.fml.**,cpw.mods.fml.**,oshi.**,com.sun.jna.**,com.google.gson.**,org.slf4j.**,oshi.jna.**,com.sun.jna.**,org.apache.commons.logging.** {
*;
}