Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Таразанов Максим, ИТМО, М4139 #27

Closed
wants to merge 11 commits into from

Conversation

MaxTTG
Copy link
Contributor

@MaxTTG MaxTTG commented Feb 20, 2024

No description provided.

Copy link

@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

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

The PR diff size of 8435 lines exceeds the maximum allowed for the inline comments feature.

try {
dao.close();
} catch (IOException e) {
throw new RuntimeException(e);
Copy link

Choose a reason for hiding this comment

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

Define and throw a dedicated exception instead of using a generic one.

import java.nio.file.Files;
import java.util.List;

public class ServerMain {
Copy link

Choose a reason for hiding this comment

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

All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning.

public class MyService implements Service {
private MyServer server;

private ServiceConfig config;
Copy link

Choose a reason for hiding this comment

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

Private field 'config' could be made final; it is only initialized in the declaration or constructor.

@incubos incubos requested a review from vladimir-bf February 22, 2024 11:41
@vladimir-bf vladimir-bf assigned ghost and unassigned vladimir-bf Feb 23, 2024
Copy link

@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

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

The PR diff size of 10603 lines exceeds the maximum allowed for the inline comments feature.

Copy link

@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

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

The PR diff size of 10603 lines exceeds the maximum allowed for the inline comments feature.

import java.nio.file.Files;
import java.util.List;

public class ServerMain {
Copy link

Choose a reason for hiding this comment

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

A class which only has private constructors should be final

dao.close();
} catch (IOException e) {
logger.error("IOException in close()->dao.close()");
throw new RuntimeException(e);
Copy link

Choose a reason for hiding this comment

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

Define and throw a dedicated exception instead of using a generic one.

super.handleRequest(request, session);
} catch (Exception e) {
logger.error("IOException in handleRequest->executorService.execute()");
System.out.println(e.getClass());
Copy link

Choose a reason for hiding this comment

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

Replace this use of System.out or System.err by a logger.

@ghost
Copy link

ghost commented Feb 29, 2024

codeclimate не прошел, 0 баллов

@ghost ghost closed this Feb 29, 2024
This pull request was closed.
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