db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker/metadata RepositoryXmlHandler.java
Date Thu, 11 Nov 2004 13:26:28 GMT
arminw      2004/11/11 05:26:28

  Modified:    src/java/org/apache/ojb/broker/metadata Tag: OJB_1_0_RELEASE
                        RepositoryXmlHandler.java
  Log:
  add null-check for super-class attribute
  add error when parsing exception occur
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.58.2.3  +4 -4      db-ojb/src/java/org/apache/ojb/broker/metadata/RepositoryXmlHandler.java
  
  Index: RepositoryXmlHandler.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/metadata/RepositoryXmlHandler.java,v
  retrieving revision 1.58.2.2
  retrieving revision 1.58.2.3
  diff -u -r1.58.2.2 -r1.58.2.3
  --- RepositoryXmlHandler.java	28 Sep 2004 14:56:26 -0000	1.58.2.2
  +++ RepositoryXmlHandler.java	11 Nov 2004 13:26:28 -0000	1.58.2.3
  @@ -22,6 +22,7 @@
   import org.apache.ojb.broker.util.ClassHelper;
   import org.apache.ojb.broker.util.logging.Logger;
   import org.apache.ojb.broker.util.logging.LoggerFactory;
  +import org.apache.commons.lang.StringUtils;
   import org.xml.sax.Attributes;
   import org.xml.sax.SAXException;
   import org.xml.sax.SAXParseException;
  @@ -261,10 +262,9 @@
                           }
   
                           // set if extends
  -                        // set row-reader attribute
                           String extendsAtt = atts.getValue(tags.getTagById(EXTENDS));
                           if (isDebug) logger.debug("     " + tags.getTagById(EXTENDS) +
": " + extendsAtt);
  -                        if (extendsAtt != null)
  +                        if (checkString(extendsAtt))
                           {
                               m_CurrentCLD.setSuperClass(extendsAtt);
                           }
  @@ -948,7 +948,7 @@
           }
           catch (Exception ex)
           {
  -            // logger.error(ex);
  +            logger.error("Exception while read metadata", ex);
               if(ex instanceof MetadataException) throw (MetadataException)ex;
               else throw new MetadataException("Exception when reading metadata information,"+
                       " please check your repository.xml file", ex);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message