Skip to content

Commit c7a4a84

Browse files
authored
Check for null environment even if the artifact is present (#771)
1 parent 635df51 commit c7a4a84

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

google-cloud-tools-plugin/src/com/google/cloud/tools/intellij/appengine/cloud/AppEngineArtifactDeploymentSourceType.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ public boolean apply(Artifact artifact) {
6767
}
6868
);
6969

70-
if (artifact.isPresent()) {
71-
String environment = settings.getAttributeValue(
72-
AppEngineDeploymentConfiguration.ENVIRONMENT_ATTRIBUTE);
70+
String environment = settings.getAttributeValue(
71+
AppEngineDeploymentConfiguration.ENVIRONMENT_ATTRIBUTE);
7372

73+
if (artifact.isPresent() && environment != null) {
7474
return new AppEngineArtifactDeploymentSource(
7575
AppEngineEnvironment.valueOf(environment),
7676
ArtifactPointerManager.getInstance(project).createPointer(artifact.get()));

0 commit comments

Comments
 (0)