Skip to content

Sockets#13

Open
ArtyomLobanov wants to merge 22 commits into
masterfrom
task9
Open

Sockets#13
ArtyomLobanov wants to merge 22 commits into
masterfrom
task9

Conversation

@ArtyomLobanov
Copy link
Copy Markdown
Owner

No description provided.

}
FileDescriptor[] descriptors;
try (Socket socket = new Socket(host, port);
Connection connection = new Connection(socket)) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

пробел лишний

}
try (FileOutputStream fileStream = new FileOutputStream(file);
Socket socket = new Socket(host, port);
Connection connection = new Connection(socket)) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

и тут тоже съехало

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

и, кстати, эти пять строчек вполне имело смысл вынести в отдельную функцию типа createConnection() с аргументом типа команды

* @throws ClientException if some problems with connection appeared
*/
@NotNull
public synchronized FileDescriptor[] listFiles(@NotNull String path) throws ClientException {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

а зачем он synchronized?


public class Tests {

private static void createFile(String path) throws IOException {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jzuken
Copy link
Copy Markdown

jzuken commented May 19, 2017

gradlew забыли положить ещё

@jzuken
Copy link
Copy Markdown

jzuken commented May 29, 2017

✗ java -jar starter-1.0-SNAPSHOT.jar
Wrong number of arguments
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
at ru.spbau.lobanov.Starter.main(Starter.java:16)

-0.5
хорошо бы хелп какой-то выводить в таком случае

@jzuken
Copy link
Copy Markdown

jzuken commented May 29, 2017

за gui зачёт, 10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants