Skip to content

Refactor FileRequestHandler's methods to non-static methods#80

Merged
Yuriks1 merged 10 commits into
mainfrom
issue-75
Feb 12, 2022
Merged

Refactor FileRequestHandler's methods to non-static methods#80
Yuriks1 merged 10 commits into
mainfrom
issue-75

Conversation

@Vimbayinashe

Copy link
Copy Markdown
Contributor

Closes issue #75.

@Vimbayinashe Vimbayinashe linked an issue Feb 8, 2022 that may be closed by this pull request
@ToniKaru

ToniKaru commented Feb 8, 2022

Copy link
Copy Markdown
Contributor

Just want to mention that there were some changes to FilRequestHandler in Issue 19. Including static to non-static methods. (There is a pull request out now for it.)

@ToniKaru ToniKaru self-requested a review February 8, 2022 15:24
private FileRequestHandler fileRequestHandler;

public ClientHandler(Socket socket) {
public ClientHandler(Socket socket, FileRequestHandler fileRequestHandler) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice. It looks like you made fileRequestHandler a dependency injection so that you could test ClientHandler more easily.

ToniKaru
ToniKaru previously approved these changes Feb 8, 2022

@ToniKaru ToniKaru left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good. Static methods made non-static and good to fix the package name to follow good praxis.

@helenahalldiniths helenahalldiniths self-requested a review February 9, 2022 09:44
@helenahalldiniths helenahalldiniths removed their request for review February 9, 2022 10:43
@helenahalldiniths

helenahalldiniths commented Feb 9, 2022

Copy link
Copy Markdown
Contributor

There is a problem with glf on my computer. I have to fix it before I can propperly review the code. (So someone else might have to review this :) )

@helenahalldiniths helenahalldiniths self-requested a review February 9, 2022 11:48

@helenahalldiniths helenahalldiniths left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Look good!
Maybe we shouldn't change the package name in this issue since it is not part of the issue itself(It could be done separately in another issue). However it is a good idea and sould be done.

@Vimbayinashe

Copy link
Copy Markdown
Contributor Author

Look good! Maybe we shouldn't change the package name in this issue since it is not part of the issue itself(It could be done separately in another issue). However it is a good idea and sould be done.

I have reverted the package name changes but now the issue needs to be reviewed again 😅

@helenahalldiniths helenahalldiniths left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good job!

@LordRekishi

Copy link
Copy Markdown
Contributor

I went ahead and refactored the ClientHandler to work with the FileRequestHandler injection as well as merged the Server class from main

@helenahalldiniths helenahalldiniths left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good!

@Yuriks1 Yuriks1 self-requested a review February 12, 2022 14:41

@Yuriks1 Yuriks1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me, well done

@Yuriks1 Yuriks1 merged commit 35bbdf0 into main Feb 12, 2022
@LordRekishi LordRekishi deleted the issue-75 branch February 13, 2022 22:12
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.

Convert FileRequestHandler methods to non-static methods

5 participants