-
-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels