Skip to content

Conversation

@GiBg1aN
Copy link
Contributor

@GiBg1aN GiBg1aN commented Jul 30, 2017

  • package ru.mystamps.web.model renamed to ru.mystamps.web.controller.dto
  • package ru.mystamps.web.validation.jsr303 renamed to ru.mystamps.web.support.beanvalidation

Addressed to #591

@php-coder
Copy link
Owner

@GiBg1aN Hi! Thank you for your contribution!

Could you split this into 2 commits (to have each renaming will be in the separate commit)? And also update the commits description to not mention the original issue (and we won't have spam comments in the issue from the temporary commits).

@php-coder
Copy link
Owner

Also don't forget to update here:

src/main/config/checkstyle-suppressions.xml:    <suppress checks="HideUtilityClassConstructor" files="ru.mystamps.web.model" />

@php-coder
Copy link
Owner

There are also translations for the validators that should be updated as well: see src/main/resources/ru/mystamps/i18n/ValidationMessages.properties and src/main/resources/ru/mystamps/i18n/ValidationMessages_ru.properties

@GiBg1aN
Copy link
Contributor Author

GiBg1aN commented Jul 30, 2017

@php-coder thank you for answering! I just splitted it in two commits and properly distributed the 3 missing files to them.

@mystamps-bot
Copy link

mystamps-bot commented Jul 30, 2017

2 Warnings
⚠️ danger check: pull request contains 2 commits while most of the cases it should have only one.
If it’s not a special case you should squash the commits into single one.
You can read how to do it here: https://davidwalsh.name/squash-commits-git
But be careful because it can destroy all your changes!
⚠️ danger check: branch rename does not comply with our best practices. Branch name should use the following scheme: ghXXX_meaningful-name where XXX is an issue number. Next time, please, use this scheme :)

Generated by 🚫 Danger

@@ -1,50 +1,50 @@
javax.validation.constraints.NotNull.message = Поле обязательно для заполнения
Copy link
Owner

Choose a reason for hiding this comment

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

Could you modify this file without fully decoding it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I'm gonna try the replacement with another editor

Copy link
Owner

Choose a reason for hiding this comment

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

If you have sed then you can do this with the command: sed -i 's|validation\.jsr303|support.beanvalidation|' src/main/resources/ru/mystamps/i18n/ValidationMessages.properties

@php-coder
Copy link
Owner

@GiBg1aN Please, look at the errors from our bot and try to fix them.

@php-coder
Copy link
Owner

Couldn’t find pom.log. sortpom-maven-plugin result is unknown

This and other similar warnings just have been fixed in the commit 1094952 They will gone if you rebase your branch against the latest master. But it's not required.

@php-coder
Copy link
Owner

@GiBg1aN I see that you use your nickname as an author for the commits. Generally I advise to use a real name (but it's not required of course). So, consider updating the author value in the commits (git commit user.name "John Dow" && git commit --am --reset-author).

@php-coder php-coder changed the title Package refactoring, issue #591 Package refactoring Jul 30, 2017
@coveralls
Copy link

Coverage Status

Coverage remained the same at 75.7% when pulling 4c29efa on GiBg1aN:rename into 1094952 on php-coder:master.

public @interface ReleaseDateIsNotInFuture {
String message() default "{ru.mystamps.web.validation.jsr303.ReleaseDateIsNotInFuture.message}";
String message() default "{ru.mystamps.web.support.beanvalidation"
+ ".ReleaseDateIsNotInFuture.message}";
Copy link
Owner

@php-coder php-coder Jul 30, 2017

Choose a reason for hiding this comment

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

Why do we need this? If you were trying to fix CheckStyle complains about a long line, then in this particular case, it's better to ignore them with a special comment:

// CheckStyle: ignore LineLength for next 1 line

import ru.mystamps.web.controller.editor.ReplaceRepeatingSpacesEditor;
import ru.mystamps.web.dao.dto.LinkEntityDto;
import ru.mystamps.web.dao.dto.SeriesInfoDto;
import ru.mystamps.web.controller.dto.AddCategoryForm;
Copy link
Owner

Choose a reason for hiding this comment

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

The changes like that is irrelevant to the validation package renaming and should be part of the previous commit instead. I'm trying to have the commits that are "atomic" and modifies only one particular thing at time.

Could you move such changes from this commit to the previous (it requires some diff/patch/git rebase magic)?

public @interface ExistingActivationKey {
String message() default "{ru.mystamps.web.validation.jsr303.ExistingActivationKey.message}";
String message() default "{ru.mystamps.web.support.beanvalidation"
+ ".ExistingActivationKey.message}";
Copy link
Owner

Choose a reason for hiding this comment

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

This should be a single line.

@php-coder
Copy link
Owner

Thank you again!
Overall it looks good but some changes are required to make it mergeable.

@php-coder
Copy link
Owner

php-coder commented Jul 30, 2017

Could you also remove these lines as they not needed anymore:

<Match>
<!--
Our DTO classes expose it's internal representation.
Most of the time because they're using Date class and
storing data in byte[].
-->
<Class name="~.*\.model\..*" />
<Bug pattern="EI_EXPOSE_REP,EI_EXPOSE_REP2" />
</Match>
(they should go to the appropriate commit).

GiBg1aN added 2 commits July 31, 2017 09:18
package ru.mystamps.web.model renamed to ru.mystamps.web.controller.dto
package ru.mystamps.web.validation.jsr303 renamed to ru.mystamps.web.support.beanvalidation
@coveralls
Copy link

Coverage Status

Coverage remained the same at 75.7% when pulling bba4aef on GiBg1aN:rename into 62e540d on php-coder:master.

@GiBg1aN
Copy link
Contributor Author

GiBg1aN commented Jul 31, 2017

  • merged master commits
  • file editing grouped in the proper commit
  • removed unused code from findbugs-filter.xml
  • longline warnings suppressed

I hope that now everything is ok

import ru.mystamps.web.validation.jsr303.FieldsMatch;
import ru.mystamps.web.validation.jsr303.FieldsMismatch;
import ru.mystamps.web.validation.jsr303.UniqueLogin;

Copy link
Owner

Choose a reason for hiding this comment

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

I removed this extra blank line in eede8a2 commit.

@Documented
public @interface ExistingActivationKey {
String message() default "{ru.mystamps.web.validation.jsr303.ExistingActivationKey.message}";
// CheckStyle: ignore LineLength for next 1 line
Copy link
Owner

Choose a reason for hiding this comment

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

I fixed indentation in 348d637 commit.

@php-coder php-coder mentioned this pull request Jul 31, 2017
@php-coder
Copy link
Owner

Merged in e19367e and ba82718 commits.

@GiBg1aN
Copy link
Contributor Author

GiBg1aN commented Jul 31, 2017

Thank you for your time and for your tips, this was my first PR

@php-coder
Copy link
Owner

@GiBg1aN I've just added you to our contributor list: https://github.com/php-coder/mystamps/wiki/team-members

Do you want to do more fixes/improvements and join our team?

@GiBg1aN
Copy link
Contributor Author

GiBg1aN commented Jul 31, 2017

Thank you for your proposal, maybe in the future ;)

Can I delete this branch? I don't know why but it says that there are unmerged commits

@php-coder
Copy link
Owner

php-coder commented Jul 31, 2017

Thank you for your proposal, maybe in the future ;)

Ok

Can I delete this branch?

Yes, sure.

I don't know why but it says that there are unmerged commits

Yes, that's because I didn't merge the commits but cherry-picked them (and also modified their descriptions).

@GiBg1aN
Copy link
Contributor Author

GiBg1aN commented Jul 31, 2017

Thanky you another time, maybe in the next days I'll take a look at your other issues and try to fix them.

@GiBg1aN GiBg1aN deleted the rename branch July 31, 2017 10:04
@php-coder
Copy link
Owner

@GiBg1aN BTW how did you find this project?

@GiBg1aN
Copy link
Contributor Author

GiBg1aN commented Aug 5, 2017

I was looking for Java repos that had an issue labeled as "trivial"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants