Merge pull request #2213 from mstruk/npe
KEYCLOAK-2461 NPE when deploying an .ear
This commit is contained in:
commit
c2a601dc04
5 changed files with 15 additions and 0 deletions
|
@ -49,6 +49,9 @@ public abstract class KeycloakDependencyProcessor implements DeploymentUnitProce
|
||||||
String deploymentName = deploymentUnit.getName();
|
String deploymentName = deploymentUnit.getName();
|
||||||
if (!KeycloakAdapterConfigService.getInstance().isSecureDeployment(deploymentName)) {
|
if (!KeycloakAdapterConfigService.getInstance().isSecureDeployment(deploymentName)) {
|
||||||
WarMetaData warMetaData = deploymentUnit.getAttachment(WarMetaData.ATTACHMENT_KEY);
|
WarMetaData warMetaData = deploymentUnit.getAttachment(WarMetaData.ATTACHMENT_KEY);
|
||||||
|
if (warMetaData == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
JBossWebMetaData webMetaData = warMetaData.getMergedJBossWebMetaData();
|
JBossWebMetaData webMetaData = warMetaData.getMergedJBossWebMetaData();
|
||||||
if (webMetaData == null) {
|
if (webMetaData == null) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -49,6 +49,9 @@ public abstract class KeycloakDependencyProcessor implements DeploymentUnitProce
|
||||||
String deploymentName = deploymentUnit.getName();
|
String deploymentName = deploymentUnit.getName();
|
||||||
if (!KeycloakAdapterConfigService.getInstance().isSecureDeployment(deploymentName)) {
|
if (!KeycloakAdapterConfigService.getInstance().isSecureDeployment(deploymentName)) {
|
||||||
WarMetaData warMetaData = deploymentUnit.getAttachment(WarMetaData.ATTACHMENT_KEY);
|
WarMetaData warMetaData = deploymentUnit.getAttachment(WarMetaData.ATTACHMENT_KEY);
|
||||||
|
if (warMetaData == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
JBossWebMetaData webMetaData = warMetaData.getMergedJBossWebMetaData();
|
JBossWebMetaData webMetaData = warMetaData.getMergedJBossWebMetaData();
|
||||||
if (webMetaData == null) {
|
if (webMetaData == null) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -49,6 +49,9 @@ public abstract class KeycloakDependencyProcessor implements DeploymentUnitProce
|
||||||
String deploymentName = deploymentUnit.getName();
|
String deploymentName = deploymentUnit.getName();
|
||||||
if (!KeycloakAdapterConfigService.getInstance().isSecureDeployment(deploymentName)) {
|
if (!KeycloakAdapterConfigService.getInstance().isSecureDeployment(deploymentName)) {
|
||||||
WarMetaData warMetaData = deploymentUnit.getAttachment(WarMetaData.ATTACHMENT_KEY);
|
WarMetaData warMetaData = deploymentUnit.getAttachment(WarMetaData.ATTACHMENT_KEY);
|
||||||
|
if (warMetaData == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
JBossWebMetaData webMetaData = warMetaData.getMergedJBossWebMetaData();
|
JBossWebMetaData webMetaData = warMetaData.getMergedJBossWebMetaData();
|
||||||
if (webMetaData == null) {
|
if (webMetaData == null) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -48,6 +48,9 @@ public abstract class KeycloakDependencyProcessor implements DeploymentUnitProce
|
||||||
String deploymentName = deploymentUnit.getName();
|
String deploymentName = deploymentUnit.getName();
|
||||||
if (Configuration.INSTANCE.getSecureDeployment(deploymentName) == null) {
|
if (Configuration.INSTANCE.getSecureDeployment(deploymentName) == null) {
|
||||||
WarMetaData warMetaData = deploymentUnit.getAttachment(WarMetaData.ATTACHMENT_KEY);
|
WarMetaData warMetaData = deploymentUnit.getAttachment(WarMetaData.ATTACHMENT_KEY);
|
||||||
|
if (warMetaData == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
JBossWebMetaData webMetaData = warMetaData.getMergedJBossWebMetaData();
|
JBossWebMetaData webMetaData = warMetaData.getMergedJBossWebMetaData();
|
||||||
if (webMetaData == null) {
|
if (webMetaData == null) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -47,6 +47,9 @@ public abstract class KeycloakDependencyProcessor implements DeploymentUnitProce
|
||||||
String deploymentName = deploymentUnit.getName();
|
String deploymentName = deploymentUnit.getName();
|
||||||
if (Configuration.INSTANCE.getSecureDeployment(deploymentName) == null) {
|
if (Configuration.INSTANCE.getSecureDeployment(deploymentName) == null) {
|
||||||
WarMetaData warMetaData = deploymentUnit.getAttachment(WarMetaData.ATTACHMENT_KEY);
|
WarMetaData warMetaData = deploymentUnit.getAttachment(WarMetaData.ATTACHMENT_KEY);
|
||||||
|
if (warMetaData == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
JBossWebMetaData webMetaData = warMetaData.getMergedJBossWebMetaData();
|
JBossWebMetaData webMetaData = warMetaData.getMergedJBossWebMetaData();
|
||||||
if (webMetaData == null) {
|
if (webMetaData == null) {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue