Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
base repository: wildfly/wildfly-core
Choose a Base Repository
wildfly/wildfly-core
ASML-Labs/wildfly-core
Acidburn0zzz/wildfly-core
BenjaminLefoul/wildfly-core
BrentDouglas/wildfly-core
DouglasDeciccoT/wildfly-core
Gordiychuk/wildfly-core
IPreeti/wildfly-core
Jakarta-EE-Petclinic/wildfly-core
Kinlaw/wildfly-core
KrishnaKotari/wildfly-core
Ladicek/wildfly-core
Lerm/wildfly-core
OndrejKotek/wildfly-core
Richterrettich/wildfly-core
Sanne/wildfly-core
SirLoxley/wildfly-core
The-Alchemist/wildfly-core
TomasHofman/wildfly-core
WebJustDevelopment/wildfly-core
Yuan-Hu/wildfly-core
adrianoschmidt/wildfly-core
alesj/wildfly-core
aloubyansky/wildfly-core
altanis/wildfly-core
andreabattaglia/wildfly-core
aogburn/wildfly-core
aparnachaudhary/wildfly-core
aparra/wildfly-core
arcivanov/wildfly-core
asoldano/wildfly-core
bagges/wildfly-core
baranowb/wildfly-core
bayern39/wildfly-core
bgaisford/wildfly-core
bingli-borland/wildfly-core
bmaxwell/wildfly-core
bobmcwhirter/wildfly-core
briehman/wildfly-core
broubach/wildfly-core
brunolitman/wildfly-core
bstansberry/wildfly-core
caikov/wildfly-core
ceharris/wildfly-core
chengfang/wildfly-core
cstroe/wildfly-core
ctomc/wildfly-core
cybernetics/wildfly-core
dandreadis/wildfly-core
darranl/wildfly-core
dbroeglin/wildfly-core
dehort/wildfly-core
distortedsignal/wildfly-core
dmlloyd/wildfly-core
doctau/wildfly-core
domtoupin/wildfly-core
doobrie/wildfly-core
dosoudil/wildfly-core
dpospisil/wildfly-core
ehsavoie/wildfly-core
elguardian/wildfly-core
emmartins/wildfly-core
emuckenhuber/wildfly-core
esantana/wildfly-core
eventis/wildfly-core
fbogyai/wildfly-core
fjuma/wildfly-core
fl4via/wildfly-core
forrestlv/wildfly-core
gaohoward/wildfly-core
gaol/wildfly-core
goldentarek/wildfly-core
golovnin/wildfly-core
grantwohl/wildfly-core
gunnarmorling/wildfly-core
gustavonv/wildfly-core
heiko-braun/wildfly-core
hkalina/wildfly-core
honza-kasik/wildfly-core
hpehl/wildfly-core
hradecek/wildfly-core
hsvabek/wildfly-core
istraka/wildfly-core
istudens/wildfly-core
ivassile/wildfly-core
iweiss/wildfly-core
jaikiran/wildfly-core
jamesmcabee/wildfly-core
jamezp/wildfly-core
jasinner/wildfly-core
jeffzhang/wildfly-core
jfdenise/wildfly-core
jharting/wildfly-core
jimma/wildfly-core
jmartisk/wildfly-core
jmazzitelli/wildfly-core
jmesnil/wildfly-core
jorsol/wildfly-core
jpkrohling/wildfly-core
jstourac/wildfly-core
jtymel/wildfly-core
jurakp/wildfly-core
kabir-ncl/wildfly-core
kabir/wildfly-core
kayceo/wildfly-core
kgeneral/wildfly-core
kwart/wildfly-core
kylape/wildfly-core
kylinsoong/wildfly-core
langfr/wildfly-core
luck3y/wildfly-core
maasvdberg/wildfly-core
maeste/wildfly-core
marcuscarvalho/wildfly-core
marekkopecky/wildfly-core
marschall/wildfly-core
martin-welss/wildfly-core
mattdrees/wildfly-core
mayankmittal1982/wildfly-core
mayerw/wildfly-core
mchoma/wildfly-core
mikefinn/wildfly-core
miteshmanani/wildfly-core
mkouba/wildfly-core
mmusaji/wildfly-core
mnovak1/wildfly-core
mschvarc/wildfly-core
msfm/wildfly-core
n1hility/wildfly-core
nekop/wildfly-core
nibin/wildfly-core
nuzayats/wildfly-core
nziakova/wildfly-core
objectiser/wildfly-core
oketels/wildfly-core
olukas/wildfly-core
onagano-rh/wildfly-core
oscerd/wildfly-core
ossnms/wildfly-core
panossot/wildfly-core
pedroigor/wildfly-core
pferraro/wildfly-core
pgier/wildfly-core
pietroaragona/wildfly-core
pilhuhn/wildfly-core
pk-codebox-evo/webserver-wildfly-core
pkdevboxy/wildfly-core
pkremens/wildfly-core
ppalaga/wildfly-core
ppetrou/wildfly-core
psakar/wildfly-core
psiroky/wildfly-core
pskopek/wildfly-core
rachmatowicz/wildfly-core
ramsperger/wildfly-core
ramsrib/wildfly-core
rarguello/wildfly-core
red-dev01/wildfly-core
rhatlapa/wildfly-core
rhusar/wildfly-core
rnetuka/wildfly-core
robstryker/wildfly-core
ropalka/wildfly-core
rpelisse/wildfly-core
rsvoboda/wildfly-core
ryanemerson/wildfly-core
scottmarlow/wildfly-core
sfcoy/wildfly-core
sgilda/wildfly-core
sguilhen/wildfly-core
shezhu/wildfly-core
siddharthgoel88/wildfly-core
simkam/wildfly-core
singhsurjeet/wildfly-core
slaskawi/wildfly-core
soapinc/wildfly-core
soul2zimate/wildfly-core
spolti/wildfly-core
spyrkob/wildfly-core
ssilvert/wildfly-core
stalep/wildfly-core
stoty/wildfly-core
stuartwdouglas/wildfly-core
subaochen/wildfly-core
tadamski/wildfly-core
tedwon/wildfly-core
thomasdarimont/wildfly-core
tobias/wildfly-core
treblereel/wildfly-core
tsegismont/wildfly-core
vpakan/wildfly-core
vtunka/wildfly-core
wbrefvem/wildfly-core
weebl2000/wildfly-core
wildfly-security-incubator/wildfly-core
wolfc/wildfly-core
wsaca/wildfly-core
xstefank/wildfly-core
yersan/wildfly-core
zhfeng/wildfly-core
Nothing to show
base: a988279
head repository: wildfly/wildfly-core
Choose a Head Repository
wildfly/wildfly-core
ASML-Labs/wildfly-core
Acidburn0zzz/wildfly-core
BenjaminLefoul/wildfly-core
BrentDouglas/wildfly-core
DouglasDeciccoT/wildfly-core
Gordiychuk/wildfly-core
IPreeti/wildfly-core
Jakarta-EE-Petclinic/wildfly-core
Kinlaw/wildfly-core
KrishnaKotari/wildfly-core
Ladicek/wildfly-core
Lerm/wildfly-core
OndrejKotek/wildfly-core
Richterrettich/wildfly-core
Sanne/wildfly-core
SirLoxley/wildfly-core
The-Alchemist/wildfly-core
TomasHofman/wildfly-core
WebJustDevelopment/wildfly-core
Yuan-Hu/wildfly-core
adrianoschmidt/wildfly-core
alesj/wildfly-core
aloubyansky/wildfly-core
altanis/wildfly-core
andreabattaglia/wildfly-core
aogburn/wildfly-core
aparnachaudhary/wildfly-core
aparra/wildfly-core
arcivanov/wildfly-core
asoldano/wildfly-core
bagges/wildfly-core
baranowb/wildfly-core
bayern39/wildfly-core
bgaisford/wildfly-core
bingli-borland/wildfly-core
bmaxwell/wildfly-core
bobmcwhirter/wildfly-core
briehman/wildfly-core
broubach/wildfly-core
brunolitman/wildfly-core
bstansberry/wildfly-core
caikov/wildfly-core
ceharris/wildfly-core
chengfang/wildfly-core
cstroe/wildfly-core
ctomc/wildfly-core
cybernetics/wildfly-core
dandreadis/wildfly-core
darranl/wildfly-core
dbroeglin/wildfly-core
dehort/wildfly-core
distortedsignal/wildfly-core
dmlloyd/wildfly-core
doctau/wildfly-core
domtoupin/wildfly-core
doobrie/wildfly-core
dosoudil/wildfly-core
dpospisil/wildfly-core
ehsavoie/wildfly-core
elguardian/wildfly-core
emmartins/wildfly-core
emuckenhuber/wildfly-core
esantana/wildfly-core
eventis/wildfly-core
fbogyai/wildfly-core
fjuma/wildfly-core
fl4via/wildfly-core
forrestlv/wildfly-core
gaohoward/wildfly-core
gaol/wildfly-core
goldentarek/wildfly-core
golovnin/wildfly-core
grantwohl/wildfly-core
gunnarmorling/wildfly-core
gustavonv/wildfly-core
heiko-braun/wildfly-core
hkalina/wildfly-core
honza-kasik/wildfly-core
hpehl/wildfly-core
hradecek/wildfly-core
hsvabek/wildfly-core
istraka/wildfly-core
istudens/wildfly-core
ivassile/wildfly-core
iweiss/wildfly-core
jaikiran/wildfly-core
jamesmcabee/wildfly-core
jamezp/wildfly-core
jasinner/wildfly-core
jeffzhang/wildfly-core
jfdenise/wildfly-core
jharting/wildfly-core
jimma/wildfly-core
jmartisk/wildfly-core
jmazzitelli/wildfly-core
jmesnil/wildfly-core
jorsol/wildfly-core
jpkrohling/wildfly-core
jstourac/wildfly-core
jtymel/wildfly-core
jurakp/wildfly-core
kabir-ncl/wildfly-core
kabir/wildfly-core
kayceo/wildfly-core
kgeneral/wildfly-core
kwart/wildfly-core
kylape/wildfly-core
kylinsoong/wildfly-core
langfr/wildfly-core
luck3y/wildfly-core
maasvdberg/wildfly-core
maeste/wildfly-core
marcuscarvalho/wildfly-core
marekkopecky/wildfly-core
marschall/wildfly-core
martin-welss/wildfly-core
mattdrees/wildfly-core
mayankmittal1982/wildfly-core
mayerw/wildfly-core
mchoma/wildfly-core
mikefinn/wildfly-core
miteshmanani/wildfly-core
mkouba/wildfly-core
mmusaji/wildfly-core
mnovak1/wildfly-core
mschvarc/wildfly-core
msfm/wildfly-core
n1hility/wildfly-core
nekop/wildfly-core
nibin/wildfly-core
nuzayats/wildfly-core
nziakova/wildfly-core
objectiser/wildfly-core
oketels/wildfly-core
olukas/wildfly-core
onagano-rh/wildfly-core
oscerd/wildfly-core
ossnms/wildfly-core
panossot/wildfly-core
pedroigor/wildfly-core
pferraro/wildfly-core
pgier/wildfly-core
pietroaragona/wildfly-core
pilhuhn/wildfly-core
pk-codebox-evo/webserver-wildfly-core
pkdevboxy/wildfly-core
pkremens/wildfly-core
ppalaga/wildfly-core
ppetrou/wildfly-core
psakar/wildfly-core
psiroky/wildfly-core
pskopek/wildfly-core
rachmatowicz/wildfly-core
ramsperger/wildfly-core
ramsrib/wildfly-core
rarguello/wildfly-core
red-dev01/wildfly-core
rhatlapa/wildfly-core
rhusar/wildfly-core
rnetuka/wildfly-core
robstryker/wildfly-core
ropalka/wildfly-core
rpelisse/wildfly-core
rsvoboda/wildfly-core
ryanemerson/wildfly-core
scottmarlow/wildfly-core
sfcoy/wildfly-core
sgilda/wildfly-core
sguilhen/wildfly-core
shezhu/wildfly-core
siddharthgoel88/wildfly-core
simkam/wildfly-core
singhsurjeet/wildfly-core
slaskawi/wildfly-core
soapinc/wildfly-core
soul2zimate/wildfly-core
spolti/wildfly-core
spyrkob/wildfly-core
ssilvert/wildfly-core
stalep/wildfly-core
stoty/wildfly-core
stuartwdouglas/wildfly-core
subaochen/wildfly-core
tadamski/wildfly-core
tedwon/wildfly-core
thomasdarimont/wildfly-core
tobias/wildfly-core
treblereel/wildfly-core
tsegismont/wildfly-core
vpakan/wildfly-core
vtunka/wildfly-core
wbrefvem/wildfly-core
weebl2000/wildfly-core
wildfly-security-incubator/wildfly-core
wolfc/wildfly-core
wsaca/wildfly-core
xstefank/wildfly-core
yersan/wildfly-core
zhfeng/wildfly-core
Nothing to show
compare: 570c5b8
  • 2 commits
  • 5 files changed
  • 0 commit comments
  • 2 contributors
Commits on Apr 09, 2019
[WFCORE-4405] Binary jar files in model-test
@@ -34,10 +34,13 @@
import org.jboss.as.model.test.api.SingleChildFirst2;
import org.jboss.as.model.test.api.SingleParentFirst;
import org.jboss.as.model.test.api.Welcome;
import org.jboss.as.model.test.child.WelcomeChild;
import org.jboss.as.model.test.parent.WelcomeParent;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.jboss.shrinkwrap.impl.base.exporter.zip.ZipExporterImpl;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;

/**
@@ -49,11 +52,30 @@
public ChildFirstClassLoadingTest() {
}

private static URL childJarURL, parentJarURL;

@BeforeClass
public static void createJars() throws Exception {
String tempDir = System.getProperty("java.io.tmpdir");

JavaArchive childJar = ShrinkWrap.create(JavaArchive.class, "child.jar").addClasses(WelcomeChild.class).addAsServiceProvider(Welcome.class, WelcomeChild.class);
File childFile = new File(tempDir + File.separator + childJar.getName());
new ZipExporterImpl(childJar).exportTo(childFile, true);
childJarURL = childFile.toURI().toURL();
childFile.deleteOnExit();

JavaArchive parentJar = ShrinkWrap.create(JavaArchive.class, "parent.jar").addClasses(WelcomeParent.class).addAsServiceProvider(Welcome.class, WelcomeParent.class);
File parentFile = new File(tempDir + File.separator + parentJar.getName());
new ZipExporterImpl(parentJar).exportTo(parentFile, true);
parentJarURL = parentFile.toURI().toURL();
parentFile.deleteOnExit();
}

@Test
public void testWithoutExclusion() throws Exception {
URLClassLoader parent = new URLClassLoader(new URL[]{ChildFirstClassLoadingTest.class.getResource("parent.jar")}, this.getClass().getClassLoader());
URLClassLoader parent = new URLClassLoader(new URL[]{parentJarURL}, this.getClass().getClassLoader());
parent.loadClass("org.jboss.as.model.test.parent.WelcomeParent");
ChildFirstClassLoader child = new ChildFirstClassLoader(parent, new HashSet<Pattern>(), new HashSet<Pattern>(), null, null, new URL[]{ChildFirstClassLoadingTest.class.getResource("child.jar")});
ChildFirstClassLoader child = new ChildFirstClassLoader(parent, new HashSet<Pattern>(), new HashSet<Pattern>(), null, null, new URL[]{childJarURL});
Class<?> welcomeParent = child.loadClass("org.jboss.as.model.test.parent.WelcomeParent");
Class<?> welcomeChild = child.loadClass("org.jboss.as.model.test.child.WelcomeChild");
Class<?> welcome = this.getClass().getClassLoader().loadClass("org.jboss.as.model.test.api.Welcome");
@@ -63,11 +85,11 @@ public void testWithoutExclusion() throws Exception {

@Test(expected = NoClassDefFoundError.class)
public void testWithExclusion() throws Exception {
URLClassLoader parent = new URLClassLoader(new URL[]{ChildFirstClassLoadingTest.class.getResource("parent.jar")}, this.getClass().getClassLoader());
URLClassLoader parent = new URLClassLoader(new URL[]{parentJarURL}, this.getClass().getClassLoader());
parent.loadClass("org.jboss.as.model.test.parent.WelcomeParent");
ChildFirstClassLoader child = new ChildFirstClassLoader(parent, new HashSet<Pattern>(), new HashSet<Pattern>(),
SingleClassFilter.createFilter(Welcome.class),
null, new URL[]{ChildFirstClassLoadingTest.class.getResource("child.jar")});
null, new URL[]{childJarURL});
Class<?> welcomeParent = child.loadClass("org.jboss.as.model.test.parent.WelcomeParent");
Class<?> welcomeChild = child.loadClass("org.jboss.as.model.test.child.WelcomeChild");
}
@@ -118,9 +140,9 @@ public void testSingleClassFromJar() throws Exception {

@Test
public void testServiceLoaderWithoutExclusion() throws Exception {
URLClassLoader parent = new URLClassLoader(new URL[]{ChildFirstClassLoadingTest.class.getResource("parent.jar")}, this.getClass().getClassLoader());
URLClassLoader parent = new URLClassLoader(new URL[]{parentJarURL}, this.getClass().getClassLoader());
parent.loadClass("org.jboss.as.model.test.parent.WelcomeParent");
ChildFirstClassLoader child = new ChildFirstClassLoader(parent, new HashSet<Pattern>(), new HashSet<Pattern>(), null, null, new URL[]{ChildFirstClassLoadingTest.class.getResource("child.jar")});
ChildFirstClassLoader child = new ChildFirstClassLoader(parent, new HashSet<Pattern>(), new HashSet<Pattern>(), null, null, new URL[]{childJarURL});
Class<?> welcomeParent = child.loadClass("org.jboss.as.model.test.parent.WelcomeParent");
Class<?> welcomeChild = child.loadClass("org.jboss.as.model.test.child.WelcomeChild");
Class<?> welcome = this.getClass().getClassLoader().loadClass("org.jboss.as.model.test.api.Welcome");
@@ -146,9 +168,9 @@ public void testServiceLoaderWithWildcardExclusion() throws Exception {
}

private void serviceLoaderWithExclusionTest(String exclusion) throws Exception {
URLClassLoader parent = new URLClassLoader(new URL[]{ChildFirstClassLoadingTest.class.getResource("parent.jar")}, this.getClass().getClassLoader());
URLClassLoader parent = new URLClassLoader(new URL[]{parentJarURL}, this.getClass().getClassLoader());
parent.loadClass("org.jboss.as.model.test.parent.WelcomeParent");
ChildFirstClassLoader child = new ChildFirstClassLoader(parent, new HashSet<Pattern>(), new HashSet<Pattern>(), null, Pattern.compile(exclusion), new URL[]{ChildFirstClassLoadingTest.class.getResource("child.jar")});
ChildFirstClassLoader child = new ChildFirstClassLoader(parent, new HashSet<Pattern>(), new HashSet<Pattern>(), null, Pattern.compile(exclusion), new URL[]{childJarURL});
Class<?> welcomeParent = child.loadClass("org.jboss.as.model.test.parent.WelcomeParent");
Class<?> welcomeChild = child.loadClass("org.jboss.as.model.test.child.WelcomeChild");
Class<?> welcome = this.getClass().getClassLoader().loadClass("org.jboss.as.model.test.api.Welcome");
@@ -0,0 +1,35 @@
/*
* Copyright (C) 2019 Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file
* in the distribution for a full listing of individual contributors.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/

package org.jboss.as.model.test.child;

import org.jboss.as.model.test.api.Welcome;

/**
* @author <a href="mailto:lgao@redhat.com">Lin Gao</a>
*/
public class WelcomeChild implements Welcome {

public String hello(String name) {
return "The child is saying hello " + name;
}

}
@@ -0,0 +1,36 @@
/*
* Copyright (C) 2019 Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file
* in the distribution for a full listing of individual contributors.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/

package org.jboss.as.model.test.parent;

import org.jboss.as.model.test.api.Welcome;

/**
* @author <a href="mailto:lgao@redhat.com">Lin Gao</a>
*/

public class WelcomeParent implements Welcome {

public String hello(String name) {
return "The parent is saying hello " + name;
}

}
Binary file not shown.
Binary file not shown.

No commit comments for this range

You can’t perform that action at this time.