Skip to content

Commit

Permalink
yegor256#419 Fix for qulice
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrkot committed Nov 12, 2014
1 parent 13794b7 commit 935e7e7
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions src/main/java/com/thindeck/dynamo/DyTasks.java
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,13 @@ public Task add(final String command, final Map<String, String> args) {
return new DyTask(
this.region.table(DyTask.TBL)
.put(new Attributes()
.with(DyTask.ATTR_ID, UUID.randomUUID())
.with(DyTask.ATTR_REPO_URN, this.repo.name())
.with(DyTask.ATTR_COMM, command)
.with(toAttributes(args))
.with(DyTask.ATTR_ID, UUID.randomUUID())
.with(
DyTask.ATTR_REPO_URN,
this.repo.name()
)
.with(DyTask.ATTR_COMM, command)
.with(this.toAttributes(args))
)
);
} catch (final IOException ex) {
Expand All @@ -125,12 +128,12 @@ public Task add(final String command, final Map<String, String> args) {
/**
* Map to {@link com.jcabi.dynamo.Attributes}.
* @param map Map
* @return {@link com.jcabi.dynamo.Attributes}
* @return Attributes
*/
private Attributes toAttributes(final Map<String, String> map) {
Attributes attributes = new Attributes();
for (Map.Entry<String, String> e : map.entrySet()) {
attributes.with(e.getKey(), e.getValue());
final Attributes attributes = new Attributes();
for (final Map.Entry<String, String> entry : map.entrySet()) {
attributes.with(entry.getKey(), entry.getValue());
}
return attributes;
}
Expand Down

0 comments on commit 935e7e7

Please sign in to comment.