[jboss-dev] Boot problem

David M. Lloyd david.lloyd at redhat.com
Wed Mar 3 11:50:03 EST 2010


On 03/03/2010 09:56 AM, Jason T. Greene wrote:
> Ales Justin wrote:
>> Since it looks like it changes some of the behavior we use.
>> e.g.
>>
>>        URL root = unit.getAttachment(InMemoryClassesDeployer.DYNAMIC_CLASS_URL_KEY, URL.class);
>>        assertNotNull(root);
>>
>>        String aPackage = A.class.getPackage().getName();
>>        aPackage = aPackage.replace(".", "/");
>>        String resourceName = aPackage + "/TestInMemory";
>>        URL testResource = new URL(root + "/" + resourceName); //<-- HERE
>>
>> At HERE I expect an url where root is parent of the testResource.
>> Previously we used "new URL(root, resourceName)" ctor which gave this hierarchy,
>> now we get the resourceName on the same 'level' as root - hence a diff ctor is used.

Ales, just for you I added VirtualFile.asDirectoryURL() and similar methods 
which you can then safely use in "new URL(root, resourceName)" contexts.

;-)

-- 
- DML ☍



More information about the jboss-development mailing list