Skip to content
This repository has been archived by the owner on Sep 27, 2022. It is now read-only.

Kotsyrba Alina 397 JUnit, Storeable, Parallel #528

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

TafTafa
Copy link

@TafTafa TafTafa commented Dec 12, 2014

No description provided.

@vpavlenko vpavlenko self-assigned this Dec 12, 2014
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)));
Copy link
Contributor

Choose a reason for hiding this comment

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

Стоит обернуть этот блок в try catch

@ElinRin
Copy link
Contributor

ElinRin commented Dec 21, 2014

Вынеси в константы 16, 256, 255, 100.

@ElinRin
Copy link
Contributor

ElinRin commented Dec 21, 2014

Используй возможности Java 8
http://habrahabr.ru/post/203026/

return status;
}

public void setStatus(byte newStatus) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Разве он где-то используется?

Copy link
Author

Choose a reason for hiding this comment

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

на будущее

@TafTafa TafTafa changed the title Kotsyrba Alina 397 JUnit Kotsyrba Alina 397 JUnit, Storeable Dec 23, 2014
}

if ((firstName < 0) || firstName > FILES_COUNT - 1) {
throw new MultiDataBaseException(dataBaseDirectory + " wrong file first name " + dir);
Copy link
Collaborator

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");
Copy link
Collaborator

Choose a reason for hiding this comment

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

Кодировку вынесите в константы

@vpavlenko vpavlenko changed the title Kotsyrba Alina 397 JUnit, Storeable Kotsyrba Alina 397 JUnit, Storeable, Parallel Dec 25, 2014

@Override
public int size() {
int allSize = 0;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Вы не хотите здесь взять лок?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants