Skip to content

Commit b1ae11f

Browse files
committed
Fix cannot find warning icon caused NPE issue
1 parent 7785675 commit b1ae11f

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/azuretools/ijidea/ui/BypassCertificateVerificationWarningForm.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ protected BypassCertificateVerificationWarningForm(@Nullable Project project) {
4545
}
4646

4747
protected void createUIComponents() {
48-
warningIconLabel = new JLabel(UIUtil.getBalloonWarningIcon());
48+
warningIconLabel = new JLabel(UIUtil.getWarningIcon());
4949
}
5050

5151
@Nullable

PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/azuretools/ijidea/ui/WarningMessageForm.form

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<grid id="27dc6" binding="contentPanel" layout-manager="GridLayoutManager" row-count="2" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
44
<margin top="0" left="0" bottom="0" right="0"/>
55
<constraints>
6-
<xy x="20" y="20" width="704" height="400"/>
6+
<xy x="20" y="20" width="740" height="400"/>
77
</constraints>
88
<properties/>
99
<border type="none"/>
@@ -15,10 +15,9 @@
1515
<properties/>
1616
<border type="none"/>
1717
<children>
18-
<component id="5346e" class="javax.swing.JLabel" binding="warningIconLabel">
18+
<component id="5346e" class="javax.swing.JLabel" binding="warningIconLabel" custom-create="true">
1919
<constraints border-constraint="North"/>
2020
<properties>
21-
<icon value="javax/swing/plaf/metal/icons/ocean/warning.png"/>
2221
<text value=""/>
2322
</properties>
2423
</component>

PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/azuretools/ijidea/ui/WarningMessageForm.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
import com.intellij.openapi.project.Project;
2626
import com.intellij.openapi.ui.DialogWrapper;
27+
import com.intellij.util.ui.UIUtil;
2728
import com.microsoft.azuretools.azurecommons.helpers.NotNull;
2829
import com.microsoft.azuretools.azurecommons.helpers.Nullable;
2930

@@ -56,6 +57,10 @@ public WarningMessageForm(
5657
}
5758
}
5859

60+
protected void createUIComponents() {
61+
warningIconLabel = new JLabel(UIUtil.getWarningIcon());
62+
}
63+
5964
@Nullable
6065
@Override
6166
protected JComponent createCenterPanel() {

0 commit comments

Comments
 (0)