Ah.. well it seems this is caused by an incomplete brace in code
that follows, but several lines away.  So I understand what NB is trying to
do, it is just unexpected in the immediate context.

Basically I had a large method that was in the process of being edited and
was missing its final closing brace.   I was adding a condition near the
beginning of the method and observed this happening.
I'm not sure if it is worth doing anything about, though it was irritating
until I realized why it was happening.

Cheers,

SCott

On Fri, Oct 28, 2022 at 12:00 PM Scott Palmer <[email protected]> wrote:

> I just noticed that there is an issue with NetBeans inserting an extra }
> character while editing Java code.
>
> If I type the following:
>
>   if (someCondition) {}
>
> Then I place the cursor between the braces { | } and hit enter, the result
> is:
>
>   if (someCondition) {
>     |
>   }}
>
> (Where | is the cursor location before and after)
>
> Note the extra closing brace.
>
> Scott
>
>

Reply via email to