Message:
A new issue has been created in JIRA.
---------------------------------------------------------------------
View the issue:
http://jira.codehaus.org/secure/ViewIssue.jspa?key=GEOS-155
Here is an overview of the issue:
---------------------------------------------------------------------
Key: GEOS-155
Summary: Tests on strings
Type: Bug
Status: Open
Priority: Major
Original Estimate: Unknown
Time Spent: Unknown
Remaining: Unknown
Project: GeoServer
Versions:
1.2.0
Assignee: Chris Holmes
Reporter: Pierrick Brihaye
Created: Fri, 9 Apr 2004 9:11 AM
Updated: Fri, 9 Apr 2004 9:11 AM
Description:
Hi all.
It looks like tests on strings won't always give the expected results. I did a quick search on :
= ""
=""
into the code and noticed the use of == or != where "".equals or !"".equals are normally expected :
DescribeResponse : if ((gType2 != null) && (gType2 != "")) {
WmsCapabilitiesResponseHandler : if ((tmp != null) && (tmp != "")) {
ValidationTestEditorAction : if(val != null && val != "")
DataTransferObjectFactory : if(name==null || name == "")
Data : if ((namespacePrefix == null) || (namespacePrefix == "")) {
Data : if ((prefix == null) || (prefix == "")) {
NameSpaceTranslator : if(definition == null || definition == "")
NameSpaceTranslator : if(type == null || type == "")
XMLConfigReader : if ((ref != null) && (ref != "")) {
XMLConfigReader : if ((type != null) && (type != "")) {
XMLConfigWriter : if ((g.getSchemaBaseUrl() != null) && (g.getSchemaBaseUrl() != "")) {
XMLConfigWriter : if ((g.getAdminUserName() != null) && (g.getAdminUserName() != "")) {
XMLConfigWriter : if ((g.getAdminPassword() != null) && (g.getAdminPassword() != "")) {
XMLConfigWriter : if ((s.getName() != null) && (s.getName() != "")) {
XMLConfigWriter : if ((s.getTitle() != null) && (s.getTitle() != "")) {
XMLConfigWriter : if ((s.getAbstract() != null) && (s.getAbstract() != "")) {
XMLConfigWriter : if ((s.getFees() != null) && (s.getFees() != "")) {
XMLConfigWriter : if ((s.getAccessConstraints() != null)
&& (s.getAccessConstraints() != "")) {
XMLConfigWriter : if ((s.getMaintainer() != null) && (s.getMaintainer() != "")) {
XMLConfigWriter : if ((ds.getAbstract() != null) && (ds.getAbstract() != "")) {
XMLConfigWriter : if ((ds.getTitle() != null) && (ds.getTitle() != "")) {
XMLConfigWriter : if ((ns.getUri() != null) && (ns.getUri() != "")) {
XMLConfigWriter : if ((ns.getPrefix() != null) && (ns.getPrefix() != "")) {
XMLConfigWriter : if ((s.getId() != null) && (s.getId() != "")) {
XMLConfigWriter : if ((ft.getDataStoreId() != null) && (ft.getDataStoreId() != "")) {
XMLConfigWriter : if ((ft.getName() != null) && (ft.getName() != "")) {
XMLConfigWriter : if ((ft.getTitle() != null) && (ft.getTitle() != "")) {
XMLConfigWriter : if ((ft.getAbstract() != null) && (ft.getAbstract() != "")) {
XMLConfigWriter : if ((ft.getDefaultStyle() != null) && (ft.getDefaultStyle() != "")) {
XMLConfigWriter : if ((fs.getSchemaName() == null) || (fs.getSchemaName() == "")) {
XMLConfigWriter : if ((fs.getSchemaBase() == null) || (fs.getSchemaBase() == "")) {
XMLConfigWriter : /*if(g.getBaseUrl()!=null && g.getBaseUrl()!=""){ (a comment though)
ReaderUtils : if ((value == null) || (value == "")) {
ReaderUtils : if ((value == null) || (value == "")) {
BTW, I have a similar but smaller list for Geotools. Shall I post a new issue on Geotools or could you also handle these bugs ?
Cheers,
p.b.
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira