Ignore WeakerAccess inspection @Transactional annotated fields

Answered

i'm using guice's @Transactional annotations, and even though my transactional methods should really be private, i'm forced (as described in the documentation) to use a higher access modifier.

this makes the IDEA inspection "WeakerAccess" find and alert me on those methods.

i'm looking for a way to disable this inspection by annotation or create an alternative better inspection for this issue.

 

I tried this - 

@Transactional
@SuppressWarnings("WeakerAccess")
public @interface TransactionalA {
}

didn't work.

 

1
7 comments

Hello,

What IDE version do you use? It seems to work fine on my machine.

0
Avatar
Permanently deleted user

thanks Yaroslav!

i'm using 2017.2.6.

you mean annotating a method with TransactionalA suppresses it's WeakerAccess warnings?

 

0

I don't even get inspection alert. Could you please check the issue with the latest stable version?

0

Hi,

I'm using 2018.3 and having the same problem here.

org.springframework.transaction.annotation.Transactional does not make weaker access warning decay.

Thanks in advance,

Marek

0

Hello Marek,

Could you please share sample project example for investigation?

0

@Yaroslav, probably you'd be surprised, but NDA.

0

Marek,

Is it possible to reproduce the issue with new sample project?

0

Please sign in to leave a comment.