Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Arch test failing STANDARD_STREAMS

I have app which folowing by archunit rules and I get:

NO_CLASSES_SHOULD_ACCESS_STANDARD_STREAMS

failed rule - it's mean I can't use standard Java I/O Streams. But what I can use instead?

How I can avoid this architecture rule with another Java methods instead standard streams? Because My arch rules are failing

like image 680
Maiky Avatar asked Dec 05 '25 06:12

Maiky


1 Answers

This Oracle blog entry says:

The Library API also contains the GeneralCodingRules class, which includes predefined and self-describing static coding rules that are common in many Java projects, for example:

NO_CLASSES_SHOULD_ACCESS_STANDARD_STREAMS (that is, the System.out, System.err, and printStackTrace methods: use a logging library instead)

So I think you need remove all println System.out.println()

like image 62
dawis11 Avatar answered Dec 07 '25 20:12

dawis11



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!