intellij-community icon indicating copy to clipboard operation
intellij-community copied to clipboard

Add ByteBuffer's get*() methods to NotPropertiesService

Open stachenov opened this issue 2 years ago • 3 comments

I’m using ByteBuffer a lot and it’s a bit annoying when IDEA asks me to use property access syntax instead, which makes no sense, so I add ByteBuffer's methods to the list of exceptions. Figured it’s not a bad idea to include it in the standard list of exceptions as ByteBuffer is a standard library class.

stachenov avatar Jun 17 '22 16:06 stachenov

Sorry, for the delay.

Could you please add tests for the change ?

vladimirdolzhenko avatar Jul 29 '22 08:07 vladimirdolzhenko

it could be smth similar to https://github.com/JetBrains/intellij-community/blob/master/plugins/kotlin/idea/tests/testData/intentions/usePropertyAccessSyntax/suppressedByNotPropertyList.kt

do not forget to regenerate tests after adding new test data files.

vladimirdolzhenko avatar Jul 29 '22 08:07 vladimirdolzhenko

Added one test, similar to how the other tests were done. However, I haven’t exactly been able to figure them out, as they seem to be all concentrated around atomic types despite test names. For example, suppressedByAtomicIntegerList tests AtomicInteger.getPlain() while suppressedByNotPropertyList tests AtomicInteger.getAndIncrement().

But it works and makes sense to me at least.

stachenov avatar Jul 29 '22 20:07 stachenov

Sorry for a long delay, LGTM

Thank you for the contribution. Will be merged soon

vladimirdolzhenko avatar Nov 09 '22 08:11 vladimirdolzhenko