-
Notifications
You must be signed in to change notification settings - Fork 34
Gh756_SeriesImportDao_setSeriesIdAndChangeStatus_replace_arguments_by_dto_object #1006
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
Conversation
Generated by 🚫 Danger |
Codecov Report
@@ Coverage Diff @@
## master #1006 +/- ##
===========================================
+ Coverage 79.93% 80% +0.06%
- Complexity 488 489 +1
===========================================
Files 35 35
Lines 1465 1465
Branches 188 188
===========================================
+ Hits 1171 1172 +1
Misses 277 277
+ Partials 17 16 -1
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #1006 +/- ##
============================================
+ Coverage 79.93% 80.01% +0.08%
- Complexity 488 489 +1
============================================
Files 35 35
Lines 1465 1466 +1
Branches 188 188
============================================
+ Hits 1171 1173 +2
Misses 277 277
+ Partials 17 16 -1
Continue to review full report at Codecov.
|
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.
Thank you!
LGTM overall but I left a couple comments anyway.
@@ -97,26 +96,21 @@ public Integer add(ImportSeriesDbDto importRequest) { | |||
|
|||
// @todo #735 SeriesImportDao.setSeriesIdAndChangeStatus(): replace arguments by dto object |
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.
We need to remove this comment altogether.
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.
done
return true | ||
} | ||
} |
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.
Please, remove trailing spaces/tabs.
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.
done
SeriesImportRequestStatus.IMPORT_SUCCEEDED, | ||
{ Date updatedAt -> | ||
assert DateUtils.roughlyEqual(updatedAt, new Date()) | ||
{ UpdateImportRequestStatusDbDto request -> |
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.
Let's rename it to status
(for consistency with the tests for changeStatus()
).
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.
done
@@ -98,7 +97,6 @@ public Integer addSeries( | |||
AddSeriesSalesDto saleDto, | |||
Integer requestId, | |||
Integer userId) { | |||
|
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.
Please, don't change anything that isn't related to the issue. The commit should be focused only on a single change.
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.
it was reverted back . Sorry, it is my mad :(
@@ -25,7 +25,6 @@ | |||
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate; | |||
import org.springframework.jdbc.support.GeneratedKeyHolder; | |||
import org.springframework.jdbc.support.KeyHolder; | |||
|
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.
I'm surprised that checkstyle doesn't complain about this change... How about reverting it?
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.
I am surprised too .Because i remember that i had to change such order in previous PRs
SeriesImportRequestStatus.PARSING_SUCCEEDED, | ||
SeriesImportRequestStatus.IMPORT_SUCCEEDED, | ||
now | ||
new UpdateImportRequestStatusDbDto( |
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.
It's better to follow the same approach everywhere. See how we have done the same in the changeStatus()
:
UpdateImportRequestStatusDbDto status =
new UpdateImportRequestStatusDbDto(requestId, now, oldStatus, newStatus);
Let's do the same here.
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.
Done . I explicit created the status variable and added it to the method call.
Date updatedAt) { | ||
|
||
public void setSeriesIdAndChangeStatus(Integer seriesId, | ||
UpdateImportRequestStatusDbDto requestStatus) { |
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.
We don't format methods like that. See how the arguments wrapped in other places and follow the style.
Another option (if the line just a little long or you need to have everything in one like to improve readability) -- add a special comment and suppress checkstyle complains.
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.
Done. I used suppress annotation for "linelength" module
@@ -37,7 +37,6 @@ | |||
import ru.mystamps.web.feature.series.sale.SeriesSalesService; | |||
import ru.mystamps.web.support.spring.security.HasAuthority; | |||
import ru.mystamps.web.util.CatalogUtils; | |||
|
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.
Please, revert this change.
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.
done
… made and the refactoring for codestyle was made here either
fa8ecc3
to
4a08dd1
Compare
Merged in 86042dc commit. |
@KrivenkoAlexander Thank you for the contribution! 👍 |
Addressed to #756