Bug 63047 - Make POILogger subclassable
Summary: Make POILogger subclassable
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: POI Overall (show other bugs)
Version: 4.0.x-dev
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-31 12:01 UTC by PJ Fanning
Modified: 2018-12-31 12:15 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description PJ Fanning 2018-12-31 12:01:03 UTC
POILogger/POILogFactory has a mechanism to allow users override the default logger. One problem is that POILogger needs to be subclassed but the contructor is not public - so users have to create the subclass in the org.apache.poi.util package.
Comment 1 Andreas Beeker 2018-12-31 12:09:45 UTC
Sorry to hijack that issue - but just when I wanted to commit the code and open a ticket before/for it - you've created it already ...

I think the cleaner way is to use an interface instead of abstract class.

Anything else should be the same.

Applied via r1850040
Comment 2 PJ Fanning 2018-12-31 12:15:04 UTC
Strictly speaking the latest revision is a breaking API change. Users who may have created their own subclasses of POILogger will find that code will not compile with this change.

All that said, I think the intent is that the next release is 4.1.0 (as opposed to 4.0.2) - so it should be more acceptable to break APIs, particularly ones that are unlikely to affect many users.