-
Notifications
You must be signed in to change notification settings - Fork 69
Kotsyrba Alina 397 JUnit, Storeable, Parallel #528
base: master
Are you sure you want to change the base?
Conversation
public void drop() { | ||
for (byte i = 0; i < 16; ++i) { | ||
for (byte j = 0; j < 16; ++j) { | ||
File file = new File(getFullName(new DirFile(i, j))); |
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.
Стоит обернуть этот блок в try catch
Вынеси в константы 16, 256, 255, 100. |
Используй возможности Java 8 |
return status; | ||
} | ||
|
||
public void setStatus(byte newStatus) { |
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.
Разве он где-то используется?
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.
на будущее
} | ||
|
||
if ((firstName < 0) || firstName > FILES_COUNT - 1) { | ||
throw new MultiDataBaseException(dataBaseDirectory + " wrong file first name " + dir); |
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.
Повтор строки. Вынести в константы
|
||
public String put(final String keyStr, final String valueStr) { | ||
try { | ||
byte[] key = keyStr.getBytes("UTF-8"); |
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.
Кодировку вынесите в константы
|
||
@Override | ||
public int size() { | ||
int allSize = 0; |
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.
Вы не хотите здесь взять лок?
No description provided.