Skip to content

add classes that manage operations on link#3

Open
kuchmei wants to merge 1 commit into
oleksandr-kazimirov:v1from
kuchmei:master
Open

add classes that manage operations on link#3
kuchmei wants to merge 1 commit into
oleksandr-kazimirov:v1from
kuchmei:master

Conversation

@kuchmei
Copy link
Copy Markdown

@kuchmei kuchmei commented Jul 30, 2019

No description provided.

Comment thread src/OperatoinManager.java Outdated
}
}
}
else throw new ValueNotFoundExcetpion("URL is not found in the map");
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.

@kuchmei, always use {} even when only one statement

Comment thread src/OperatoinManager.java Outdated
throw new ValueNotFoundExcetpion("ID is not found in the map");
}
else{
urlMap.remove(uuid);
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.

you deleted the URL in line 56

Comment thread src/OperatoinManager.java Outdated
urlMap.clear();
System.out.println("Map is clean" + urlMap.keySet());

return urlMap;
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.

you need to return old map, before cleaning

Comment thread src/OperatoinManager.java Outdated
}

System.out.println("Link is: " + urlMap.get(uuid));
return urlMap.get(uuid);
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.

maybe urlMap.get(uuid) change local variable

Comment thread src/OperatoinManager.java Outdated
else throw new ValueNotFoundExcetpion("URL is not found in the map");


return null;
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.

you need return UUID

Comment thread src/Main.java
System.out.println(e.getMessage());
}
catch (Exception e){
throw new Error();
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

do not throw an error never

Copy link
Copy Markdown
Owner

@oleksandr-kazimirov oleksandr-kazimirov left a comment

Choose a reason for hiding this comment

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

well enough

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.

3 participants