Fix: nullpointerexception
This commit is contained in:
@@ -388,11 +388,13 @@ public class Client {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
if (this.server.getPage("logout").isEmpty() == false) {
|
||||||
this.server.HTTPRequest(this.server.getPage("logout"));
|
try {
|
||||||
}
|
this.server.HTTPRequest(this.server.getPage("logout"));
|
||||||
catch (IOException e) {
|
}
|
||||||
// nothing to do: if the logout failed that's ok
|
catch (IOException e) {
|
||||||
|
// nothing to do: if the logout failed that's ok
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.server.interrupt();
|
this.server.interrupt();
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ import com.sheepit.client.datamodel.FileMD5;
|
|||||||
import com.sheepit.client.datamodel.HeartBeatInfos;
|
import com.sheepit.client.datamodel.HeartBeatInfos;
|
||||||
import com.sheepit.client.datamodel.JobInfos;
|
import com.sheepit.client.datamodel.JobInfos;
|
||||||
import com.sheepit.client.datamodel.JobValidation;
|
import com.sheepit.client.datamodel.JobValidation;
|
||||||
|
import com.sheepit.client.datamodel.RequestEndPoint;
|
||||||
import com.sheepit.client.datamodel.ServerConfig;
|
import com.sheepit.client.datamodel.ServerConfig;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import org.simpleframework.xml.core.Persister;
|
import org.simpleframework.xml.core.Persister;
|
||||||
@@ -769,7 +770,10 @@ public class Server extends Thread implements HostnameVerifier, X509TrustManager
|
|||||||
|
|
||||||
public String getPage(String key) {
|
public String getPage(String key) {
|
||||||
if (this.serverConfig != null) {
|
if (this.serverConfig != null) {
|
||||||
return this.base_url + this.serverConfig.getRequestEndPoint(key).getPath();
|
RequestEndPoint endpoint = this.serverConfig.getRequestEndPoint(key);
|
||||||
|
if (endpoint != null) {
|
||||||
|
return this.base_url + endpoint.getPath();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user