-
Notifications
You must be signed in to change notification settings - Fork 47
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
Conversation
There was a problem hiding this 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); |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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.
There was a problem hiding this 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.
There was a problem hiding this 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 { |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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()); |
There was a problem hiding this comment.
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.
codeclimate не прошел, 0 баллов |
No description provided.