Fix #389: ClassCastException: ZUGFeRDExporterFromA3 cannot be cast to ZUGFeRDExporterFromPDFA

This commit is contained in:
langfr
2024-06-01 13:53:41 +01:00
parent d0caf0d7b1
commit 8c16d4311c

View File

@@ -147,16 +147,16 @@ public class ZUGFeRDExporterFromPDFA implements IZUGFeRDExporter {
return getExporter().setCreator(creator); return getExporter().setCreator(creator);
} }
public ZUGFeRDExporterFromPDFA setProfile(Profile p) { public IZUGFeRDExporter setProfile(Profile p) {
return (ZUGFeRDExporterFromPDFA) getExporter().setProfile(p); return (IZUGFeRDExporter) getExporter().setProfile(p);
} }
public ZUGFeRDExporterFromPDFA setProfile(String profileName) { public IZUGFeRDExporter setProfile(String profileName) {
Profile p = Profiles.getByName(profileName); Profile p = Profiles.getByName(profileName);
if (p==null) { if (p==null) {
throw new RuntimeException("Profile not found."); throw new RuntimeException("Profile not found.");
} }
return (ZUGFeRDExporterFromPDFA) getExporter().setProfile(p); return (IZUGFeRDExporter) getExporter().setProfile(p);
} }
public IZUGFeRDExporter setConformanceLevel(PDFAConformanceLevel newLevel) { public IZUGFeRDExporter setConformanceLevel(PDFAConformanceLevel newLevel) {