Description
The JBCT Maven plugin fails to parse a valid Java file containing a 2D array declaration.
Environment
- jbct-maven-plugin version: 0.4.5
- Java version: 21
- Maven version: 3.9.x
Error Message
[ERROR] Error formatting MinuteAggregator.java: Parse error at MinuteAggregator.java:156:57 - unexpected input
Minimal Reproduction
The offending line:
float[][] result = new float[windowMinutes][];
Position 57 on line 156 points to the [][] portion of the 2D array type declaration.
Full Context
public float[][] toTTMInput(int windowMinutes) {
lock.readLock()
.lock();
try {
var recentAggregates = recent(windowMinutes);
float[][] result = new float[windowMinutes][]; // <-- Parse error here
// Initialize with zeros
for (int i = 0; i < windowMinutes; i++) {
result[i] = new float[MinuteAggregate.featureNames().length];
}
// ...
}
}
Expected Behavior
The formatter should handle 2D array declarations without parse errors.
Workaround
None found - the file cannot be formatted with the plugin.
Description
The JBCT Maven plugin fails to parse a valid Java file containing a 2D array declaration.
Environment
Error Message
Minimal Reproduction
The offending line:
Position 57 on line 156 points to the
[][]portion of the 2D array type declaration.Full Context
Expected Behavior
The formatter should handle 2D array declarations without parse errors.
Workaround
None found - the file cannot be formatted with the plugin.