Skip to content

Commit 9887ff8

Browse files
authored
Fix error when open empty ACR explorer (#2729)
1 parent 74b89b6 commit 9887ff8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/intellij/helpers/containerregistry/ContainerRegistryPropertyView.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -390,13 +390,13 @@ public void showProperty(ContainerRegistryProperty property) {
390390
}
391391

392392
@Override
393-
public void listRepo(@NotNull List<String> repos) {
393+
public void listRepo(List<String> repos) {
394394
fillTable(repos, tblRepo);
395395
enableWidgets();
396396
}
397397

398398
@Override
399-
public void listTag(@NotNull List<String> tags) {
399+
public void listTag(List<String> tags) {
400400
fillTable(tags, tblTag);
401401
enableWidgets();
402402
}
@@ -430,8 +430,8 @@ private void makeTxtOpaque() {
430430
txtUserName.setBackground(null);
431431
}
432432

433-
private void fillTable(@NotNull List<String> list, @NotNull JBTable table) {
434-
if (list.size() > 0) {
433+
private void fillTable(List<String> list, @NotNull JBTable table) {
434+
if (list != null && !list.isEmpty()) {
435435
DefaultTableModel model = (DefaultTableModel) table.getModel();
436436
model.getDataVector().clear();
437437
list.stream().sorted().forEach(item -> model.addRow(new String[]{item}));

0 commit comments

Comments
 (0)