commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject cvs commit: jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/parser XMLParser.java
Date Thu, 05 Sep 2002 16:42:47 GMT
jstrachan    2002/09/05 09:42:47

  Modified:    jelly/src/java/org/apache/commons/jelly/parser
                        XMLParser.java
  Log:
  Patch to avoid Mock Tags or new overloaded dynamic tag libraries being overridden in included
Jelly scripts
  
  Revision  Changes    Path
  1.28      +12 -7     jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/parser/XMLParser.java
  
  Index: XMLParser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/parser/XMLParser.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- XMLParser.java	1 Aug 2002 09:53:18 -0000	1.27
  +++ XMLParser.java	5 Sep 2002 16:42:47 -0000	1.28
  @@ -932,8 +932,13 @@
                   for (Iterator iter = properties.entrySet().iterator(); iter.hasNext();)
{
                       Map.Entry entry = (Map.Entry) iter.next();
                       String uri = (String) entry.getKey();
  -                    String className = (String) entry.getValue();
  -                    context.registerTagLibrary("jelly:" + uri, className);
  +                    String className = (String) entry.getValue();                    
  +                    String libraryURI = "jelly:" + uri;
  +                    
  +                    // don't overload any Mock Tags already
  +                    if ( context.getTagLibrary(libraryURI) == null ) {
  +                        context.registerTagLibrary(libraryURI, className);
  +                    }
                   }
               }
               catch (IOException e) {
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message