Skip to content

Commit

Permalink
CompositeClassLoader is inappropriately using reflection for methods …
Browse files Browse the repository at this point in the history
…it has access to #214

#214
Added a test case for CompositeClassLoader
Signed-off-by: Steve Davidson <steve@j2eeguys.com>
  • Loading branch information
gorky committed Jul 30, 2020
1 parent 9391ed3 commit d643323
Showing 1 changed file with 35 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* Copyright (C) 2020 Steve Davidson
* Copyright (C) 2020 XStream Committers.
* All rights reserved.
*
* The software in this package is published under the terms of the BSD
* style license a copy of which has been included with this distribution in
* the LICENSE.txt file.
*
* Created on 30. July 2020 by Steve Davidson
*/

package com.thoughtworks.xstream.core.util;

import junit.framework.TestCase;

public class CompositeClassLoaderTest extends TestCase {

class DummyClassLoader extends ClassLoader {
public DummyClassLoader(){
//end init
}
}

public void testAdd(){
//Just check that Exceptions don't get thrown
final CompositeClassLoader cl = new CompositeClassLoader();
ClassLoader testCl = new DummyClassLoader();
cl.add(testCl);
cl.add(testCl);
testCl = null;
cl.add(testCl);
}
}

0 comments on commit d643323

Please sign in to comment.