Skip to content

java exception occurred #373

Closed
Closed

Description

@openPhiL

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

Activity

  1. ConjuringCoffee commented on Nov 4, 2024

    @ConjuringCoffee
    Contributor

    It's the combination of FINAL and FOR EVENT. The rule "Align METHODS declarations" is likely the culprit.

    Tested with: https://github.com/endresshauser-infoserve/abap-cleaner-profile

  2. self-assigned this
    on Nov 9, 2024
  3. jmgrassau commented on Nov 9, 2024

    @jmgrassau
    Member

    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!

    image

    Kind regards,
    Jörg-Michael

  4. jmgrassau commented on Nov 11, 2024

    @jmgrassau
    Member

    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

  5. ConjuringCoffee commented on Nov 11, 2024

    @ConjuringCoffee
    Contributor

    Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions