commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Grobmeier (JIRA)" <j...@apache.org>
Subject [jira] Commented: (COMPRESS-61) ArchiveStreamFactory could have static methods as well
Date Sat, 28 Mar 2009 12:47:50 GMT

    [ https://issues.apache.org/jira/browse/COMPRESS-61?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12693431#action_12693431
] 

Christian Grobmeier commented on COMPRESS-61:
---------------------------------------------

Creating an object and caring myself about caching factories (if i need it) also gives me
the chance to integrate the factory f.e. in Spring and use it with AOP features. This is not
possible with static methods since those cannot be defined in an interface. I could use those
features if I want to define inside the Spring XML which compression algorithm I want to use.

As a spring user, I would enjoy to have objects more than the static solution.

> ArchiveStreamFactory could have static methods as well
> ------------------------------------------------------
>
>                 Key: COMPRESS-61
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-61
>             Project: Commons Compress
>          Issue Type: Improvement
>            Reporter: Sebb
>
> ArchiveStreamFactory currently has to be instantiated in order to use it.
> The methods have to be instance methods in order for subclasses to override them, but
until that is done (will it ever be done?) it seems a bit unnecessary to create an instance
of the class.
> Perhaps there could be a private static instance of the class that could be used with
public static methods?
> The same considerations apply to the other factories.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message