You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@velocity.apache.org by nb...@apache.org on 2010/01/11 21:15:32 UTC

svn commit: r898050 - in /velocity/engine/trunk/src/java/org/apache/velocity: app/Velocity.java runtime/RuntimeInstance.java runtime/RuntimeServices.java runtime/RuntimeSingleton.java runtime/resource/ResourceManager.java

Author: nbubna
Date: Mon Jan 11 20:15:31 2010
New Revision: 898050

URL: http://svn.apache.org/viewvc?rev=898050&view=rev
Log:
VELOCITY-751 fix incorrect 'throws Exception' stuff (thanks to Jarkko Viinamaki)

Modified:
    velocity/engine/trunk/src/java/org/apache/velocity/app/Velocity.java
    velocity/engine/trunk/src/java/org/apache/velocity/runtime/RuntimeInstance.java
    velocity/engine/trunk/src/java/org/apache/velocity/runtime/RuntimeServices.java
    velocity/engine/trunk/src/java/org/apache/velocity/runtime/RuntimeSingleton.java
    velocity/engine/trunk/src/java/org/apache/velocity/runtime/resource/ResourceManager.java

Modified: velocity/engine/trunk/src/java/org/apache/velocity/app/Velocity.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/app/Velocity.java?rev=898050&r1=898049&r2=898050&view=diff
==============================================================================
--- velocity/engine/trunk/src/java/org/apache/velocity/app/Velocity.java (original)
+++ velocity/engine/trunk/src/java/org/apache/velocity/app/Velocity.java Mon Jan 11 20:15:31 2010
@@ -91,8 +91,6 @@
      *  plus the properties in the passed in java.util.Properties object
      *
      *  @param p  Properties object containing initialization properties
-     * @throws Exception When an error during initialization occurs.
-     *
      */
     public static void init( Properties p )
     {
@@ -297,7 +295,6 @@
      * @throws ParseErrorException The template could not be parsed.
      * @throws MethodInvocationException A method on a context object could not be invoked.
      * @throws ResourceNotFoundException A referenced resource could not be loaded.
-     * @throws Exception Any other exception.
      */
     public static boolean mergeTemplate( String templateName,
                                          Context context, Writer writer )
@@ -321,7 +318,6 @@
      * @throws ParseErrorException The template could not be parsed.
      * @throws MethodInvocationException A method on a context object could not be invoked.
      * @throws ResourceNotFoundException A referenced resource could not be loaded.
-     * @throws Exception Any other exception.
      *
      * @since Velocity v1.1
      */
@@ -355,7 +351,6 @@
      *          from any available source.
      * @throws ParseErrorException if template cannot be parsed due
      *          to syntax (or other) error.
-     * @throws Exception if an error occurs in template initialization
      */
     public static Template getTemplate(String name)
         throws ResourceNotFoundException, ParseErrorException
@@ -374,7 +369,6 @@
      *          from any available source.
      * @throws ParseErrorException if template cannot be parsed due
      *          to syntax (or other) error.
-     * @throws Exception if an error occurs in template initialization
      *
      *  @since Velocity v1.1
      */

Modified: velocity/engine/trunk/src/java/org/apache/velocity/runtime/RuntimeInstance.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/runtime/RuntimeInstance.java?rev=898050&r1=898049&r2=898050&view=diff
==============================================================================
--- velocity/engine/trunk/src/java/org/apache/velocity/runtime/RuntimeInstance.java (original)
+++ velocity/engine/trunk/src/java/org/apache/velocity/runtime/RuntimeInstance.java Mon Jan 11 20:15:31 2010
@@ -246,7 +246,6 @@
      *   <li>Static Content Include System</li>
      *   <li>Velocimacro System</li>
      * </ul>
-     * @throws Exception When an error occured during initialization.
      */
     public synchronized void init()
     {
@@ -639,8 +638,7 @@
      * Initialize the Velocity Runtime with a Properties
      * object.
      *
-     * @param p
-     * @throws Exception When an error occurs during initialization.
+     * @param p Velocity properties for initialization
      */
     public void init(Properties p)
     {

Modified: velocity/engine/trunk/src/java/org/apache/velocity/runtime/RuntimeServices.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/runtime/RuntimeServices.java?rev=898050&r1=898049&r2=898050&view=diff
==============================================================================
--- velocity/engine/trunk/src/java/org/apache/velocity/runtime/RuntimeServices.java (original)
+++ velocity/engine/trunk/src/java/org/apache/velocity/runtime/RuntimeServices.java Mon Jan 11 20:15:31 2010
@@ -67,9 +67,8 @@
      *   <li>Static Content Include System</li>
      *   <li>Velocimacro System</li>
      * </ul>
-     * @throws Exception
      */
-    public void init() throws Exception;
+    public void init();
 
     /**
      * Allows an external system to set a property in
@@ -136,18 +135,16 @@
      * object.
      *
      * @param p
-     * @throws Exception
      */
-    public void init(Properties p) throws Exception;
+    public void init(Properties p);
 
     /**
      * Initialize the Velocity Runtime with the name of
      * ExtendedProperties object.
      *
      * @param configurationFile
-     * @throws Exception
      */
-    public void init(String configurationFile) throws Exception;
+    public void init(String configurationFile);
 
     /**
      * Wraps the String in a StringReader and passes it off to
@@ -292,7 +289,6 @@
      * @throws ResourceNotFoundException if template not found
      *          from any available source.
      * @throws ParseErrorException
-     * @throws Exception
      */
     public ContentResource getContent(String name)
         throws ResourceNotFoundException, ParseErrorException;
@@ -307,7 +303,6 @@
      * @throws ResourceNotFoundException if template not found
      *          from any available source.
      * @throws ParseErrorException
-     * @throws Exception
      */
     public ContentResource getContent( String name, String encoding )
         throws ResourceNotFoundException, ParseErrorException;

Modified: velocity/engine/trunk/src/java/org/apache/velocity/runtime/RuntimeSingleton.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/runtime/RuntimeSingleton.java?rev=898050&r1=898049&r2=898050&view=diff
==============================================================================
--- velocity/engine/trunk/src/java/org/apache/velocity/runtime/RuntimeSingleton.java (original)
+++ velocity/engine/trunk/src/java/org/apache/velocity/runtime/RuntimeSingleton.java Mon Jan 11 20:15:31 2010
@@ -309,8 +309,6 @@
      *          from any available source.
      * @throws ParseErrorException if template cannot be parsed due
      *          to syntax (or other) error.
-     * @throws Exception if an error occurs in template initialization
-     * @throws ParseErrorException When the template could not be parsed.
      * @see RuntimeInstance#getTemplate(String, String)
      */
     public static Template getTemplate(String name, String  encoding)

Modified: velocity/engine/trunk/src/java/org/apache/velocity/runtime/resource/ResourceManager.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/runtime/resource/ResourceManager.java?rev=898050&r1=898049&r2=898050&view=diff
==============================================================================
--- velocity/engine/trunk/src/java/org/apache/velocity/runtime/resource/ResourceManager.java (original)
+++ velocity/engine/trunk/src/java/org/apache/velocity/runtime/resource/ResourceManager.java Mon Jan 11 20:15:31 2010
@@ -64,7 +64,6 @@
      *          from any available source.
      * @throws ParseErrorException if template cannot be parsed due
      *          to syntax (or other) error.
-     * @throws Exception if a problem in parse
      */
     public Resource getResource(String resourceName, int resourceType, String encoding )
         throws ResourceNotFoundException, ParseErrorException;