Revision: 5661
http://squirrel-sql.svn.sourceforge.net/squirrel-sql/?rev=5661&view=rev
Author: gerdwagner
Date: 2010-06-29 02:15:13 +0000 (Tue, 29 Jun 2010)
Log Message:
-----------
Overview:
This makes sure that null or empty string can be separated from other strings.
Before this was done null or empty string could not be in their own interval.
null still cant be separated from empty string.
Modified Paths:
--------------
trunk/sql12/app/src/net/sourceforge/squirrel_sql/client/session/mainpanel/overview/datascale/CharRange.java
Modified: trunk/sql12/app/src/net/sourceforge/squirrel_sql/client/session/mainpanel/overview/datascale/CharRange.java
===================================================================
--- trunk/sql12/app/src/net/sourceforge/squirrel_sql/client/session/mainpanel/overview/datascale/CharRange.java 2010-06-27 18:06:54 UTC (rev 5660)
+++ trunk/sql12/app/src/net/sourceforge/squirrel_sql/client/session/mainpanel/overview/datascale/CharRange.java 2010-06-29 02:15:13 UTC (rev 5661)
@@ -7,6 +7,7 @@
private boolean _isInit;
private boolean _initializing;
+ private boolean _hasNullOrEmptyString;
public char getRange()
{
@@ -22,6 +23,7 @@
if(null == s || 0 == s.length())
{
+ _hasNullOrEmptyString = true;
return;
}
@@ -51,7 +53,17 @@
public char getMinChar()
{
- return (char) _minChar;
+ if (_hasNullOrEmptyString && 0 < _minChar)
+ {
+ // This makes sure that null or empty string can be separated from other strings.
+ // Before this was done null or empty string could not be in their own interval.
+ // null still cant be separated from empty string.
+ return (char) (_minChar-1);
+ }
+ else
+ {
+ return (char) _minChar;
+ }
}
public char getMaxChar()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|