[jira] [Updated] (NETBEANS-6241) SwitchToRuleSwitch Hint not working with Pattern Matching Switch

2021-11-28 Thread Sandeep Mishra (Jira)


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

Sandeep Mishra updated NETBEANS-6241:
-
Description: 
With the given code :

static void testSwitchStatements(Integer i) {
        switch (i) {
            case 1, 2 : System.out.println("1"); break;
            case 3 : System.out.println("3"); break;
            case Integer i : System.out.println(i);
                     break;
        } 
    }

 

 

we get the hint to covert to rule switch. The output of the hint does not 
convert the binding pattern to rule switch case.

static void testSwitchStatements(Integer i) {
        switch (i) {
            case 1, 2 -> System.out.println("1");
            case 3 -> System.out.println("3");
            case Integer i : System.out.println(i);
                     break;
        } 
    }

 

  was:
With the given code :

static void testSwitchStatements(Integer i) {
        switch (i) {
            case 1, 2 : System.out.println("1"); break;
            case 3 : System.out.println("3"); break;
            case Integer i : System.out.println(i);
                     break;
        } 
    }

 

we get the hint to covert to rule switch. The output of the hint does not 
convert the binding pattern to rule switch case.

static void testSwitchStatements(Integer i) {
        switch (i) {
            case 1, 2 -> System.out.println("1");
            case 3 -> System.out.println("3");
            case Integer i : System.out.println(i);
                     break;
        } 
    }


> SwitchToRuleSwitch Hint not working with Pattern Matching Switch 
> -
>
> Key: NETBEANS-6241
> URL: https://issues.apache.org/jira/browse/NETBEANS-6241
> Project: NetBeans
>  Issue Type: Bug
>  Components: java - Hints
>Affects Versions: 12.5
>Reporter: Sandeep Mishra
>Assignee: Sandeep Mishra
>Priority: Major
>
> With the given code :
> static void testSwitchStatements(Integer i) {
>         switch (i) {
>             case 1, 2 : System.out.println("1"); break;
>             case 3 : System.out.println("3"); break;
>             case Integer i : System.out.println(i);
>                      break;
>         } 
>     }
>  
>  
> we get the hint to covert to rule switch. The output of the hint does not 
> convert the binding pattern to rule switch case.
> static void testSwitchStatements(Integer i) {
>         switch (i) {
>             case 1, 2 -> System.out.println("1");
>             case 3 -> System.out.println("3");
>             case Integer i : System.out.println(i);
>                      break;
>         } 
>     }
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
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



[jira] [Updated] (NETBEANS-6241) SwitchToRuleSwitch Hint not working with Pattern Matching Switch

2021-11-28 Thread ASF GitHub Bot (Jira)


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

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

> SwitchToRuleSwitch Hint not working with Pattern Matching Switch 
> -
>
> Key: NETBEANS-6241
> URL: https://issues.apache.org/jira/browse/NETBEANS-6241
> Project: NetBeans
>  Issue Type: Bug
>  Components: java - Hints
>Affects Versions: 12.5
>Reporter: Sandeep Mishra
>Assignee: Sandeep Mishra
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> With the given code :
> static void testSwitchStatements(Integer i) {
>         switch (i) {
>             case 1, 2 : System.out.println("1"); break;
>             case 3 : System.out.println("3"); break;
>             case Integer i : System.out.println(i);
>                      break;
>         } 
>     }
>  
>  
> we get the hint to covert to rule switch. The output of the hint does not 
> convert the binding pattern to rule switch case.
> static void testSwitchStatements(Integer i) {
>         switch (i) {
>             case 1, 2 -> System.out.println("1");
>             case 3 -> System.out.println("3");
>             case Integer i : System.out.println(i);
>                      break;
>         } 
>     }
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
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



[jira] [Updated] (NETBEANS-6241) SwitchToRuleSwitch Hint not working with Pattern Matching Switch

2021-11-28 Thread Sandeep Mishra (Jira)


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

Sandeep Mishra updated NETBEANS-6241:
-
Description: 
With the given code :


{code:java}
static void testSwitchStatements(Integer i) {
        switch (i) {
            case 1, 2 : System.out.println("1"); break;
            case 3 : System.out.println("3"); break;
            case Integer i : System.out.println(i);
                     break;
        } 
    }
{code}


 

 

we get the hint to covert to rule switch. The output of the hint does not 
convert the binding pattern to rule switch case.


{code:java}
static void testSwitchStatements(Integer i) {
        switch (i) {
            case 1, 2 -> System.out.println("1");
            case 3 -> System.out.println("3");
            case Integer i : System.out.println(i);
                     break;
        } 
    }

{code}

 

  was:
With the given code :

static void testSwitchStatements(Integer i) {
        switch (i) {
            case 1, 2 : System.out.println("1"); break;
            case 3 : System.out.println("3"); break;
            case Integer i : System.out.println(i);
                     break;
        } 
    }

 

 

we get the hint to covert to rule switch. The output of the hint does not 
convert the binding pattern to rule switch case.

static void testSwitchStatements(Integer i) {
        switch (i) {
            case 1, 2 -> System.out.println("1");
            case 3 -> System.out.println("3");
            case Integer i : System.out.println(i);
                     break;
        } 
    }

 


> SwitchToRuleSwitch Hint not working with Pattern Matching Switch 
> -
>
> Key: NETBEANS-6241
> URL: https://issues.apache.org/jira/browse/NETBEANS-6241
> Project: NetBeans
>  Issue Type: Bug
>  Components: java - Hints
>Affects Versions: 12.5
>Reporter: Sandeep Mishra
>Assignee: Sandeep Mishra
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> With the given code :
> {code:java}
> static void testSwitchStatements(Integer i) {
>         switch (i) {
>             case 1, 2 : System.out.println("1"); break;
>             case 3 : System.out.println("3"); break;
>             case Integer i : System.out.println(i);
>                      break;
>         } 
>     }
> {code}
>  
>  
> we get the hint to covert to rule switch. The output of the hint does not 
> convert the binding pattern to rule switch case.
> {code:java}
> static void testSwitchStatements(Integer i) {
>         switch (i) {
>             case 1, 2 -> System.out.println("1");
>             case 3 -> System.out.println("3");
>             case Integer i : System.out.println(i);
>                      break;
>         } 
>     }
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
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



[jira] [Updated] (NETBEANS-6241) SwitchToRuleSwitch Hint not working with Pattern Matching Switch

2021-11-29 Thread Sandeep Mishra (Jira)


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

Sandeep Mishra updated NETBEANS-6241:
-
Description: 
With the given code :
{code:java}
static void testSwitchStatements(Integer i) {
        switch (i) {
            case 1, 2 : System.out.println("1"); break;
            case 3 : System.out.println("3"); break;
            case Integer i : System.out.println(i);
                     break;
        } 
    }
{code}
 

 

we get the hint to covert to rule switch. The output of the hint does not 
convert the binding pattern to rule switch case.
{code:java}
static void testSwitchStatements(Integer i) {
        switch (i) {
            case 1, 2 -> System.out.println("1");
            case 3 -> System.out.println("3");
            case Integer i : System.out.println(i);
                     break;
        } 
    }

{code}
 

When running the hint on a switch expression :
{code:java}
switch (p) {
    case (Integer i  && (i > 10)):
         return (String) o1;
    default :
         return (String) o2;
}{code}
The output is multiple default statements.
{code:java}
return (String) (switch (p) {
            default -> o1;
            default -> o2;
}); {code}

  was:
With the given code :


{code:java}
static void testSwitchStatements(Integer i) {
        switch (i) {
            case 1, 2 : System.out.println("1"); break;
            case 3 : System.out.println("3"); break;
            case Integer i : System.out.println(i);
                     break;
        } 
    }
{code}


 

 

we get the hint to covert to rule switch. The output of the hint does not 
convert the binding pattern to rule switch case.


{code:java}
static void testSwitchStatements(Integer i) {
        switch (i) {
            case 1, 2 -> System.out.println("1");
            case 3 -> System.out.println("3");
            case Integer i : System.out.println(i);
                     break;
        } 
    }

{code}

 


> SwitchToRuleSwitch Hint not working with Pattern Matching Switch 
> -
>
> Key: NETBEANS-6241
> URL: https://issues.apache.org/jira/browse/NETBEANS-6241
> Project: NetBeans
>  Issue Type: Bug
>  Components: java - Hints
>Affects Versions: 12.5
>Reporter: Sandeep Mishra
>Assignee: Sandeep Mishra
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> With the given code :
> {code:java}
> static void testSwitchStatements(Integer i) {
>         switch (i) {
>             case 1, 2 : System.out.println("1"); break;
>             case 3 : System.out.println("3"); break;
>             case Integer i : System.out.println(i);
>                      break;
>         } 
>     }
> {code}
>  
>  
> we get the hint to covert to rule switch. The output of the hint does not 
> convert the binding pattern to rule switch case.
> {code:java}
> static void testSwitchStatements(Integer i) {
>         switch (i) {
>             case 1, 2 -> System.out.println("1");
>             case 3 -> System.out.println("3");
>             case Integer i : System.out.println(i);
>                      break;
>         } 
>     }
> {code}
>  
> When running the hint on a switch expression :
> {code:java}
> switch (p) {
>     case (Integer i  && (i > 10)):
>          return (String) o1;
>     default :
>          return (String) o2;
> }{code}
> The output is multiple default statements.
> {code:java}
> return (String) (switch (p) {
>             default -> o1;
>             default -> o2;
> }); {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
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



[jira] [Updated] (NETBEANS-6241) SwitchToRuleSwitch Hint not working with Pattern Matching Switch

2021-11-29 Thread Sandeep Mishra (Jira)


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

Sandeep Mishra updated NETBEANS-6241:
-
Description: 
With the given code :
{code:java}
static void testSwitchStatements(Integer i) {
        switch (i) {
            case 1, 2 : System.out.println("1"); break;
            case 3 : System.out.println("3"); break;
            case Integer i : System.out.println(i);
                     break;
        } 
    }
{code}
We get the hint to covert to rule switch. The output of the hint does not 
convert the binding pattern to rule switch case.
{code:java}
static void testSwitchStatements(Integer i) {
        switch (i) {
            case 1, 2 -> System.out.println("1");
            case 3 -> System.out.println("3");
            case Integer i : System.out.println(i);
                     break;
        } 
    }

{code}
 

When running the hint on a switch expression :
{code:java}
switch (p) {
    case (Integer i  && (i > 10)):
         return (String) o1;
    default :
         return (String) o2;
}{code}
The output is multiple default statements.
{code:java}
return (String) (switch (p) {
            default -> o1;
            default -> o2;
}); {code}

  was:
With the given code :
{code:java}
static void testSwitchStatements(Integer i) {
        switch (i) {
            case 1, 2 : System.out.println("1"); break;
            case 3 : System.out.println("3"); break;
            case Integer i : System.out.println(i);
                     break;
        } 
    }
{code}
 

 

we get the hint to covert to rule switch. The output of the hint does not 
convert the binding pattern to rule switch case.
{code:java}
static void testSwitchStatements(Integer i) {
        switch (i) {
            case 1, 2 -> System.out.println("1");
            case 3 -> System.out.println("3");
            case Integer i : System.out.println(i);
                     break;
        } 
    }

{code}
 

When running the hint on a switch expression :
{code:java}
switch (p) {
    case (Integer i  && (i > 10)):
         return (String) o1;
    default :
         return (String) o2;
}{code}
The output is multiple default statements.
{code:java}
return (String) (switch (p) {
            default -> o1;
            default -> o2;
}); {code}


> SwitchToRuleSwitch Hint not working with Pattern Matching Switch 
> -
>
> Key: NETBEANS-6241
> URL: https://issues.apache.org/jira/browse/NETBEANS-6241
> Project: NetBeans
>  Issue Type: Bug
>  Components: java - Hints
>Affects Versions: 12.5
>Reporter: Sandeep Mishra
>Assignee: Sandeep Mishra
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> With the given code :
> {code:java}
> static void testSwitchStatements(Integer i) {
>         switch (i) {
>             case 1, 2 : System.out.println("1"); break;
>             case 3 : System.out.println("3"); break;
>             case Integer i : System.out.println(i);
>                      break;
>         } 
>     }
> {code}
> We get the hint to covert to rule switch. The output of the hint does not 
> convert the binding pattern to rule switch case.
> {code:java}
> static void testSwitchStatements(Integer i) {
>         switch (i) {
>             case 1, 2 -> System.out.println("1");
>             case 3 -> System.out.println("3");
>             case Integer i : System.out.println(i);
>                      break;
>         } 
>     }
> {code}
>  
> When running the hint on a switch expression :
> {code:java}
> switch (p) {
>     case (Integer i  && (i > 10)):
>          return (String) o1;
>     default :
>          return (String) o2;
> }{code}
> The output is multiple default statements.
> {code:java}
> return (String) (switch (p) {
>             default -> o1;
>             default -> o2;
> }); {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
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