Accessor call that can be replaced with property access syntax
Reports Java get and set method calls that can be replaced with the Kotlin synthetic properties.
Use property access syntax quick-fix can be used to amend the code automatically.
Example:
Locating this inspection
- By ID
Can be used to locate inspection in e.g. Qodana configuration files, where you can quickly enable or disable it, or adjust its settings.
UsePropertyAccessSyntax- Via Settings dialog
Path to the inspection settings via IntelliJ Platform IDE Settings dialog, when you need to adjust inspection settings directly from your IDE.
Inspection options
Here you can find the description of settings available for the Accessor call that can be replaced with property access syntax inspection, and the reference of their default values.
- Report non-trivial accessors
Default value:
Not selected- Excluded methods
Default value:
[java.net.Socket.getInputStream, java.net.Socket.getOutputStream, java.net.URLConnection.getInputStream, java.net.URLConnection.getOutputStream, java.util.concurrent.atomic.AtomicInteger.getAndIncrement, java.util.concurrent.atomic.AtomicInteger.getAndDecrement, java.util.concurrent.atomic.AtomicInteger.getAcquire, java.util.concurrent.atomic.AtomicInteger.getOpaque, java.util.concurrent.atomic.AtomicInteger.getPlain, java.util.concurrent.atomic.AtomicLong.getAndIncrement, java.util.concurrent.atomic.AtomicLong.getAndDecrement, java.util.concurrent.atomic.AtomicLong.getAcquire, java.util.concurrent.atomic.AtomicLong.getOpaque, java.util.concurrent.atomic.AtomicLong.getPlain, java.nio.ByteBuffer.getChar, java.nio.ByteBuffer.getDouble, java.nio.ByteBuffer.getFloat, java.nio.ByteBuffer.getInt, java.nio.ByteBuffer.getLong, java.nio.ByteBuffer.getShort]
Suppressing Inspection
You can suppress this inspection by placing the following comment marker before the code fragment where you no longer want messages from this inspection to appear:
More detailed instructions as well as other ways and options that you have can be found in the product documentation:
Inspection Details | |
|---|---|
By default bundled with: |