You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2022/12/13 01:43:47 UTC

[GitHub] [netbeans] errael opened a new issue, #5101: "unbalanced read/write hint unexpected

errael opened a new issue, #5101:
URL: https://github.com/apache/netbeans/issues/5101

   ### Apache NetBeans version
   
   Apache NetBeans 16
   
   ### What happened
   
   `vmap` in the following record declaration gets `The collection is never added to`. It might be related to #4545, but it might be different. If the `unbalanced read/write with collections` hint is set to `current line` then the warning is not seen.
   
   ```
   package play.warnings;
   
   import java.util.Map;
   
   public class Warnings {
       public record DiscsTables(Integer discs, Map<Object,Object> vmap) {};
   
       public Object foo(DiscsTables dt) {
           return dt.vmap.get("k1");
       }
   }
   ```
   
   ### How to reproduce
   
   _No response_
   
   ### Did this work correctly in an earlier version?
   
   No / Don't know
   
   ### Operating System
   
   Linux harmony 5.19.16-76051916-generic #202210150742~1666053244~22.04~cf07008 SMP PREEMPT_DYNAMIC Tue O x86_64 x86_64 x86_64 GNU/Linux
   
   ### JDK
   
   openjdk version "19" 2022-09-20 OpenJDK Runtime Environment (build 19+36-2238) OpenJDK 64-Bit Server VM (build 19+36-2238, mixed mode, sharing)
   
   ### Apache NetBeans packaging
   
   Apache NetBeans binary zip
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request?
   
   No
   
   ### Code of Conduct
   
   Yes


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists