velocity-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nbu...@apache.org
Subject svn commit: r679918 - /velocity/engine/trunk/src/java/org/apache/velocity/runtime/ParserPoolImpl.java
Date Fri, 25 Jul 2008 22:54:07 GMT
Author: nbubna
Date: Fri Jul 25 15:54:07 2008
New Revision: 679918

URL: http://svn.apache.org/viewvc?rev=679918&view=rev
Log:
RuntimeInstance already creates missing parsers, no need to dupe that logic in ParserPool
implementations

Modified:
    velocity/engine/trunk/src/java/org/apache/velocity/runtime/ParserPoolImpl.java

Modified: velocity/engine/trunk/src/java/org/apache/velocity/runtime/ParserPoolImpl.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/runtime/ParserPoolImpl.java?rev=679918&r1=679917&r2=679918&view=diff
==============================================================================
--- velocity/engine/trunk/src/java/org/apache/velocity/runtime/ParserPoolImpl.java (original)
+++ velocity/engine/trunk/src/java/org/apache/velocity/runtime/ParserPoolImpl.java Fri Jul
25 15:54:07 2008
@@ -64,15 +64,7 @@
      */
     public Parser get()
     {
-        Parser parser = (Parser) pool.get();
-        if (parser == null)
-        {
-            rsvc.getLog().debug("Created new " +
-                    "parser (pool exhausted).  Consider " +
-                    "increasing pool size.");
-            parser = rsvc.createNewParser();
-        }
-        return parser;
+        return (Parser) pool.get();
     }
 
     /**



Mime
View raw message