Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue #1438 by generalizing the usage of the
ServiceHelper
class.
Also add test to check the behavior of the `ServiceHelper` when using different classloaders. Signed-off-by: Clement Escoffier <clement.escoffier@gmail.com>
- Loading branch information
1 parent
8f49444
commit 41326f9
Showing
20 changed files
with
454 additions
and
42 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
16 changes: 16 additions & 0 deletions
16
src/test/externals/META-INF/services/io.vertx.test.spi.SomeFactory
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,16 @@ | |||
# | |||
# Copyright (c) 2011-2015 The original author or authors | |||
# ------------------------------------------------------ | |||
# All rights reserved. This program and the accompanying materials | |||
# are made available under the terms of the Eclipse Public License v1.0 | |||
# and Apache License v2.0 which accompanies this distribution. | |||
# | |||
# The Eclipse Public License is available at | |||
# http://www.eclipse.org/legal/epl-v10.html | |||
# | |||
# The Apache License v2.0 is available at | |||
# http://www.opensource.org/licenses/apache2.0.php | |||
# | |||
# You may elect to redistribute this code under either of these licenses. | |||
# | |||
io.vertx.core.externals.SomeFactoryImplA |
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,34 @@ | |||
/* | |||
* Copyright (c) 2011-2015 The original author or authors | |||
* ------------------------------------------------------ | |||
* All rights reserved. This program and the accompanying materials | |||
* are made available under the terms of the Eclipse Public License v1.0 | |||
* and Apache License v2.0 which accompanies this distribution. | |||
* | |||
* The Eclipse Public License is available at | |||
* http://www.eclipse.org/legal/epl-v10.html | |||
* | |||
* The Apache License v2.0 is available at | |||
* http://www.opensource.org/licenses/apache2.0.php | |||
* | |||
* You may elect to redistribute this code under either of these licenses. | |||
*/ | |||
|
|||
package io.vertx.core.externals; | |||
|
|||
import io.vertx.test.spi.SomeFactory; | |||
|
|||
/** | |||
* @author <a href="http://escoffier.me">Clement Escoffier</a> | |||
*/ | |||
public class SomeFactoryImplA implements SomeFactory { | |||
@Override | |||
public String name() { | |||
return "A"; | |||
} | |||
|
|||
@Override | |||
public ClassLoader classloader() { | |||
return this.getClass().getClassLoader(); | |||
} | |||
} |
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,34 @@ | |||
/* | |||
* Copyright (c) 2011-2015 The original author or authors | |||
* ------------------------------------------------------ | |||
* All rights reserved. This program and the accompanying materials | |||
* are made available under the terms of the Eclipse Public License v1.0 | |||
* and Apache License v2.0 which accompanies this distribution. | |||
* | |||
* The Eclipse Public License is available at | |||
* http://www.eclipse.org/legal/epl-v10.html | |||
* | |||
* The Apache License v2.0 is available at | |||
* http://www.opensource.org/licenses/apache2.0.php | |||
* | |||
* You may elect to redistribute this code under either of these licenses. | |||
*/ | |||
|
|||
package io.vertx.core; | |||
|
|||
import io.vertx.test.spi.FakeFactory; | |||
|
|||
/** | |||
* @author <a href="http://escoffier.me">Clement Escoffier</a> | |||
*/ | |||
public class FakeFactoryImplA implements FakeFactory { | |||
@Override | |||
public String name() { | |||
return "A"; | |||
} | |||
|
|||
@Override | |||
public ClassLoader classloader() { | |||
return this.getClass().getClassLoader(); | |||
} | |||
} |
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,34 @@ | |||
/* | |||
* Copyright (c) 2011-2015 The original author or authors | |||
* ------------------------------------------------------ | |||
* All rights reserved. This program and the accompanying materials | |||
* are made available under the terms of the Eclipse Public License v1.0 | |||
* and Apache License v2.0 which accompanies this distribution. | |||
* | |||
* The Eclipse Public License is available at | |||
* http://www.eclipse.org/legal/epl-v10.html | |||
* | |||
* The Apache License v2.0 is available at | |||
* http://www.opensource.org/licenses/apache2.0.php | |||
* | |||
* You may elect to redistribute this code under either of these licenses. | |||
*/ | |||
|
|||
package io.vertx.core; | |||
|
|||
import io.vertx.test.spi.FakeFactory; | |||
|
|||
/** | |||
* @author <a href="http://escoffier.me">Clement Escoffier</a> | |||
*/ | |||
public class FakeFactoryImplB implements FakeFactory { | |||
@Override | |||
public String name() { | |||
return "B"; | |||
} | |||
|
|||
@Override | |||
public ClassLoader classloader() { | |||
return this.getClass().getClassLoader(); | |||
} | |||
} |
Oops, something went wrong.