no message
This commit is contained in:
@@ -273,13 +273,14 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
}
|
||||
@Override
|
||||
protected void Session() throws Exception {
|
||||
DBObject dbObject = null;
|
||||
Test test = null;
|
||||
DBObject dbObject;
|
||||
Test test;
|
||||
int test_id;
|
||||
switch (code) {
|
||||
case PublishTestProject:
|
||||
Print("Прикрепить проект к тесту " + request.arg);
|
||||
System.out.println("Прикрепить проект к тесту " + request.arg);
|
||||
int test_id = Integer.parseInt(request.arg);
|
||||
test_id = Integer.parseInt(request.arg);
|
||||
if (db.tests.containsKey(test_id)) {
|
||||
test = db.tests.get(test_id);
|
||||
Utils.unpackFile((byte[]) request.object, test.getArchive());
|
||||
@@ -406,8 +407,9 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
//------------------------------------------->>
|
||||
case DownloadTest:
|
||||
Print("Отправить клиенту тест " + request.arg);
|
||||
if (db.tests.containsKey(request.arg)) {
|
||||
test = db.tests.get(request.arg);
|
||||
test_id = Integer.parseInt(request.arg);
|
||||
if (db.tests.containsKey(test_id)) {
|
||||
test = db.tests.get(test_id);
|
||||
response = new ServerExchangeUnit_2021(ServerCode.OK, "", Utils.packFile(test.getArchive()));
|
||||
} else
|
||||
throw new RepositoryRefuseException("Теста с именем " + request.arg + " не существует");
|
||||
|
||||
Reference in New Issue
Block a user