Method in question is:
public class TestAssemblerGroup extends AssemblerTestBase
{
public void testLoadsClasses()
{
AssemblerGroup a = AssemblerGroup.create();
a.implementWith( resource( "T" ), new MockAssembler() );
Resource root = resourceInModel( "x rdf:type T; _c ja:loadClass '"
+ TestAssemblerGroup.class.getName() + "$Trivial'" );
assertFalse( "something has pre-loaded Trivial, so we can't test if
it gets loaded", loaded );
assertEquals( "mockmockmock", a.open( root ) );
assertTrue( "the assembler group did not obey the ja:loadClass
directive", loaded );
}
public static boolean loaded = false;
public static class Trivial
{
static { loaded = true; }
}
[ code removed for brevity ]
}
The error is that
assertFalse( "something has pre-loaded Trivial, so we can't test if it gets
loaded", loaded );
is triggered.
This used to work -- perhaps a difference in how java 8 loads classes. It
might make sense to move the "Trivial" class to a different file.
Claude
On Sat, May 9, 2015 at 6:52 PM, Andy Seaborne <[email protected]> wrote:
> On 09/05/15 17:07, Claude Warren wrote:
>
>> Has the assembler class loading strategy changed? I have two tests that
>> were working but now fail because the object of the ja:loadClass is loaded
>> before a call to a.open( root ).
>>
>> Claude
>>
>>
> Details?
>
> ja:loadClass is affected by class renames. Could that be it?
>
> Helper migration code is not (yet) in place.
>
> Andy
>
>
--
I like: Like Like - The likeliest place on the web
<http://like-like.xenei.com>
LinkedIn: http://www.linkedin.com/in/claudewarren