[ 
https://issues.apache.org/jira/browse/NETBEANS-5832?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated NETBEANS-5832:
-------------------------------------
    Labels: pull-request-available  (was: )

> Static block not compiled
> -------------------------
>
>                 Key: NETBEANS-5832
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-5832
>             Project: NetBeans
>          Issue Type: Bug
>          Components: java - Compiler
>    Affects Versions: 12.4
>         Environment: *Product Version:* Apache NetBeans IDE 12.4
> *Java:* 11.0.2; Java HotSpot(TM) 64-Bit Server VM 11.0.2+9-LTS
> *Runtime:* Java(TM) SE Runtime Environment 11.0.2+9-LTS
> *System:* Linux version 5.8.0-59-generic running on amd64; UTF-8; fr_FR (nb)
>            Reporter: Florent Lioult
>            Assignee: Florent Lioult
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> 1. Create a Maven project with just this simple class:
>  
> {code:java}
> public class Truc {
>  
>     private static Integer n;
>     static {
>        n = 123;
>     }
>     public static void main(String[] args) {
>         System.out.println("n is " + n);
>     }
>  
> }{code}
>  
> 2. Execute it with _Run File_ or _Run Project_.
> -> The program outputs "n is null".
> 3. Execute it with _Clean and Build Project_.
> -> The program outputs "n is 123".
> In fact, each time the source is changed, running it with _Run File_ or _Run 
> Project_ will not compile the static blocks and will completely skip it (ie. 
> _n_ will be back to _null_).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

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

Reply via email to