nmatt opened a new issue, #9163:
URL: https://github.com/apache/netbeans/issues/9163
### Apache NetBeans version
Apache NetBeans 28
### What happened
Pressing Enter after a parameter in the parameter list of a nested record
class indents the next line incorrectly, as if the record class was one nesting
level higher than it actuall is.
### Language / Project Type / NetBeans Component
Java, Editor
### How to reproduce
Example:
```java
class Example
{
class Nested
{
private record ExampleRecord(
ProcessHandle processHandle, ThreadGroup threadGroup)
{
// ...
}
}
}
```
Pressing Enter after the comma results in:
```java
class Example
{
class Nested
{
private record ExampleRecord(
ProcessHandle processHandle,
ThreadGroup threadGroup)
{
// ...
}
}
}
```
Whereas the expected result would be:
```java
class Example
{
class Nested
{
record ExampleRecord(
ProcessHandle processHandle,
ThreadGroup threadGroup)
{
// ...
}
}
}
```
The `Nested` class is just to illustrate that the resulting indentation
level is exactly 1 level too high. The incorrect behavior also happens with one
nesting level less.
### Did this work correctly in an earlier version?
No / Don't know
### Operating System
Windows
### JDK
JDK 21
### Apache NetBeans packaging
Apache NetBeans binary zip
### Anything else
The generated indentation is correct when the record class is a top-level
class. It's only for nested record classes that the indentation level is wrong.
### Are you willing to submit a pull request?
No
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists