3

My scenario: With Java 8 Stream API, developers have the possibility to process collection via Streams normal and parallel (using multiple threads). In a Java EE environment, this should be avoided → Is it discouraged using Java 8 parallel streams inside a Java EE container? Other sources:

The current consensus among Java™ EE engineers is that parallelization of bulk operations will revert to sequential processing in the EE container. http://coopsoft.com/ar/Calamity2Article.html

Will SonarQube provide a rule, or how could I setup a custom rule for that, to detect, warn or inform developers, that they shall not used parallel streams on a java ee application server, that runs under Java 8, hence code reviews are not always possible.

Community
  • 1
  • 1
cinhtau
  • 1,002
  • 8
  • 16

1 Answers1

1

It seems that there isn't such a rule available. And no custom rules (based on regexp or something else) could be configured via the user interface.

But you could write your own java plugin with a set of custom java rules. A simple example (by SonarSource) is available on github. It looks quite simple to provide your own rule. May be it worth it.

gontard
  • 28,720
  • 11
  • 94
  • 117