Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Hi Jörg-Michael,
We found something:
CLASS zcl_test DEFINITION
public
abstract
create public .
PUBLIC SECTION.
methods REFRESH_RESULT
final
for event RESET_RESULTS of ZCL_RUCKSACK_FORMULA_CHECK .
ENDCLASS.
CLASS zcl_test IMPLEMENTATION.
METHOD refresh_result.
ENDMETHOD.
ENDCLASS.java.lang.IllegalArgumentException: Cell at this index was already set!
at com.sap.adt.abapcleaner.rulehelpers.AlignLine.setCell(AlignLine.java:50)
at com.sap.adt.abapcleaner.rulehelpers.AlignLine.setCell(AlignLine.java:41)
at com.sap.adt.abapcleaner.rules.alignment.AlignMethodsDeclarationRule.addOptionalKeywords(AlignMethodsDeclarationRule.java:331)
at com.sap.adt.abapcleaner.rules.alignment.AlignMethodsDeclarationRule.executeOn(AlignMethodsDeclarationRule.java:190)
at com.sap.adt.abapcleaner.rules.alignment.AlignDeclarationSectionRuleBase.executeOn(AlignDeclarationSectionRuleBase.java:104)
at com.sap.adt.abapcleaner.rulebase.Rule.executeIfAllowedOn(Rule.java:442)
at com.sap.adt.abapcleaner.rulebase.Profile.executeRules(Profile.java:256)
at com.sap.adt.abapcleaner.programbase.Task.run(Task.java:230)
at com.sap.adt.abapcleaner.programbase.Task.run(Task.java:130)
at com.sap.adt.abapcleaner.programbase.Task.run(Task.java:126)
at com.sap.adt.abapcleaner.programbase.Job.runSingleCodeDocument(Job.java:112)
at com.sap.adt.abapcleaner.programbase.Job.run(Job.java:101)
at com.sap.adt.abapcleaner.gui.FrmMain.cleanAutomatically(FrmMain.java:302)
at com.sap.adt.abapcleaner.gui.FrmMain.cleanSingleSourceAutomatically(FrmMain.java:220)
at com.sap.adt.abapcleaner.gui.FrmMain.cleanAutomatically(FrmMain.java:191)
at com.sap.adt.abapcleaner.gui.FrmMain.main(FrmMain.java:161)
at com.sap.adt.abapcleaner.gui.eclipse.application.AbapCleanerApplication.start(AbapCleanerApplication.java:12)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:402)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
at org.eclipse.equinox.launcher.Main.run(Main.java:1467)
I am not able to determine the exact rule / reason, I hope you can?
Thanks!
PhiL
Reacted by ConjuringCoffee
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Activity
ConjuringCoffee commentedon Nov 4, 2024
It's the combination of
FINALandFOR EVENT. The rule "Align METHODS declarations" is likely the culprit.Tested with: https://github.com/endresshauser-infoserve/abap-cleaner-profile
jmgrassau commentedon Nov 9, 2024
Hi PhiL and ConjuringCoffee,
thanks a lot for reporting this bug! This syntax was indeed not yet considered by the rule "Align METHODS declarations". Should be more robust with the next release!
Kind regards,
Jörg-Michael
fix AlignMethodsDeclarationRule for FINAL with FOR EVENT (SAP#373)
fix AlignMethodsDeclarationRule for FINAL with FOR EVENT (#373)
jmgrassau commentedon Nov 11, 2024
Hi openPhiL,
thanks again for reporting this bug – this should now be fixed with version 1.20.1, which was just released!
Kind regards,
Jörg-Michael
ConjuringCoffee commentedon Nov 11, 2024
Thanks :)