Author: byron
Date: Mon Dec 29 01:06:57 2008
New Revision: 729843
URL: http://svn.apache.org/viewvc?rev=729843&view=rev
Log:
VELOCITY-659 Remove throwing java.lang.Exception from method signatures
Modified:
velocity/engine/trunk/src/java/org/apache/velocity/Template.java
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/RuntimeSingleton.java
velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/AvalonLogChute.java
velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/CommonsLogLogChute.java
velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/HoldingLogChute.java
velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/Log4JLogChute.java
velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogChute.java
velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogChuteSystem.java
velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogManager.java
velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogSystem.java
velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/NullLogChute.java
velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/ServletLogChute.java
velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/SystemLogChute.java
velocity/engine/trunk/src/java/org/apache/velocity/runtime/resource/Resource.java
velocity/engine/trunk/src/java/org/apache/velocity/runtime/resource/ResourceManager.java
velocity/engine/trunk/src/java/org/apache/velocity/runtime/resource/ResourceManagerImpl.java
velocity/engine/trunk/src/java/org/apache/velocity/runtime/resource/loader/ResourceLoaderFactory.java
velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/AbstractChainableUberspector.java
velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/LinkingUberspector.java
velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/SecureUberspector.java
velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/Uberspect.java
velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/UberspectImpl.java
velocity/engine/trunk/src/test/org/apache/velocity/test/misc/TestLogChute.java
velocity/engine/trunk/src/test/org/apache/velocity/test/misc/UberspectTestImpl.java
velocity/engine/trunk/src/test/org/apache/velocity/test/util/introspection/ChainedUberspectorsTestCase.java
Modified: velocity/engine/trunk/src/java/org/apache/velocity/Template.java
URL:
http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/Template.java?rev=729843&r1=729842&r2=729843&view=diff
==============================================================================
--- velocity/engine/trunk/src/java/org/apache/velocity/Template.java (original)
+++ velocity/engine/trunk/src/java/org/apache/velocity/Template.java Mon Dec 29
01:06:57 2008
@@ -84,7 +84,7 @@
* @throws IOException problem reading input stream
*/
public boolean process()
- throws ResourceNotFoundException, ParseErrorException, IOException
+ throws ResourceNotFoundException, ParseErrorException
{
data = null;
InputStream is = null;
@@ -151,14 +151,28 @@
*/
catch( RuntimeException e )
{
- throw new RuntimeException("Exception thrown processing
Template "+getName(), e);
+ errorCondition = new VelocityException("Exception thrown
processing Template "
+ +getName(), e);
+ throw errorCondition;
}
finally
{
/*
* Make sure to close the inputstream when we are done.
*/
- is.close();
+ try
+ {
+ is.close();
+ }
+ catch(IOException e)
+ {
+ // If we are already throwing an exception then we want
the original
+ // exception to be continued to be thrown, otherwise,
throw a new Exception.
+ if (errorCondition == null)
+ {
+ throw new VelocityException(e);
+ }
+ }
}
}
else
@@ -166,7 +180,6 @@
/*
* is == null, therefore we have some kind of file issue
*/
-
errorCondition = new ResourceNotFoundException("Unknown resource
error for resource " + name );
throw errorCondition;
}
@@ -227,10 +240,9 @@
* @throws ParseErrorException if template cannot be parsed due
* to syntax (or other) error.
* @throws MethodInvocationException When a method on a referenced object
in the context could not invoked.
- * @throws IOException Might be thrown while rendering.
*/
public void merge( Context context, Writer writer)
- throws ResourceNotFoundException, ParseErrorException,
MethodInvocationException, IOException
+ throws ResourceNotFoundException, ParseErrorException,
MethodInvocationException
{
merge(context, writer, null);
}
@@ -248,11 +260,10 @@
* @throws ParseErrorException if template cannot be parsed due
* to syntax (or other) error.
* @throws MethodInvocationException When a method on a referenced object
in the context could not invoked.
- * @throws IOException Might be thrown while rendering.
* @since 1.6
*/
public void merge( Context context, Writer writer, List macroLibraries)
- throws ResourceNotFoundException, ParseErrorException,
MethodInvocationException, IOException
+ throws ResourceNotFoundException, ParseErrorException,
MethodInvocationException
{
/*
* we shouldn't have to do this, as if there is an error condition,
@@ -327,6 +338,10 @@
( (SimpleNode) data ).render( ica, writer);
}
+ catch (IOException e)
+ {
+ throw new VelocityException("IO Error rendering template '"+
name + "'", e);
+ }
finally
{
/*
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=729843&r1=729842&r2=729843&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
Dec 29 01:06:57 2008
@@ -70,11 +70,8 @@
/**
* initialize the Velocity runtime engine, using the default
* properties of the Velocity distribution
- *
- * @throws Exception When an error during initialization occurs.
*/
public static void init()
- throws Exception
{
RuntimeSingleton.init();
}
@@ -85,10 +82,8 @@
*
* @param propsFilename file containing properties to use to initialize
* the Velocity runtime
- * @throws Exception When an error during initialization occurs.
*/
public static void init( String propsFilename )
- throws Exception
{
RuntimeSingleton.init(propsFilename);
}
@@ -102,7 +97,6 @@
*
*/
public static void init( Properties p )
- throws Exception
{
RuntimeSingleton.init( p );
}
@@ -321,7 +315,7 @@
*/
public static boolean mergeTemplate( String templateName,
Context context, Writer writer )
- throws ResourceNotFoundException, ParseErrorException,
MethodInvocationException, Exception
+ throws ResourceNotFoundException, ParseErrorException,
MethodInvocationException
{
return mergeTemplate( templateName,
RuntimeSingleton.getString(INPUT_ENCODING,ENCODING_DEFAULT),
context, writer );
@@ -347,7 +341,7 @@
*/
public static boolean mergeTemplate( String templateName, String encoding,
Context context, Writer writer )
- throws ResourceNotFoundException, ParseErrorException,
MethodInvocationException, Exception
+ throws ResourceNotFoundException, ParseErrorException,
MethodInvocationException
{
Template template = RuntimeSingleton.getTemplate(templateName,
encoding);
@@ -378,7 +372,7 @@
* @throws Exception if an error occurs in template initialization
*/
public static Template getTemplate(String name)
- throws ResourceNotFoundException, ParseErrorException, Exception
+ throws ResourceNotFoundException, ParseErrorException
{
return RuntimeSingleton.getTemplate( name );
}
@@ -399,7 +393,7 @@
* @since Velocity v1.1
*/
public static Template getTemplate(String name, String encoding)
- throws ResourceNotFoundException, ParseErrorException, Exception
+ throws ResourceNotFoundException, ParseErrorException
{
return RuntimeSingleton.getTemplate( name, encoding );
}
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=729843&r1=729842&r2=729843&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 Dec 29 01:06:57 2008
@@ -236,7 +236,6 @@
* @throws Exception When an error occured during initialization.
*/
public synchronized void init()
- throws Exception
{
if (!initialized && !initializing)
{
@@ -302,7 +301,6 @@
* instantiates an instance.
*/
private void initializeIntrospection()
- throws Exception
{
String[] uberspectors =
configuration.getStringArray(RuntimeConstants.UBERSPECT_CLASSNAME);
for (int i=0; i <uberspectors.length;i++)
@@ -319,7 +317,15 @@
String err = "The specified class for Uberspect (" + rm
+ ") does not exist or is not accessible to the current
classloader.";
log.error(err);
- throw new Exception(err);
+ throw new VelocityException(err, cnfe);
+ }
+ catch (InstantiationException ie)
+ {
+ throw new VelocityException("Could not instantiate class '" + rm
+ "'", ie);
+ }
+ catch (IllegalAccessException ae)
+ {
+ throw new VelocityException("Cannot access class '" + rm + "'",
ae);
}
if (!(o instanceof Uberspect))
@@ -329,7 +335,7 @@
+ "; Velocity is not initialized correctly.";
log.error(err);
- throw new Exception(err);
+ throw new VelocityException(err);
}
Uberspect u = (Uberspect)o;
@@ -377,7 +383,7 @@
+ " information is correct.";
log.error(err);
- throw new Exception(err);
+ throw new VelocityException(err);
}
}
@@ -583,7 +589,7 @@
* @param p
* @throws Exception When an error occurs during initialization.
*/
- public void init(Properties p) throws Exception
+ public void init(Properties p)
{
setProperties(ExtendedProperties.convertProperties(p));
init();
@@ -606,17 +612,22 @@
* ExtendedProperties object.
*
* @param configurationFile
- * @throws Exception When an error occurs during initialization.
*/
public void init(String configurationFile)
- throws Exception
{
- setProperties(new ExtendedProperties(configurationFile));
+ try
+ {
+ setProperties(new ExtendedProperties(configurationFile));
+ }
+ catch (IOException e)
+ {
+ throw new VelocityException("Error reading properties from '"
+ + configurationFile + "'", e);
+ }
init();
}
private void initializeResourceManager()
- throws Exception
{
/*
* Which resource manager?
@@ -643,7 +654,15 @@
String err = "The specified class for ResourceManager (" + rm
+ ") does not exist or is not accessible to the current
classloader.";
log.error(err);
- throw new Exception(err);
+ throw new VelocityException(err, cnfe);
+ }
+ catch (InstantiationException ie)
+ {
+ throw new VelocityException("Could not instantiate class '" + rm
+ "'", ie);
+ }
+ catch (IllegalAccessException ae)
+ {
+ throw new VelocityException("Cannot access class '" + rm + "'",
ae);
}
if (!(o instanceof ResourceManager))
@@ -653,7 +672,7 @@
+ "; Velocity is not initialized correctly.";
log.error(err);
- throw new Exception(err);
+ throw new VelocityException(err);
}
resourceManager = (ResourceManager) o;
@@ -671,12 +690,11 @@
+ " information is correct.";
log.error(err);
- throw new Exception( err );
+ throw new VelocityException( err );
}
}
private void initializeEventHandlers()
- throws Exception
{
eventCartridge = new EventCartridge();
@@ -746,12 +764,12 @@
}
private EventHandler initializeSpecificEventHandler(String classname,
String paramName, Class EventHandlerInterface)
- throws Exception
{
if ( classname != null && classname.length() > 0)
{
Object o = null;
- try {
+ try
+ {
o = ClassUtils.getNewInstance(classname);
}
catch (ClassNotFoundException cnfe )
@@ -760,7 +778,15 @@
+ paramName + " (" + classname
+ ") does not exist or is not accessible to the current
classloader.";
log.error(err);
- throw new Exception(err);
+ throw new VelocityException(err, cnfe);
+ }
+ catch (InstantiationException ie)
+ {
+ throw new VelocityException("Could not instantiate class '" +
classname + "'", ie);
+ }
+ catch (IllegalAccessException ae)
+ {
+ throw new VelocityException("Cannot access class '" + classname
+ "'", ae);
}
if (!EventHandlerInterface.isAssignableFrom(EventHandlerInterface))
@@ -771,7 +797,7 @@
+ "; Velocity is not initialized correctly.";
log.error(err);
- throw new Exception(err);
+ throw new VelocityException(err);
}
EventHandler ev = (EventHandler) o;
@@ -785,10 +811,8 @@
/**
* Initialize the Velocity logging system.
- *
- * @throws Exception
*/
- private void initializeLog() throws Exception
+ private void initializeLog()
{
// since the Log we started with was just placeholding,
// let's update it with the real LogChute settings.
@@ -802,11 +826,8 @@
* directives to be initialized are listed in
* the RUNTIME_DEFAULT_DIRECTIVES properties
* file.
- *
- * @throws Exception
*/
private void initializeDirectives()
- throws Exception
{
/*
* Initialize the runtime directive table.
@@ -829,7 +850,7 @@
if (inputStream == null)
{
- throw new Exception("Error loading directive.properties! " +
+ throw new VelocityException("Error loading
directive.properties! " +
"Something is very wrong if these
properties " +
"aren't being located. Either your
Velocity " +
"distribution is incomplete or your
Velocity " +
@@ -962,7 +983,7 @@
/**
* Initializes the Velocity parser pool.
*/
- private void initializeParserPool() throws Exception
+ private void initializeParserPool()
{
/*
* Which parser pool?
@@ -989,7 +1010,15 @@
+ pp
+ ") does not exist (or is not accessible to the current
classloader.";
log.error(err);
- throw new Exception(err);
+ throw new VelocityException(err, cnfe);
+ }
+ catch (InstantiationException ie)
+ {
+ throw new VelocityException("Could not instantiate class '" + pp
+ "'", ie);
+ }
+ catch (IllegalAccessException ae)
+ {
+ throw new VelocityException("Cannot access class '" + pp + "'",
ae);
}
if (!(o instanceof ParserPool))
@@ -999,7 +1028,7 @@
+ " Velocity not initialized correctly.";
log.error(err);
- throw new Exception(err);
+ throw new VelocityException(err);
}
parserPool = (ParserPool) o;
@@ -1017,7 +1046,7 @@
+ " information is correct.";
log.error(err);
- throw new Exception( err );
+ throw new VelocityException( err );
}
}
@@ -1372,10 +1401,9 @@
* 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 Template getTemplate(String name)
- throws ResourceNotFoundException, ParseErrorException, Exception
+ throws ResourceNotFoundException, ParseErrorException
{
return getTemplate(name, getDefaultEncoding());
}
@@ -1390,10 +1418,9 @@
* 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 Template getTemplate(String name, String encoding)
- throws ResourceNotFoundException, ParseErrorException, Exception
+ throws ResourceNotFoundException, ParseErrorException
{
requireInitialization();
@@ -1412,10 +1439,9 @@
* @throws ResourceNotFoundException if template not found
* from any available source.
* @throws ParseErrorException When the template could not be parsed.
- * @throws Exception Any other error.
*/
public ContentResource getContent(String name)
- throws ResourceNotFoundException, ParseErrorException, Exception
+ throws ResourceNotFoundException, ParseErrorException
{
/*
* the encoding is irrelvant as we don't do any converstion
@@ -1435,10 +1461,9 @@
* @throws ResourceNotFoundException if template not found
* from any available source.
* @throws ParseErrorException When the template could not be parsed.
- * @throws Exception Any other error.
*/
public ContentResource getContent(String name, String encoding)
- throws ResourceNotFoundException, ParseErrorException, Exception
+ throws ResourceNotFoundException, ParseErrorException
{
requireInitialization();
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=729843&r1=729842&r2=729843&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 Dec 29 01:06:57 2008
@@ -105,11 +105,9 @@
* <li>Static Content Include System</li>
* <li>Velocimacro System</li>
* </ul>
- * @throws Exception When an error occured during initialization.
* @see RuntimeInstance#init()
*/
public synchronized static void init()
- throws Exception
{
ri.init();
}
@@ -221,10 +219,9 @@
* object.
*
* @param p
- * @throws Exception When an error occurs during initialization.
* @see RuntimeInstance#init(Properties)
*/
- public static void init(Properties p) throws Exception
+ public static void init(Properties p)
{
ri.init(p);
}
@@ -234,11 +231,9 @@
* ExtendedProperties object.
*
* @param configurationFile
- * @throws Exception When an error occurs during initialization.
* @see RuntimeInstance#init(String)
*/
public static void init(String configurationFile)
- throws Exception
{
ri.init( configurationFile );
}
@@ -296,11 +291,10 @@
* 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
* @see RuntimeInstance#getTemplate(String)
*/
public static Template getTemplate(String name)
- throws ResourceNotFoundException, ParseErrorException, Exception
+ throws ResourceNotFoundException, ParseErrorException
{
return ri.getTemplate( name );
}
@@ -317,11 +311,10 @@
* to syntax (or other) error.
* @throws Exception if an error occurs in template initialization
* @throws ParseErrorException When the template could not be parsed.
- * @throws Exception Any other error.
* @see RuntimeInstance#getTemplate(String, String)
*/
public static Template getTemplate(String name, String encoding)
- throws ResourceNotFoundException, ParseErrorException, Exception
+ throws ResourceNotFoundException, ParseErrorException
{
return ri.getTemplate( name, encoding );
}
@@ -336,11 +329,10 @@
* @throws ResourceNotFoundException if template not found
* from any available source.
* @throws ParseErrorException When the template could not be parsed.
- * @throws Exception Any other error.
* @see RuntimeInstance#getContent(String)
*/
public static ContentResource getContent(String name)
- throws ResourceNotFoundException, ParseErrorException, Exception
+ throws ResourceNotFoundException, ParseErrorException
{
return ri.getContent( name );
}
@@ -355,11 +347,10 @@
* @throws ResourceNotFoundException if template not found
* from any available source.
* @throws ParseErrorException When the template could not be parsed.
- * @throws Exception Any other error.
* @see RuntimeInstance#getContent(String, String)
*/
public static ContentResource getContent( String name, String encoding )
- throws ResourceNotFoundException, ParseErrorException, Exception
+ throws ResourceNotFoundException, ParseErrorException
{
return ri.getContent( name, encoding );
}
Modified:
velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/AvalonLogChute.java
URL:
http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/AvalonLogChute.java?rev=729843&r1=729842&r2=729843&view=diff
==============================================================================
---
velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/AvalonLogChute.java
(original)
+++
velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/AvalonLogChute.java
Mon Dec 29 01:06:57 2008
@@ -30,6 +30,7 @@
import org.apache.log.Logger;
import org.apache.log.Priority;
import org.apache.log.output.io.FileTarget;
+import org.apache.velocity.exception.VelocityException;
import org.apache.velocity.runtime.RuntimeConstants;
import org.apache.velocity.runtime.RuntimeServices;
@@ -67,7 +68,7 @@
/**
* @see
org.apache.velocity.runtime.log.LogChute#init(org.apache.velocity.runtime.RuntimeServices)
*/
- public void init(RuntimeServices rs) throws Exception
+ public void init(RuntimeServices rs)
{
this.rsvc = rs;
@@ -92,7 +93,7 @@
}
// creates a file target using the specified file name
- private void initTarget(final String file, final RuntimeServices rsvc)
throws Exception
+ private void initTarget(final String file, final RuntimeServices rsvc)
{
try
{
@@ -116,7 +117,7 @@
catch (IOException ioe)
{
rsvc.getLog().error("Unable to create log file for
AvalonLogChute", ioe);
- throw new Exception("Error configuring AvalonLogChute : " + ioe);
+ throw new VelocityException("Error configuring AvalonLogChute : "
+ ioe, ioe);
}
}
Modified:
velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/CommonsLogLogChute.java
URL:
http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/CommonsLogLogChute.java?rev=729843&r1=729842&r2=729843&view=diff
==============================================================================
---
velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/CommonsLogLogChute.java
(original)
+++
velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/CommonsLogLogChute.java
Mon Dec 29 01:06:57 2008
@@ -63,7 +63,7 @@
/********** LogChute methods *************/
- public void init(RuntimeServices rs) throws Exception
+ public void init(RuntimeServices rs)
{
String name =
(String)rs.getProperty(LOGCHUTE_COMMONS_LOG_NAME);
Modified:
velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/HoldingLogChute.java
URL:
http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/HoldingLogChute.java?rev=729843&r1=729842&r2=729843&view=diff
==============================================================================
---
velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/HoldingLogChute.java
(original)
+++
velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/HoldingLogChute.java
Mon Dec 29 01:06:57 2008
@@ -42,7 +42,7 @@
/**
* @see
org.apache.velocity.runtime.log.LogChute#init(org.apache.velocity.runtime.RuntimeServices)
*/
- public void init(RuntimeServices rs) throws Exception
+ public void init(RuntimeServices rs)
{
}
Modified:
velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/Log4JLogChute.java
URL:
http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/Log4JLogChute.java?rev=729843&r1=729842&r2=729843&view=diff
==============================================================================
---
velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/Log4JLogChute.java
(original)
+++
velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/Log4JLogChute.java
Mon Dec 29 01:06:57 2008
@@ -59,7 +59,7 @@
/**
* @see
org.apache.velocity.runtime.log.LogChute#init(org.apache.velocity.runtime.RuntimeServices)
*/
- public void init(RuntimeServices rs) throws Exception
+ public void init(RuntimeServices rs)
{
rsvc = rs;
@@ -109,7 +109,7 @@
}
// This tries to create a file appender for the specified file name.
- private void initAppender(String file) throws Exception
+ private void initAppender(String file)
{
try
{
Modified:
velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogChute.java
URL:
http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogChute.java?rev=729843&r1=729842&r2=729843&view=diff
==============================================================================
---
velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogChute.java
(original)
+++
velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogChute.java
Mon Dec 29 01:06:57 2008
@@ -68,7 +68,7 @@
* @param rs
* @throws Exception
*/
- void init(RuntimeServices rs) throws Exception;
+ void init(RuntimeServices rs);
/**
* Send a log message from Velocity.
Modified:
velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogChuteSystem.java
URL:
http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogChuteSystem.java?rev=729843&r1=729842&r2=729843&view=diff
==============================================================================
---
velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogChuteSystem.java
(original)
+++
velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogChuteSystem.java
Mon Dec 29 01:06:57 2008
@@ -48,7 +48,7 @@
/**
* @see
org.apache.velocity.runtime.log.LogChute#init(org.apache.velocity.runtime.RuntimeServices)
*/
- public void init(RuntimeServices rs) throws Exception
+ public void init(RuntimeServices rs)
{
logSystem.init(rs);
}
Modified:
velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogManager.java
URL:
http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogManager.java?rev=729843&r1=729842&r2=729843&view=diff
==============================================================================
---
velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogManager.java
(original)
+++
velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogManager.java
Mon Dec 29 01:06:57 2008
@@ -63,7 +63,7 @@
{
// Creates a new logging system or returns an existing one
// specified by the application.
- private static LogChute createLogChute(RuntimeServices rsvc) throws
Exception
+ private static LogChute createLogChute(RuntimeServices rsvc)
{
Log log = rsvc.getLog();
@@ -246,10 +246,9 @@
* settings determined by the RuntimeServices.
* @param log
* @param rsvc
- * @throws Exception
* @since 1.5
*/
- public static void updateLog(Log log, RuntimeServices rsvc) throws
Exception
+ public static void updateLog(Log log, RuntimeServices rsvc)
{
// create a new LogChute using the RuntimeServices
LogChute newLogChute = createLogChute(rsvc);
Modified:
velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogSystem.java
URL:
http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogSystem.java?rev=729843&r1=729842&r2=729843&view=diff
==============================================================================
---
velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogSystem.java
(original)
+++
velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogSystem.java
Mon Dec 29 01:06:57 2008
@@ -61,7 +61,7 @@
* @param rs
* @throws Exception
*/
- public void init( RuntimeServices rs ) throws Exception;
+ public void init( RuntimeServices rs );
/**
* @param level
Modified:
velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/NullLogChute.java
URL:
http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/NullLogChute.java?rev=729843&r1=729842&r2=729843&view=diff
==============================================================================
---
velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/NullLogChute.java
(original)
+++
velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/NullLogChute.java
Mon Dec 29 01:06:57 2008
@@ -35,7 +35,7 @@
/**
* @see
org.apache.velocity.runtime.log.LogChute#init(org.apache.velocity.runtime.RuntimeServices)
*/
- public void init(RuntimeServices rs) throws Exception
+ public void init(RuntimeServices rs)
{
}
Modified:
velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/ServletLogChute.java
URL:
http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/ServletLogChute.java?rev=729843&r1=729842&r2=729843&view=diff
==============================================================================
---
velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/ServletLogChute.java
(original)
+++
velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/ServletLogChute.java
Mon Dec 29 01:06:57 2008
@@ -65,7 +65,7 @@
* @throws IllegalStateException if the ServletContext is not available
* in the application attributes under the appropriate key.
*/
- public void init(RuntimeServices rs) throws Exception
+ public void init(RuntimeServices rs)
{
Object obj =
rs.getApplicationAttribute(ServletContext.class.getName());
if (obj == null)
Modified:
velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/SystemLogChute.java
URL:
http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/SystemLogChute.java?rev=729843&r1=729842&r2=729843&view=diff
==============================================================================
---
velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/SystemLogChute.java
(original)
+++
velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/SystemLogChute.java
Mon Dec 29 01:06:57 2008
@@ -40,7 +40,7 @@
private int enabled = WARN_ID;
private int errLevel = TRACE_ID;
- public void init(RuntimeServices rs) throws Exception
+ public void init(RuntimeServices rs)
{
// look for a level config property
String level = (String)rs.getProperty(RUNTIME_LOG_LEVEL_KEY);
Modified:
velocity/engine/trunk/src/java/org/apache/velocity/runtime/resource/Resource.java
URL:
http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/runtime/resource/Resource.java?rev=729843&r1=729842&r2=729843&view=diff
==============================================================================
---
velocity/engine/trunk/src/java/org/apache/velocity/runtime/resource/Resource.java
(original)
+++
velocity/engine/trunk/src/java/org/apache/velocity/runtime/resource/Resource.java
Mon Dec 29 01:06:57 2008
@@ -117,10 +117,9 @@
* @exception ResourceNotFoundException Similar in semantics as
* returning <code>false</code>.
* @throws ParseErrorException
- * @throws Exception
*/
public abstract boolean process()
- throws ResourceNotFoundException, ParseErrorException, Exception;
+ throws ResourceNotFoundException, ParseErrorException;
/**
* @return True if source has been modified.
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=729843&r1=729842&r2=729843&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 Dec 29 01:06:57 2008
@@ -48,9 +48,8 @@
/**
* Initialize the ResourceManager.
* @param rs
- * @throws Exception
*/
- public void initialize( RuntimeServices rs ) throws Exception;
+ public void initialize( RuntimeServices rs );
/**
* Gets the named resource. Returned class type corresponds to specified
type
@@ -68,7 +67,7 @@
* @throws Exception if a problem in parse
*/
public Resource getResource(String resourceName, int resourceType, String
encoding )
- throws ResourceNotFoundException, ParseErrorException, Exception;
+ throws ResourceNotFoundException, ParseErrorException;
/**
* Determines is a template exists, and returns name of the loader that
Modified:
velocity/engine/trunk/src/java/org/apache/velocity/runtime/resource/ResourceManagerImpl.java
URL:
http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/runtime/resource/ResourceManagerImpl.java?rev=729843&r1=729842&r2=729843&view=diff
==============================================================================
---
velocity/engine/trunk/src/java/org/apache/velocity/runtime/resource/ResourceManagerImpl.java
(original)
+++
velocity/engine/trunk/src/java/org/apache/velocity/runtime/resource/ResourceManagerImpl.java
Mon Dec 29 01:06:57 2008
@@ -19,8 +19,6 @@
* under the License.
*/
-import java.io.IOException;
-import java.io.InputStream;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
@@ -29,6 +27,7 @@
import org.apache.commons.collections.ExtendedProperties;
import org.apache.velocity.exception.ParseErrorException;
import org.apache.velocity.exception.ResourceNotFoundException;
+import org.apache.velocity.exception.VelocityException;
import org.apache.velocity.runtime.RuntimeConstants;
import org.apache.velocity.runtime.RuntimeServices;
import org.apache.velocity.runtime.log.Log;
@@ -93,11 +92,8 @@
* Initialize the ResourceManager.
*
* @param rsvc The Runtime Services object which is associated with this
Resource Manager.
- *
- * @throws Exception
*/
public synchronized void initialize(final RuntimeServices rsvc)
- throws Exception
{
if (isInit)
{
@@ -140,7 +136,7 @@
".resource.loader.class' specification in
configuration." +
" This is a critical value. Please adjust
configuration.";
log.error(msg);
- throw new Exception(msg);
+ throw new VelocityException(msg);
}
resourceLoader.commonInit(rsvc, configuration);
@@ -164,7 +160,6 @@
if (org.apache.commons.lang.StringUtils.isNotEmpty(cacheClassName))
{
-
try
{
cacheObject = ClassUtils.getNewInstance(cacheClassName);
@@ -174,7 +169,17 @@
String msg = "The specified class for ResourceCache (" +
cacheClassName +
") does not exist or is not accessible to the
current classloader.";
log.error(msg, cnfe);
- throw cnfe;
+ throw new VelocityException(msg, cnfe);
+ }
+ catch (IllegalAccessException ae)
+ {
+ throw new VelocityException("Could not access class '"
+ + cacheClassName + "'", ae);
+ }
+ catch (InstantiationException ie)
+ {
+ throw new VelocityException("Could not instantiate class '"
+ + cacheClassName + "'", ie);
}
if (!(cacheObject instanceof ResourceCache))
@@ -270,12 +275,10 @@
*
* @throws ResourceNotFoundException if template not found 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(final String resourceName, final int
resourceType, final String encoding)
throws ResourceNotFoundException,
- ParseErrorException,
- Exception
+ ParseErrorException
{
/*
* Check to see if the resource was placed in the cache.
@@ -338,11 +341,6 @@
log.error("ResourceManager.getResource() exception", re);
throw re;
}
- catch (Exception e)
- {
- log.error("ResourceManager.getResource() exception", e);
- throw e;
- }
}
else
{
@@ -372,12 +370,7 @@
catch (RuntimeException re)
{
log.error("ResourceManager.getResource() load exception", re);
- throw re;
- }
- catch (Exception e)
- {
- log.error("ResourceManager.getResource() exception new", e);
- throw e;
+ throw re;
}
}
@@ -408,12 +401,10 @@
*
* @throws ResourceNotFoundException if template not found from any
available source.
* @throws ParseErrorException if template cannot be parsed due to
syntax (or other) error.
- * @throws Exception if a problem in parse
*/
protected Resource loadResource(String resourceName, int resourceType,
String encoding)
throws ResourceNotFoundException,
- ParseErrorException,
- Exception
+ ParseErrorException
{
Resource resource = createResource(resourceName, resourceType);
resource.setRuntimeServices(rsvc);
@@ -504,12 +495,9 @@
*
* @throws ResourceNotFoundException if template not found from current
source for this Resource
* @throws ParseErrorException if template cannot be parsed due to
syntax (or other) error.
- * @throws Exception if a problem in parse
*/
protected Resource refreshResource(Resource resource, final String
encoding)
- throws ResourceNotFoundException,
- ParseErrorException,
- Exception
+ throws ResourceNotFoundException, ParseErrorException
{
/*
* The resource knows whether it needs to be checked
Modified:
velocity/engine/trunk/src/java/org/apache/velocity/runtime/resource/loader/ResourceLoaderFactory.java
URL:
http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/runtime/resource/loader/ResourceLoaderFactory.java?rev=729843&r1=729842&r2=729843&view=diff
==============================================================================
---
velocity/engine/trunk/src/java/org/apache/velocity/runtime/resource/loader/ResourceLoaderFactory.java
(original)
+++
velocity/engine/trunk/src/java/org/apache/velocity/runtime/resource/loader/ResourceLoaderFactory.java
Mon Dec 29 01:06:57 2008
@@ -37,10 +37,8 @@
* @param rs
* @param loaderClassName
* @return TemplateLoader
- * @throws Exception
*/
public static ResourceLoader getLoader(RuntimeServices rs, String
loaderClassName)
- throws Exception
{
ResourceLoader loader = null;
Modified:
velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/AbstractChainableUberspector.java
URL:
http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/AbstractChainableUberspector.java?rev=729843&r1=729842&r2=729843&view=diff
==============================================================================
---
velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/AbstractChainableUberspector.java
(original)
+++
velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/AbstractChainableUberspector.java
Mon Dec 29 01:06:57 2008
@@ -51,7 +51,7 @@
* @see org.apache.velocity.util.introspection.Uberspect#init()
*/
//@Override
- public void init() throws Exception
+ public void init()
{
if (this.inner != null) {
this.inner.init();
@@ -66,7 +66,7 @@
*/
//@SuppressWarnings("unchecked")
//@Override
- public Iterator getIterator(Object obj, Info i) throws Exception
+ public Iterator getIterator(Object obj, Info i)
{
return (this.inner != null) ? this.inner.getIterator(obj, i) : null;
}
@@ -78,7 +78,7 @@
* java.lang.Object[], org.apache.velocity.util.introspection.Info)
*/
//@Override
- public VelMethod getMethod(Object obj, String methodName, Object[] args,
Info i) throws Exception
+ public VelMethod getMethod(Object obj, String methodName, Object[] args,
Info i)
{
return (this.inner != null) ? this.inner.getMethod(obj, methodName,
args, i) : null;
}
@@ -90,7 +90,7 @@
* org.apache.velocity.util.introspection.Info)
*/
//@Override
- public VelPropertyGet getPropertyGet(Object obj, String identifier, Info
i) throws Exception
+ public VelPropertyGet getPropertyGet(Object obj, String identifier, Info i)
{
return (this.inner != null) ? this.inner.getPropertyGet(obj,
identifier, i) : null;
}
@@ -102,7 +102,7 @@
* java.lang.Object, org.apache.velocity.util.introspection.Info)
*/
//@Override
- public VelPropertySet getPropertySet(Object obj, String identifier, Object
arg, Info i) throws Exception
+ public VelPropertySet getPropertySet(Object obj, String identifier, Object
arg, Info i)
{
return (this.inner != null) ? this.inner.getPropertySet(obj,
identifier, arg, i) : null;
}
Modified:
velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/LinkingUberspector.java
URL:
http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/LinkingUberspector.java?rev=729843&r1=729842&r2=729843&view=diff
==============================================================================
---
velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/LinkingUberspector.java
(original)
+++
velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/LinkingUberspector.java
Mon Dec 29 01:06:57 2008
@@ -59,7 +59,7 @@
* @see org.apache.velocity.util.introspection.Uberspect#init()
*/
//@Override
- public void init() throws Exception
+ public void init()
{
leftUberspect.init();
rightUberspect.init();
@@ -73,7 +73,7 @@
*/
//@SuppressWarnings("unchecked")
//@Override
- public Iterator getIterator(Object obj, Info i) throws Exception
+ public Iterator getIterator(Object obj, Info i)
{
Iterator it = leftUberspect.getIterator(obj,i);
return it != null ? it : rightUberspect.getIterator(obj,i);
@@ -86,7 +86,7 @@
* java.lang.Object[], org.apache.velocity.util.introspection.Info)
*/
//@Override
- public VelMethod getMethod(Object obj, String methodName, Object[] args,
Info i) throws Exception
+ public VelMethod getMethod(Object obj, String methodName, Object[] args,
Info i)
{
VelMethod method = leftUberspect.getMethod(obj,methodName,args,i);
return method != null ? method :
rightUberspect.getMethod(obj,methodName,args,i);
@@ -99,7 +99,7 @@
* org.apache.velocity.util.introspection.Info)
*/
//@Override
- public VelPropertyGet getPropertyGet(Object obj, String identifier, Info
i) throws Exception
+ public VelPropertyGet getPropertyGet(Object obj, String identifier, Info i)
{
VelPropertyGet getter = leftUberspect.getPropertyGet(obj,identifier,i);
return getter != null ? getter :
rightUberspect.getPropertyGet(obj,identifier,i);
@@ -112,7 +112,7 @@
* java.lang.Object, org.apache.velocity.util.introspection.Info)
*/
//@Override
- public VelPropertySet getPropertySet(Object obj, String identifier, Object
arg, Info i) throws Exception
+ public VelPropertySet getPropertySet(Object obj, String identifier, Object
arg, Info i)
{
VelPropertySet setter =
leftUberspect.getPropertySet(obj,identifier,arg,i);
return setter != null ? setter :
rightUberspect.getPropertySet(obj,identifier,arg,i);
Modified:
velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/SecureUberspector.java
URL:
http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/SecureUberspector.java?rev=729843&r1=729842&r2=729843&view=diff
==============================================================================
---
velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/SecureUberspector.java
(original)
+++
velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/SecureUberspector.java
Mon Dec 29 01:06:57 2008
@@ -72,10 +72,8 @@
* @param obj object to iterate over
* @param i line, column, template info
* @return Iterator for object
- * @throws Exception
*/
public Iterator getIterator(Object obj, Info i)
- throws Exception
{
if (obj != null)
{
Modified:
velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/Uberspect.java
URL:
http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/Uberspect.java?rev=729843&r1=729842&r2=729843&view=diff
==============================================================================
---
velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/Uberspect.java
(original)
+++
velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/Uberspect.java
Mon Dec 29 01:06:57 2008
@@ -32,18 +32,16 @@
{
/**
* Initializer - will be called before use
- * @throws Exception
*/
- public void init() throws Exception;
+ public void init();
/**
* To support iteratives - #foreach()
* @param obj
* @param info
* @return An Iterator.
- * @throws Exception
*/
- public Iterator getIterator(Object obj, Info info) throws Exception;
+ public Iterator getIterator(Object obj, Info info);
/**
* Returns a general method, corresponding to $foo.bar( $woogie )
@@ -52,9 +50,8 @@
* @param args
* @param info
* @return A Velocity Method.
- * @throws Exception
*/
- public VelMethod getMethod(Object obj, String method, Object[] args, Info
info) throws Exception;
+ public VelMethod getMethod(Object obj, String method, Object[] args, Info
info);
/**
* Property getter - returns VelPropertyGet appropos for #set($foo =
$bar.woogie)
@@ -62,9 +59,8 @@
* @param identifier
* @param info
* @return A Velocity Getter.
- * @throws Exception
*/
- public VelPropertyGet getPropertyGet(Object obj, String identifier, Info
info) throws Exception;
+ public VelPropertyGet getPropertyGet(Object obj, String identifier, Info
info);
/**
* Property setter - returns VelPropertySet appropos for #set($foo.bar =
"geir")
@@ -73,7 +69,6 @@
* @param arg
* @param info
* @return A Velocity Setter.
- * @throws Exception
*/
- public VelPropertySet getPropertySet(Object obj, String identifier, Object
arg, Info info) throws Exception;
+ public VelPropertySet getPropertySet(Object obj, String identifier, Object
arg, Info info);
}
Modified:
velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/UberspectImpl.java
URL:
http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/UberspectImpl.java?rev=729843&r1=729842&r2=729843&view=diff
==============================================================================
---
velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/UberspectImpl.java
(original)
+++
velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/UberspectImpl.java
Mon Dec 29 01:06:57 2008
@@ -20,12 +20,14 @@
*/
import java.lang.reflect.Array;
+import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Collection;
import java.util.Enumeration;
import java.util.Iterator;
import java.util.Map;
+import org.apache.velocity.exception.VelocityException;
import org.apache.velocity.runtime.RuntimeLogger;
import org.apache.velocity.runtime.log.Log;
import org.apache.velocity.runtime.log.RuntimeLoggerLog;
@@ -67,7 +69,7 @@
* makes sure that the log gets set before this is called,
* we can initialize the Introspector using the log object.
*/
- public void init() throws Exception
+ public void init()
{
introspector = new Introspector(log);
}
@@ -102,10 +104,8 @@
* @param obj The iterative object.
* @param i Info about the object's location.
* @return An {...@link Iterator} object.
- * @throws Exception
*/
public Iterator getIterator(Object obj, Info i)
- throws Exception
{
if (obj.getClass().isArray())
{
@@ -153,7 +153,15 @@
Class returns = iter.getReturnType();
if (Iterator.class.isAssignableFrom(returns))
{
- return (Iterator)iter.invoke(obj, null);
+ try
+ {
+ return (Iterator)iter.invoke(obj, null);
+ }
+ catch (Exception e)
+ {
+ throw new VelocityException("Error invoking the method
'iterator' on class '"
+ + obj.getClass().getName() +"'", e);
+ }
}
else
{
@@ -180,10 +188,8 @@
* @param args
* @param i
* @return A Velocity Method.
- * @throws Exception
*/
public VelMethod getMethod(Object obj, String methodName, Object[] args,
Info i)
- throws Exception
{
if (obj == null)
{
@@ -230,7 +236,6 @@
* @throws Exception
*/
public VelPropertyGet getPropertyGet(Object obj, String identifier, Info i)
- throws Exception
{
if (obj == null)
{
@@ -286,7 +291,6 @@
*/
public VelPropertySet getPropertySet(Object obj, String identifier,
Object arg, Info i)
- throws Exception
{
if (obj == null)
{
Modified:
velocity/engine/trunk/src/test/org/apache/velocity/test/misc/TestLogChute.java
URL:
http://svn.apache.org/viewvc/velocity/engine/trunk/src/test/org/apache/velocity/test/misc/TestLogChute.java?rev=729843&r1=729842&r2=729843&view=diff
==============================================================================
---
velocity/engine/trunk/src/test/org/apache/velocity/test/misc/TestLogChute.java
(original)
+++
velocity/engine/trunk/src/test/org/apache/velocity/test/misc/TestLogChute.java
Mon Dec 29 01:06:57 2008
@@ -56,7 +56,7 @@
this.capture = capture;
}
- public void init(RuntimeServices rs) throws Exception
+ public void init(RuntimeServices rs)
{
super.init(rs);
Modified:
velocity/engine/trunk/src/test/org/apache/velocity/test/misc/UberspectTestImpl.java
URL:
http://svn.apache.org/viewvc/velocity/engine/trunk/src/test/org/apache/velocity/test/misc/UberspectTestImpl.java?rev=729843&r1=729842&r2=729843&view=diff
==============================================================================
---
velocity/engine/trunk/src/test/org/apache/velocity/test/misc/UberspectTestImpl.java
(original)
+++
velocity/engine/trunk/src/test/org/apache/velocity/test/misc/UberspectTestImpl.java
Mon Dec 29 01:06:57 2008
@@ -31,7 +31,7 @@
public class UberspectTestImpl extends UberspectImpl
{
- public VelMethod getMethod(Object obj, String methodName, Object[] args,
Info i) throws Exception
+ public VelMethod getMethod(Object obj, String methodName, Object[] args,
Info i)
{
VelMethod method = super.getMethod(obj, methodName, args, i);
@@ -46,7 +46,7 @@
return method;
}
- public VelPropertyGet getPropertyGet(Object obj, String identifier, Info
i) throws Exception
+ public VelPropertyGet getPropertyGet(Object obj, String identifier, Info i)
{
VelPropertyGet propertyGet = super.getPropertyGet(obj, identifier, i);
Modified:
velocity/engine/trunk/src/test/org/apache/velocity/test/util/introspection/ChainedUberspectorsTestCase.java
URL:
http://svn.apache.org/viewvc/velocity/engine/trunk/src/test/org/apache/velocity/test/util/introspection/ChainedUberspectorsTestCase.java?rev=729843&r1=729842&r2=729843&view=diff
==============================================================================
---
velocity/engine/trunk/src/test/org/apache/velocity/test/util/introspection/ChainedUberspectorsTestCase.java
(original)
+++
velocity/engine/trunk/src/test/org/apache/velocity/test/util/introspection/ChainedUberspectorsTestCase.java
Mon Dec 29 01:06:57 2008
@@ -83,7 +83,7 @@
// replaces getFoo by getBar
public static class ChainedUberspector extends AbstractChainableUberspector
{
- public VelPropertySet getPropertySet(Object obj, String identifier,
Object arg, Info info) throws Exception
+ public VelPropertySet getPropertySet(Object obj, String identifier,
Object arg, Info info)
{
identifier = identifier.replaceAll("foo","bar");
return inner.getPropertySet(obj,identifier,arg,info);
@@ -93,7 +93,7 @@
// replaces setFoo by setBar
public static class LinkedUberspector extends UberspectImpl
{
- public VelPropertyGet getPropertyGet(Object obj, String identifier,
Info info) throws Exception
+ public VelPropertyGet getPropertyGet(Object obj, String identifier,
Info info)
{
identifier = identifier.replaceAll("foo","bar");
return super.getPropertyGet(obj,identifier,info);