phax / en16931-cii2ubl

Converter for EN16931 invoices from CII to UBL
Apache License 2.0
20 stars 6 forks source link

java exception in version 2.2.3 #31

Closed msccip closed 3 months ago

msccip commented 3 months ago

With the new version 2.2.3 I get the following error with all tested invoices:

java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0 at java.base/jdk.internal.util.Preconditions.outOfBounds(Unknown Source) at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Unknown Source) at java.base/jdk.internal.util.Preconditions.checkIndex(Unknown Source) at java.base/java.util.Objects.checkIndex(Unknown Source) at java.base/java.util.ArrayList.get(Unknown Source) at un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._100.TradePriceType.getAppliedTradeAllowanceChargeAtIndex(TradePriceType.java:842) at com.helger.en16931.cii2ubl.CIIToUBL21Converter.convertToInvoice(CIIToUBL21Converter.java:1391) at com.helger.en16931.cii2ubl.CIIToUBL21Converter.convertCIItoUBL(CIIToUBL21Converter.java:2317) at com.helger.en16931.cii2ubl.AbstractCIIToUBLConverter.convertCIItoUBL(AbstractCIIToUBLConverter.java:788) at com.helger.en16931.cii2ubl.cli.CIIToUBLConverter.call(CIIToUBLConverter.java:297) at com.helger.en16931.cii2ubl.cli.CIIToUBLConverter.call(CIIToUBLConverter.java:67) at picocli.CommandLine.executeUserObject(CommandLine.java:2041) at picocli.CommandLine.access$1500(CommandLine.java:148) at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461) at picocli.CommandLine$RunLast.handle(CommandLine.java:2453) at picocli.CommandLine$RunLast.handle(CommandLine.java:2415) at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273) at picocli.CommandLine$RunLast.execute(CommandLine.java:2417) at picocli.CommandLine.execute(CommandLine.java:2170) at com.helger.en16931.cii2ubl.cli.CIIToUBLConverter.main(CIIToUBLConverter.java:381)

phax commented 3 months ago

Thanks - good catch. That indeed is a regression from 2.2.3. Building 2.2.4 immediately.