Skip to content

Commit e7e5f28

Browse files
committed
extensions table: Avoid NPE when passed null values for columns
1 parent 7ef2cd4 commit e7e5f28

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

NEWS.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Enhancements:
1515

1616
Bug fixes:
1717
- Fix exception when opening the PKCS#11 provider selection dialog.
18-
- Fix exception with null alias values when rendering key store table.
18+
- Fix exception with nulls when rendering key store and extensions tables.
1919

2020
Miscellaneous:
2121
- Generated X.509 certificates are now version 3 ones.

src/main/net/sf/portecle/ExtensionsTableCellRend.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public Component getTableCellRendererComponent(JTable jtExtensions, Object value
6060
{
6161
ImageIcon icon;
6262

63-
if (((Boolean) value))
63+
if (value != null && (Boolean) value)
6464
{
6565
icon = new ImageIcon(
6666
getClass().getResource(RB.getString("ExtensionsTableCellRend.CriticalExtension.image")));
@@ -78,7 +78,7 @@ public Component getTableCellRendererComponent(JTable jtExtensions, Object value
7878
cell.setVerticalAlignment(CENTER);
7979
cell.setHorizontalAlignment(CENTER);
8080
}
81-
else
81+
else if (value != null)
8282
{
8383
// Just use toString of object as text
8484
cell.setText(value.toString());

0 commit comments

Comments
 (0)