Community
Participate
Working Groups
I20051129-1200 Namely, p/X.class is unchanged while p/q/X.class is transformed into p\q\X.class. Moreover, the remainder of the code expects the forward slash, which questions the use of the transformation. The transformation only happens under Windows. Bug 119430 is impacted as well (in that if no conversion happened, ClasspathLocation.fetchAccessRestriction would not have to convert back to /).
That transformation is only one of a few that adapt our behavior to the underlying filesystem. Especially, quite a few defensive 'replace / by \ or the other way round depending on java.io.File.separator' exist in the code. The approach of bug 119430, which maps whichever file separator to the '/' that we use in access rules hence seems sound. The current code addresses the needs of Windows/non Windows filesystems impedence in a satisfactory way and no refactoring is needed.
Tidying.