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

Remove thread-unsafe context from the AbstractCheck class #4908

Closed
soon opened this Issue Aug 7, 2017 · 3 comments

Comments

@soon
Contributor

soon commented Aug 7, 2017

Now the AbstractCheck class contains some thread-unsafe context, therefore we cannot use the same check instance across multiple threads.

All thread-unsafe members should be rewritten so that they could be used from the separate threads:

  1. messages - it is updated via clearMessages and log methods.
  2. fileContents - it is updated via setFileContents and queried via getLine, getFileContents
@rnveach

This comment has been minimized.

Show comment
Hide comment
@rnveach

rnveach Aug 7, 2017

Member

@soon Please examine AbstractFileSet too to see if it is thread safe.

Member

rnveach commented Aug 7, 2017

@soon Please examine AbstractFileSet too to see if it is thread safe.

soon added a commit to soon/checkstyle that referenced this issue Aug 8, 2017

soon added a commit to soon/checkstyle that referenced this issue Aug 8, 2017

soon added a commit to soon/checkstyle that referenced this issue Aug 8, 2017

soon added a commit to soon/checkstyle that referenced this issue Aug 8, 2017

soon added a commit to soon/checkstyle that referenced this issue Aug 8, 2017

soon added a commit to soon/checkstyle that referenced this issue Aug 8, 2017

soon added a commit to soon/checkstyle that referenced this issue Aug 8, 2017

soon added a commit to soon/checkstyle that referenced this issue Aug 8, 2017

soon added a commit to soon/checkstyle that referenced this issue Aug 8, 2017

soon added a commit to soon/checkstyle that referenced this issue Aug 8, 2017

@soon

This comment has been minimized.

Show comment
Hide comment
@soon

soon Aug 9, 2017

Contributor

@soon Please examine AbstractFileSet too to see if it is thread safe.

@rnveach Created PR: #4918

Contributor

soon commented Aug 9, 2017

@soon Please examine AbstractFileSet too to see if it is thread safe.

@rnveach Created PR: #4918

@rnveach rnveach added the GSoC2017 label Aug 9, 2017

romani added a commit that referenced this issue Sep 5, 2017

@romani romani added the bug label Sep 5, 2017

@romani romani added this to the 8.3 milestone Sep 5, 2017

@romani romani changed the title from Remove thread-unsafe context from the `AbstractCheck` class to Remove thread-unsafe context from the AbstractCheck class Sep 5, 2017

@romani

This comment has been minimized.

Show comment
Hide comment
@romani

romani Sep 5, 2017

Member

fix is merged.

Member

romani commented Sep 5, 2017

fix is merged.

@romani romani closed this Sep 5, 2017

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