Skip to content

Commit

Permalink
Merge pull request #108 from bpangburn/4.0.7-SNAPSHOT
Browse files Browse the repository at this point in the history
4.0.7 snapshot
  • Loading branch information
bpangburn authored Dec 14, 2021
2 parents 8c8d6d2 + 80c6a54 commit 3f8c156
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.nqadmin.swingset</groupId>
<artifactId>swingset-parent</artifactId>
<version>4.0.6</version>
<version>4.0.7</version>
<packaging>pom</packaging>

<name>swingset-parent</name>
Expand Down
6 changes: 3 additions & 3 deletions swingset-demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<groupId>com.nqadmin.swingset.demo</groupId>
<artifactId>swingset-demo</artifactId>
<version>4.0.6</version>
<version>4.0.7</version>
<packaging>jar</packaging>

<name>swingset-demo</name>
Expand All @@ -21,8 +21,8 @@
<version.maven>3.6.3</version.maven>
<version.java>1.8</version.java>

<version.log4j>2.15.0</version.log4j>
<version.swingset>4.0.6</version.swingset>
<version.log4j>2.16.0</version.log4j>
<version.swingset>4.0.7</version.swingset>
<version.h2>1.4.200</version.h2>
<!-- <version.h2>2.0.202</version.h2> -->
<version.java-getopt>1.0.13</version.java-getopt>
Expand Down
9 changes: 9 additions & 0 deletions swingset/CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
ChangeLog file for the SwingSet Open Toolkit for Java Swing.
==============================================================================

==============================================================================
SwingSet 4.0.7 - Released 2021-12-14
==============================================================================

Changes:
1. Updated log4j dependencies to 2.16.0 to further address CVE-2021-44228.
2. Override the default implementation of getAllowNull() in SSBaseComboBox
to take combobox navigator into account.

==============================================================================
SwingSet 4.0.6 - Released 2021-12-10
==============================================================================
Expand Down
4 changes: 2 additions & 2 deletions swingset/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<groupId>com.nqadmin.swingset</groupId>
<artifactId>swingset</artifactId>
<version>4.0.6</version>
<version>4.0.7</version>
<packaging>jar</packaging>

<name>swingset</name>
Expand All @@ -23,7 +23,7 @@

<!--<version.glazedlists>1.11.0</version.glazedlists> -->
<version.glazedlists>1.11.1203</version.glazedlists>
<version.log4j>2.15.0</version.log4j>
<version.log4j>2.16.0</version.log4j>
<version.jdbcrowsetimpl>1.0.3</version.jdbcrowsetimpl>

<version.maven-enforcer-plugin>3.0.0</version.maven-enforcer-plugin>
Expand Down
12 changes: 11 additions & 1 deletion swingset/src/main/java/com/nqadmin/swingset/SSBaseComboBox.java
Original file line number Diff line number Diff line change
Expand Up @@ -932,6 +932,16 @@ protected boolean isComboBoxNavigator() {
return false;
}

/**
* Override the default implementation to take combobox navigator
* into account. If navigator then always false, don't need to check
* database.
* @return true if combo box can have null value
*/
public boolean getAllowNull() {
return !isComboBoxNavigator() && getSSCommon().getAllowNull();
}

/**
* Add or remove the nullItem from the itemList if needed depending
* on {@code getAllowNull()} and the current existence of a nullItem.
Expand All @@ -942,7 +952,7 @@ protected void adjustForNullItem() {
// insert row as SSDBNavImpl calls setSelectionPending(true) and that will fail
// for the combo navigator without this tweak.
//boolean wantNull = (getAllowNull() || selectionPending) && !isComboBoxNavigator();
boolean wantNull = (getAllowNull() && !isComboBoxNavigator()) || selectionPending;
boolean wantNull = getAllowNull() || selectionPending;
boolean hasNull = nullItem != null;

if (wantNull == hasNull) {
Expand Down

0 comments on commit 3f8c156

Please sign in to comment.