https://bz.apache.org/bugzilla/show_bug.cgi?id=60184
Greg Woolsey <gwool...@apache.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gwool...@apache.org --- Comment #8 from Greg Woolsey <gwool...@apache.org> --- I just now found this issue, wish I'd seen it earlier. I see the problem now. XSSFFont can be created without a family. This is what happens when calling XSSFWorkbook.createFont(). This is fine per the OOXML XSD. However, XSSFFont.getFamily() creates an empty family element if none exist. This is invalid, as the family element is required to have a val attribute. Further, it's really bad practice for things that are defined as property getters to have side effects like this. Since the API's been out there a while, we should maintain backward compatibility, but I don't like it too much. I think in the missing element case it should just return 0, the index for NOT_APPLICABLE, which appears to coincide with "auto" in the spec, but NOT create a family element. Better would be a method that returns an instance of the enum or null if not defined, or NOT_APPLICABLE if null is undesirable. For now though, I'll just update to not create the empty element if missing. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org