[jboss-cvs] jboss-seam/src/main/org/jboss/seam/util ...

Christian Bauer christian.bauer at jboss.com
Tue Jan 23 05:37:41 EST 2007


  User: cbauer  
  Date: 07/01/23 05:37:41

  Modified:    src/main/org/jboss/seam/util  DTDEntityResolver.java
  Log:
  Removed copy/pasted Hibernate stuff
  
  Revision  Changes    Path
  1.4       +9 -12     jboss-seam/src/main/org/jboss/seam/util/DTDEntityResolver.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: DTDEntityResolver.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/util/DTDEntityResolver.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -b -r1.3 -r1.4
  --- DTDEntityResolver.java	21 Dec 2006 02:38:29 -0000	1.3
  +++ DTDEntityResolver.java	23 Jan 2007 10:37:41 -0000	1.4
  @@ -1,4 +1,4 @@
  -//$Id: DTDEntityResolver.java,v 1.3 2006/12/21 02:38:29 sbryzak2 Exp $
  +//$Id: DTDEntityResolver.java,v 1.4 2007/01/23 10:37:41 cbauer Exp $
   //Contributed by Markus Meissner
   package org.jboss.seam.util;
   
  @@ -15,11 +15,11 @@
    * various systemId URLs to local classpath lookups<ol>
    * <li>Any systemId URL beginning with <tt>http://jboss.com/products/seam/</tt> is
    * searched for as a classpath resource in the classloader which loaded the
  - * Hibernate classes.</li>
  + * Seam classes.</li>
    * <li>Any systemId URL using <tt>classpath</tt> as the scheme (i.e. starting
    * with <tt>classpath://</tt> is searched for as a classpath resource using first
    * the current thread context classloader and then the classloader which loaded
  - * the Hibernate classes.
  + * the Seam classes.
    * </ol>
    * <p/>
    * Any entity references which cannot be resolved in relation to the above
  @@ -32,21 +32,18 @@
   
      private static final LogProvider log = Logging.getLogProvider(DTDEntityResolver.class );
   
  -	private static final String HIBERNATE_NAMESPACE = "http://jboss.com/products/seam/";
  +	private static final String SEAM_NAMESPACE = "http://jboss.com/products/seam/";
   	private static final String USER_NAMESPACE = "classpath://";
   
   	public InputSource resolveEntity(String publicId, String systemId) {
   		if ( systemId != null ) {
   			log.debug( "trying to resolve system-id [" + systemId + "]" );
  -			if ( systemId.startsWith( HIBERNATE_NAMESPACE ) ) {
  -				log.debug( "recognized hibernate namespace; attempting to resolve on classpath under org/jboss/seam/" );
  -				String path = "org/jboss/seam/" + systemId.substring( HIBERNATE_NAMESPACE.length() );
  -				InputStream dtdStream = resolveInHibernateNamespace( path );
  +			if ( systemId.startsWith( SEAM_NAMESPACE) ) {
  +				log.debug( "recognized Seam namespace; attempting to resolve on classpath under org/jboss/seam/" );
  +				String path = "org/jboss/seam/" + systemId.substring( SEAM_NAMESPACE.length() );
  +				InputStream dtdStream = resolveInSeamNamespace( path );
   				if ( dtdStream == null ) {
   					log.debug( "unable to locate [" + systemId + "] on classpath" );
  -					if ( systemId.substring( HIBERNATE_NAMESPACE.length() ).indexOf( "2.0" ) > -1 ) {
  -						log.error( "Don't use old DTDs, read the Hibernate 3.x Migration Guide!" );
  -					}
   				}
   				else {
   					log.debug( "located [" + systemId + "] in classpath" );
  @@ -76,7 +73,7 @@
   		return null;
   	}
   
  -	protected InputStream resolveInHibernateNamespace(String path) {
  +	protected InputStream resolveInSeamNamespace(String path) {
   		return this.getClass().getClassLoader().getResourceAsStream( path );
   	}
   
  
  
  



More information about the jboss-cvs-commits mailing list