Author: henning
Date: Sun Oct 9 03:21:30 2005
New Revision: 307382
URL: http://svn.apache.org/viewcvs?rev=307382&view=rev
Log:
Remove a number of "using deprecated method" method calls.
Modified:
jakarta/velocity/core/trunk/src/java/org/apache/velocity/app/VelocityEngine.java
jakarta/velocity/core/trunk/src/java/org/apache/velocity/runtime/RuntimeInstance.java
jakarta/velocity/core/trunk/src/java/org/apache/velocity/runtime/RuntimeSingleton.java
Modified:
jakarta/velocity/core/trunk/src/java/org/apache/velocity/app/VelocityEngine.java
URL:
http://svn.apache.org/viewcvs/jakarta/velocity/core/trunk/src/java/org/apache/velocity/app/VelocityEngine.java?rev=307382&r1=307381&r2=307382&view=diff
==============================================================================
---
jakarta/velocity/core/trunk/src/java/org/apache/velocity/app/VelocityEngine.java
(original)
+++
jakarta/velocity/core/trunk/src/java/org/apache/velocity/app/VelocityEngine.java
Sun Oct 9 03:21:30 2005
@@ -314,7 +314,7 @@
}
catch( Exception e )
{
- ri.error("Velocity.evaluate() : init exception for tag = "
+ ri.getLog().error("Velocity.evaluate() : init exception
for tag = "
+ logTag + " : " + e );
}
@@ -362,7 +362,7 @@
if ( vmName == null || params == null || context == null
|| writer == null || logTag == null)
{
- ri.error( "VelocityEngine.invokeVelocimacro() : invalid
parameter");
+ ri.getLog().error( "VelocityEngine.invokeVelocimacro() : invalid
parameter");
return false;
}
@@ -372,7 +372,7 @@
if (!ri.isVelocimacro( vmName, logTag ))
{
- ri.error( "VelocityEngine.invokeVelocimacro() : VM '"+ vmName
+ ri.getLog().error( "VelocityEngine.invokeVelocimacro() : VM '"+
vmName
+ "' not registered.");
return false;
}
@@ -403,7 +403,7 @@
}
catch( Exception e )
{
- ri.error( "VelocityEngine.invokeVelocimacro() : error " + e );
+ ri.getLog().error( "VelocityEngine.invokeVelocimacro() : error " +
e );
throw e;
}
}
@@ -452,7 +452,7 @@
if ( template == null )
{
- ri.error("Velocity.parseTemplate() failed loading template '"
+ ri.getLog().error("Velocity.parseTemplate() failed loading
template '"
+ templateName + "'" );
return false;
}
@@ -538,7 +538,7 @@
*/
public void warn(Object message)
{
- ri.warn(message);
+ ri.getLog().warn(message);
}
/**
@@ -548,7 +548,7 @@
*/
public void info(Object message)
{
- ri.info(message);
+ ri.getLog().info(message);
}
/**
@@ -558,7 +558,7 @@
*/
public void error(Object message)
{
- ri.error(message);
+ ri.getLog().error(message);
}
/**
@@ -568,7 +568,7 @@
*/
public void debug(Object message)
{
- ri.debug(message);
+ ri.getLog().debug(message);
}
/**
Modified:
jakarta/velocity/core/trunk/src/java/org/apache/velocity/runtime/RuntimeInstance.java
URL:
http://svn.apache.org/viewcvs/jakarta/velocity/core/trunk/src/java/org/apache/velocity/runtime/RuntimeInstance.java?rev=307382&r1=307381&r2=307382&view=diff
==============================================================================
---
jakarta/velocity/core/trunk/src/java/org/apache/velocity/runtime/RuntimeInstance.java
(original)
+++
jakarta/velocity/core/trunk/src/java/org/apache/velocity/runtime/RuntimeInstance.java
Sun Oct 9 03:21:30 2005
@@ -221,9 +221,11 @@
{
if (initialized == false)
{
-
info("************************************************************** ");
- info("Starting Jakarta Velocity [EMAIL PROTECTED]@");
- info("RuntimeInstance initializing.");
+
log.info("************************************************************** ");
+ log.info("Starting Jakarta Velocity [EMAIL PROTECTED]@");
+ log.debug("compiled at @build.time@");
+ log.info("RuntimeInstance initializing.");
+
initializeProperties();
initializeLog();
initializeResourceManager();
@@ -238,7 +240,7 @@
*/
vmFactory.initVelocimacro();
- info("Velocity successfully started.");
+ log.info("Velocity successfully started.");
initialized = true;
}
@@ -267,8 +269,8 @@
String err = "The specified class for Uberspect ("
+ rm
+ ") does not exist (or is not accessible to the current
classlaoder.";
- error(err);
- throw new Exception(err);
+ log.error(err);
+ throw new Exception(err);
}
if (!(o instanceof Uberspect))
@@ -278,7 +280,7 @@
+ ") does not implement
org.apache.velocity.util.introspector.Uberspect."
+ " Velocity not initialized correctly.";
- error(err);
+ log.error(err);
throw new Exception(err);
}
@@ -301,7 +303,7 @@
+ " Uberspect. Please ensure that all configuration"
+ " information is correct.";
- error(err);
+ log.error(err);
throw new Exception(err);
}
}
@@ -505,8 +507,8 @@
String err = "The specified class for Resourcemanager ("
+ rm
+ ") does not exist (or is not accessible to the current
classlaoder.";
- error(err);
- throw new Exception(err);
+ log.error(err);
+ throw new Exception(err);
}
if (!(o instanceof ResourceManager))
@@ -516,7 +518,7 @@
+ ") does not implement
org.apache.runtime.resource.ResourceManager."
+ " Velocity not initialized correctly.";
- error(err);
+ log.error(err);
throw new Exception(err);
}
@@ -534,7 +536,7 @@
+ " ResourceManager. Please ensure that all configuration"
+ " information is correct.";
- error(err);
+ log.error(err);
throw new Exception( err );
}
}
@@ -611,8 +613,8 @@
+ " ("
+ classname
+ ") does not exist (or is not accessible to the current
classlaoder.";
- error(err);
- throw new Exception(err);
+ log.error(err);
+ throw new Exception(err);
}
if (!EventHandlerInterface.isAssignableFrom(EventHandlerInterface))
@@ -625,7 +627,7 @@
+ EventHandlerInterface.getName()
+ " Velocity not initialized correctly.";
- error(err);
+ log.error(err);
throw new Exception(err);
}
@@ -733,13 +735,13 @@
Directive directive = (Directive) o;
runtimeDirectives.put(directive.getName(), directive);
- info("Loaded " + caption + " Directive: "
+ log.info("Loaded " + caption + " Directive: "
+ directiveClass);
}
else
{
- error(caption + " Directive " + directiveClass
- + " is not
org.apache.velocity.runtime.directive.Directive."
+ log.error(caption + " Directive " + directiveClass
+ + " is not implementing
org.apache.velocity.runtime.directive.Directive."
+ " Ignoring. ");
}
}
@@ -748,7 +750,7 @@
// Ignore Findbugs complaint for now.
catch (Exception e)
{
- error("Exception Loading " + caption + " Directive: "
+ log.error("Exception Loading " + caption + " Directive: "
+ directiveClass + " : " + e);
}
}
@@ -769,7 +771,7 @@
parserPool.put(createNewParser());
}
- info("Created '" + numParsers + "' parsers.");
+ log.info("Created '" + numParsers + "' parsers.");
}
/**
@@ -830,7 +832,7 @@
* make one and log it.
*/
- error("Runtime : ran out of parsers. Creating new. "
+ log.error("Runtime : ran out of parsers. Creating new. "
+ " Please increment the parser.pool.size property."
+ " The current value is too small.");
@@ -876,7 +878,7 @@
}
else
{
- error("Runtime : ran out of parsers and unable to create more.");
+ log.error("Runtime : ran out of parsers and unable to create
more.");
}
return ast;
}
Modified:
jakarta/velocity/core/trunk/src/java/org/apache/velocity/runtime/RuntimeSingleton.java
URL:
http://svn.apache.org/viewcvs/jakarta/velocity/core/trunk/src/java/org/apache/velocity/runtime/RuntimeSingleton.java?rev=307382&r1=307381&r2=307382&view=diff
==============================================================================
---
jakarta/velocity/core/trunk/src/java/org/apache/velocity/runtime/RuntimeSingleton.java
(original)
+++
jakarta/velocity/core/trunk/src/java/org/apache/velocity/runtime/RuntimeSingleton.java
Sun Oct 9 03:21:30 2005
@@ -342,7 +342,7 @@
*/
public static void warn(Object message)
{
- ri.warn( message );
+ ri.getLog().warn( message );
}
/**
@@ -352,7 +352,7 @@
*/
public static void info(Object message)
{
- ri.info( message );
+ ri.getLog().info( message );
}
/**
@@ -362,7 +362,7 @@
*/
public static void error(Object message)
{
- ri.error( message );
+ ri.getLog().error( message );
}
/**
@@ -372,7 +372,7 @@
*/
public static void debug(Object message)
{
- ri.debug( message );
+ ri.getLog().debug( message );
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]