moved a thing in a try block
All checks were successful
flavien's git/Projet_JAVA_P2P_STRI2A/pipeline/head This commit looks good

This commit is contained in:
Flavien Haas 2020-03-18 16:21:08 +01:00
parent 9bcdfaa602
commit 1550c5bbbe

View File

@ -164,8 +164,8 @@ public class ClientManagementTCP implements Runnable {
*/
private String[] listDirectory() throws EmptyDirectory, InternalError, UnknownHostException, IOException, TransmissionError, ProtocolError, VersionError, SizeError, InternalRemoteError, ProtocolRemoteError, VersionRemoteError {
ProtocolP2PPacketTCP d = new ProtocolP2PPacketTCP(new Payload(RequestResponseCode.LIST_REQUEST));
d.sendRequest((Object)hostList.get(0).getTCPSocket());
try {
d.sendRequest((Object)hostList.get(0).getTCPSocket());
Payload p = d.receiveResponse().getPayload();
assert p instanceof FileList : "This payload must be instance of Filelist";
if (!(p instanceof FileList)) {