db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r628870 - in /db/ddlutils/trunk/src/java/org/apache/ddlutils: io/DatabaseIO.java platform/JdbcModelReader.java
Date Mon, 18 Feb 2008 21:22:42 GMT
Author: tomdz
Date: Mon Feb 18 13:22:42 2008
New Revision: 628870

URL: http://svn.apache.org/viewvc?rev=628870&view=rev
Log:
Fix for DDLUTILS-193

Modified:
    db/ddlutils/trunk/src/java/org/apache/ddlutils/io/DatabaseIO.java
    db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/JdbcModelReader.java

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/io/DatabaseIO.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/java/org/apache/ddlutils/io/DatabaseIO.java?rev=628870&r1=628869&r2=628870&view=diff
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/io/DatabaseIO.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/io/DatabaseIO.java Mon Feb 18 13:22:42
2008
@@ -1046,7 +1046,7 @@
      */
     private void writeAttribute(PrettyPrintingXmlWriter xmlWriter, QName qName, String value)
throws DdlUtilsXMLException
     {
-        if (!StringUtils.isEmpty(value))
+        if (value != null)
         {
             xmlWriter.writeAttribute(null, qName.getLocalPart(), value);
         }

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/JdbcModelReader.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/JdbcModelReader.java?rev=628870&r1=628869&r2=628870&view=diff
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/JdbcModelReader.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/JdbcModelReader.java Mon Feb 18
13:22:42 2008
@@ -809,7 +809,13 @@
             column.setScale(scale.intValue());
         }
         column.setRequired("NO".equalsIgnoreCase(((String)values.get("IS_NULLABLE")).trim()));
-        column.setDescription((String)values.get("REMARKS"));
+
+        String description = (String)values.get("REMARKS");
+
+        if (!org.apache.ddlutils.util.StringUtils.isEmpty(description))
+        {
+            column.setDescription(description);
+        }
         return column;
     }
 



Mime
View raw message