ResolverUtil with GroovyClassLoader

Description

It would be nice if ResolverUtil could be used out of the box with GroovyClassLoader (or any other "strange" classloader that is able to load classes out of resources that are neither .class nor .jar files).

Currently, only one thing prevents that from happening: ResolverUtil is hardcoded to skip resources not ending in .class. We ended up extending ResolverUtil to lift that limitation; see the attached class.

Our ResolverUtil also fixes another minor issue: while the ResolverUtil in Stripes has a setClassLoader method, it is not very useful, since the VFS does not use the same classloader (being a singleton, it relies on the thread's context classloader). So you have to set the thread's context classloader anyway before calling find(). We have overridden find() so that it does it for you.

Environment

None

Status

Assignee

Unassigned

Reporter

alessioc

Labels

None

Tester

None

Components

Priority

Minor
Configure