Skip to content

Get classloader resources - #6

Open
vitalii-honchar wants to merge 2 commits into
dukeboard:masterfrom
vitalii-honchar:master
Open

Get classloader resources#6
vitalii-honchar wants to merge 2 commits into
dukeboard:masterfrom
vitalii-honchar:master

Conversation

@vitalii-honchar

Copy link
Copy Markdown

Add methods for get classloader resources as List.

@PhantomYdn

Copy link
Copy Markdown

Guys, any ideas when pool-request can be merged?

@maxleiko

Copy link
Copy Markdown
Collaborator

@WeaxMe @PhantomYdn I'll have a look today.

@maxleiko maxleiko self-assigned this Feb 27, 2017

@dukeboard dukeboard left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, thanks you for your contribution. I did a minor comment on the getAllResources method.
If this is not clear, I can also merge and mix layer, because this problem would only appear in Graph-like classloader organisation.

public List<URL> getAllResources() {
List<URL> allResources = new ArrayList<URL>();
for (FlexyClassLoader classLoader : subClassLoaders) {
allResources.addAll(classLoader.getAllResources());

@dukeboard dukeboard Feb 27, 2017

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we have a risk of loop. FlexyClassLoader are linked using graph topology.
Therefore, the resolution should leverage a loop-breaking solution (usually with a map of already traversed FCL). This is the only potential problem is saw in the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants