-
Notifications
You must be signed in to change notification settings - Fork 218
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CompositeClassLoader is inappropriately using reflection for methods …
…it has access to #214 #214 Added a test case for CompositeClassLoader Signed-off-by: Steve Davidson <steve@j2eeguys.com>
- Loading branch information
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
xstream/src/test/com/thoughtworks/xstream/core/util/CompositeClassLoaderTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} | ||
|