On 19/06/2020 15:02, Christopher Schultz wrote:
> All,
> 
> I'd like to refactor a bit and move BaseEncryptionManager and
> associated code out of the EncryptInterceptor class. Where would be a
> good place to put it?
> 
> Some potential candidates:
> 
> org/apache/catalina/util
> org/apache/catalina/security
> org/apache/tomcat/util
> org/apache/tomcat/util/security
> 
> Or perhaps a new package.
> 
> I'm a little unclear when to decide between org.apache.catalina and
> org.apache.tomcat in general.

Packages under org.apache.catalina are only visible to other packages
under org.apache.catalina.

Packages under org.apache.tomcat.util are visible to most/all Tomcat
packages.

So, it depends which code is going to be using it or if you think other
components might need it over time.

It is actually a little tricker than that. I usually recommend looking
at the POM files to see what the dependencies are meant to be.

> I think it will only be the following classes that are moved, so maybe
> a new package isn't appropriate:
> 
> BaseEncryptionManager
> GCMEncryptionManager
> 
> I may decide to create an interface for EncryptionManager, but I don't
> see it as strictly necessary at this point.

Tribes is a special case. It currently only depends on JULI. It has
copies of several utility classes to keep that dependency to a minimum.

Those two classes are so small, I'd be tempted to go with the copying
option.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to