Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[#1823] Fix play.exceptions.CompilationException (fix for the fix #786) #1223

@flybyray

Description

@flybyray

ApplicationClassloader uses a cache for negative and postiv lookup of packages in isPackage method.
On windows systems file lookup is case insensitive. For that rease #786 introduced a canonical filename review to check case sensitive.

Take a look for the play.libs.ws package, you can put a conditional break point here.

classloader_collide

you will then see a call to Play.classloader.getResource with a play/libs/ws.class argument

classloader_collide2

which is not resolved by Play1's java path virtualfile system loop (i added the boolean b to make that clear). The java classloader getResource will then find case insensitive the play.lib.WS.class (returning lower case) and hence the package cache gets a negative lookup for play.libs.ws.

classloader_collide3
classloader_collide4

The fix is easy. If we lookup the possible call hierachies the fix from #786 needs to moved up to getResource.

This issue can only be tested on systems with case insensitive file systems enabled.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions