bloritsch 2002/06/13 05:59:10
Modified: fortress/src/java/org/apache/excalibur/fortress/util
ContextManager.java
merlin/src/java/org/apache/excalibur/merlin
AbstractManager.java DefaultServiceManager.java
DependencyInfo.java ServiceFactory.java
ServiceLoader.java ServiceProvider.java
UnitInfo.java
monitor/src/java/org/apache/avalon/excalibur/monitor
PassiveMonitor.java
monitor/src/test/org/apache/avalon/excalibur/monitor/test
MonitorTestCase.java
sourceresolve/src/java/org/apache/excalibur/source/impl
ResourceSource.java ResourceSourceFactory.java
SourceResolverImpl.java
zip/src/java/org/apache/excalibur/zip ExtraFieldUtils.java
ZipOutputStream.java
Log:
Removing unnecessary deprecation warnings
Revision Changes Path
1.20 +3 -1
jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/util/ContextManager.java
Index: ContextManager.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/util/ContextManager.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- ContextManager.java 13 May 2002 12:17:39 -0000 1.19
+++ ContextManager.java 13 Jun 2002 12:59:10 -0000 1.20
@@ -288,6 +288,8 @@
// TODO: Load configuration from COMPONENT_MANAGER_CONFIGURATION or
COMPONENT_MANAGER_CONFIGURATION_URI
// and create a proper CM from those (ECM?). Need a container
CM for that, though. /LS
//
+ // No, if there is no parent CM, then there is no parent Container.
Therefore, there is
+ // no need for a new CM here. -BL
ComponentManager cm = new DefaultComponentManager(
(ComponentManager)get( rootContext, COMPONENT_MANAGER_PARENT,
null ) );
assumeOwnership( cm );
1.3 +3 -3
jakarta-avalon-excalibur/merlin/src/java/org/apache/excalibur/merlin/AbstractManager.java
Index: AbstractManager.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/merlin/src/java/org/apache/excalibur/merlin/AbstractManager.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- AbstractManager.java 12 May 2002 13:41:28 -0000 1.2
+++ AbstractManager.java 13 Jun 2002 12:59:10 -0000 1.3
@@ -14,7 +14,7 @@
/**
* Internal helper class the handles the functional requirements of
- * both ComponetManager and ServiceManager.
+ * both ComponetManager and ComponentManager.
* @author <a href="mailto:[EMAIL PROTECTED]">Stephen McConnell</a>
*/
class AbstractManager
@@ -99,7 +99,7 @@
//catch( Throwable e )
//{
// final String error = "Pool implementation error.";
- // throw new ServiceException( error, e );
+ // throw new ComponentException( error, e );
//}
//finally
//{
@@ -111,7 +111,7 @@
// final String error =
// "Manager has an existing reference to an aquired object
from '"
// + role + "'.";
- // throw new ServiceException( error );
+ // throw new ComponentException( error );
// }
// m_pooledTable.put( object, provider );
// return object;
1.3 +4 -4
jakarta-avalon-excalibur/merlin/src/java/org/apache/excalibur/merlin/DefaultServiceManager.java
Index: DefaultServiceManager.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/merlin/src/java/org/apache/excalibur/merlin/DefaultServiceManager.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- DefaultServiceManager.java 12 May 2002 13:41:28 -0000 1.2
+++ DefaultServiceManager.java 13 Jun 2002 12:59:10 -0000 1.3
@@ -14,7 +14,7 @@
import org.apache.avalon.framework.service.ServiceManager;
/**
- * Internal helper class the implements the <code>ServiceManager</code>
interface and
+ * Internal helper class the implements the <code>ComponentManager</code>
interface and
* is supplied to dynamically created componets during lifecyle pipeline
processing.
* @author Stephen McConnell <[EMAIL PROTECTED]>
*/
@@ -23,7 +23,7 @@
implements ServiceManager
{
/**
- * Construct ServiceManager.
+ * Construct ComponentManager.
*/
public DefaultServiceManager( Map providers )
{
@@ -41,10 +41,10 @@
}
/**
- * Retrieve Object by role from ServiceManager.
+ * Retrieve Object by role from ComponentManager.
* @param role the role
* @return the Object
- * @exception ServiceException if an error occurs
+ * @exception ComponentException if an error occurs
*/
public Object lookup( String role ) throws ServiceException
{
1.3 +3 -3
jakarta-avalon-excalibur/merlin/src/java/org/apache/excalibur/merlin/DependencyInfo.java
Index: DependencyInfo.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/merlin/src/java/org/apache/excalibur/merlin/DependencyInfo.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- DependencyInfo.java 12 May 2002 13:41:28 -0000 1.2
+++ DependencyInfo.java 13 Jun 2002 12:59:10 -0000 1.3
@@ -14,7 +14,7 @@
/**
* Abstract meta-information that describes a single dependancy that a
- * <code>Serviceable</code> object may have towards other
+ * <code>Composable</code> object may have towards other
* components.
* @author Stephen McConnell <[EMAIL PROTECTED]>
*/
@@ -40,8 +40,8 @@
* Returns the role name that the component uses to lookup a
* the dependency.
* @return the dependecy role name
- * @see org.apache.avalon.framework.service.ServiceManager
- * @see org.apache.avalon.framework.service.Serviceable
+ * @see org.apache.avalon.framework.service.ComponentManager
+ * @see org.apache.avalon.framework.service.Composable
*/
public String getRole()
{
1.6 +3 -3
jakarta-avalon-excalibur/merlin/src/java/org/apache/excalibur/merlin/ServiceFactory.java
Index: ServiceFactory.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/merlin/src/java/org/apache/excalibur/merlin/ServiceFactory.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ServiceFactory.java 13 May 2002 13:38:53 -0000 1.5
+++ ServiceFactory.java 13 Jun 2002 12:59:10 -0000 1.6
@@ -130,11 +130,11 @@
}
/**
- * Dynamic creation of a <code>ServiceManager</code> based on a set of
+ * Dynamic creation of a <code>ComponentManager</code> based on a set of
* supplied dependencies and container configuration.
* @param info meta information about the service
* @param base the base logger
- * @return ServiceManager a new service manager
+ * @return ComponentManager a new service manager
*/
private ServiceManager createServiceManager( UnitInfo info, Logger base )
throws ServiceException
@@ -179,7 +179,7 @@
catch( Throwable e )
{
final String error =
- "Unexpected exception while attempting to create a
ServiceManager.";
+ "Unexpected exception while attempting to create a
ComponentManager.";
throw new ServiceException( error, e );
}
}
1.7 +1 -1
jakarta-avalon-excalibur/merlin/src/java/org/apache/excalibur/merlin/ServiceLoader.java
Index: ServiceLoader.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/merlin/src/java/org/apache/excalibur/merlin/ServiceLoader.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- ServiceLoader.java 11 Jun 2002 03:26:55 -0000 1.6
+++ ServiceLoader.java 13 Jun 2002 12:59:10 -0000 1.7
@@ -187,7 +187,7 @@
* <td valign="top"><code>-target <class-name></code></td>
* <td>
* <p>The class to instantiate. If the class exposes any Avalon
lifecycle interface
- * (such as <code>Configurable</code>, <code>Contextualizable</code>,
<code>Serviceable</code>,
+ * (such as <code>Configurable</code>, <code>Contextualizable</code>,
<code>Composable</code>,
* <code>Initializable</code>, <code>Startable</code>, or
<code>Disposable</code>, the
* pipeline will automate lifecycle processing and termination.
* </p>
1.3 +4 -4
jakarta-avalon-excalibur/merlin/src/java/org/apache/excalibur/merlin/ServiceProvider.java
Index: ServiceProvider.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/merlin/src/java/org/apache/excalibur/merlin/ServiceProvider.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ServiceProvider.java 12 May 2002 13:41:28 -0000 1.2
+++ ServiceProvider.java 13 Jun 2002 12:59:10 -0000 1.3
@@ -15,10 +15,10 @@
/**
* <code>ServiceProvider</code> is an abstract base class to services
* factories. The abstract class provides the single <code>getRole</code>
- * method that can be used by a <code>ServiceManager</code> implementation
+ * method that can be used by a <code>ComponentManager</code> implementation
* to identity a service provider for a particular role.
* A concrete <code>ServiceProvider</code> instance will typically be
- * created by an implementation when constructing a
<code>ServiceManager</code>
+ * created by an implementation when constructing a
<code>ComponentManager</code>
* for a target component.
* @author <a href="mailto:[EMAIL PROTECTED]">Stephen McConnell</a>
*/
@@ -30,7 +30,7 @@
* Creation of a new <code>ServiceProvider</code> instance based on
* a supplied role.
* @param role the role of the service provided by the provider relative
- * to a <code>ServiceManager</code> that is exposing provider services.
+ * to a <code>ComponentManager</code> that is exposing provider
services.
*/
public ServiceProvider( String role )
{
@@ -38,7 +38,7 @@
}
/**
- * Returns the role of this provider within the scope of a
<code>ServiceManager</code>.
+ * Returns the role of this provider within the scope of a
<code>ComponentManager</code>.
* @return String the role of the service provider by the provider.
*/
public String getRole()
1.8 +1 -1
jakarta-avalon-excalibur/merlin/src/java/org/apache/excalibur/merlin/UnitInfo.java
Index: UnitInfo.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/merlin/src/java/org/apache/excalibur/merlin/UnitInfo.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- UnitInfo.java 13 Jun 2002 07:43:19 -0000 1.7
+++ UnitInfo.java 13 Jun 2002 12:59:10 -0000 1.8
@@ -23,7 +23,7 @@
import org.apache.excalibur.configuration.ContextFactory;
/**
- * Meta information about a <code>Serviceable</code> component.
+ * Meta information about a <code>Composable</code> component.
* @author <a href="mailto:[EMAIL PROTECTED]">Stephen McConnell</a>
*/
public class UnitInfo
1.9 +3 -3
jakarta-avalon-excalibur/monitor/src/java/org/apache/avalon/excalibur/monitor/PassiveMonitor.java
Index: PassiveMonitor.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/monitor/src/java/org/apache/avalon/excalibur/monitor/PassiveMonitor.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- PassiveMonitor.java 13 May 2002 12:17:40 -0000 1.8
+++ PassiveMonitor.java 13 Jun 2002 12:59:10 -0000 1.9
@@ -14,7 +14,7 @@
import org.apache.avalon.framework.configuration.Configurable;
import org.apache.avalon.framework.configuration.Configuration;
import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.logger.AbstractLoggable;
+import org.apache.avalon.framework.logger.AbstractLogEnabled;
import org.apache.avalon.framework.thread.ThreadSafe;
/**
@@ -37,7 +37,7 @@
* @version $Id$
*/
public final class PassiveMonitor
- extends AbstractLoggable
+ extends AbstractLogEnabled
implements Monitor, ThreadSafe, Configurable
{
private static final Class[] m_constructorParams = new
Class[]{String.class};
1.10 +4 -4
jakarta-avalon-excalibur/monitor/src/test/org/apache/avalon/excalibur/monitor/test/MonitorTestCase.java
Index: MonitorTestCase.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/monitor/src/test/org/apache/avalon/excalibur/monitor/test/MonitorTestCase.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- MonitorTestCase.java 24 Mar 2002 09:56:42 -0000 1.9
+++ MonitorTestCase.java 13 Jun 2002 12:59:10 -0000 1.10
@@ -21,7 +21,7 @@
import org.apache.avalon.framework.component.Component;
import org.apache.avalon.framework.component.ComponentException;
import org.apache.avalon.framework.component.ComponentSelector;
-import org.apache.avalon.framework.logger.AbstractLoggable;
+import org.apache.avalon.framework.logger.AbstractLogEnabled;
/**
* Junit TestCase for all the monitors in Excalibur.
@@ -114,7 +114,7 @@
thirdWheel.createNewFile();
MonitorTestCaseListener listener = new MonitorTestCaseListener();
- listener.setLogger( getLogger() );
+ listener.enableLogging( this.getLogEnabledLogger() );
FileResource resource = new FileResource( "test.txt" );
resource.addPropertyChangeListener( listener );
@@ -229,7 +229,7 @@
}
public static class MonitorTestCaseListener
- extends AbstractLoggable
+ extends AbstractLogEnabled
implements PropertyChangeListener
{
private volatile boolean m_hasChanged = false;
1.4 +2 -2
jakarta-avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/impl/ResourceSource.java
Index: ResourceSource.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/impl/ResourceSource.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ResourceSource.java 12 Jun 2002 09:24:14 -0000 1.3
+++ ResourceSource.java 13 Jun 2002 12:59:10 -0000 1.4
@@ -48,7 +48,7 @@
ClassLoader loader = Thread.currentThread().getContextClassLoader();
if( loader == null )
{
- loader = this.getClass().getClassLoader();
+ loader = getClass().getClassLoader();
}
return loader.getResourceAsStream( this.location );
}
1.5 +3 -3
jakarta-avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/impl/ResourceSourceFactory.java
Index: ResourceSourceFactory.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/impl/ResourceSourceFactory.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ResourceSourceFactory.java 13 May 2002 12:17:40 -0000 1.4
+++ ResourceSourceFactory.java 13 Jun 2002 12:59:10 -0000 1.5
@@ -34,9 +34,9 @@
public Source getSource( String location, Map parameters )
throws MalformedURLException, IOException, SourceException
{
- if( this.getLogger().isDebugEnabled() )
+ if( getLogger().isDebugEnabled() )
{
- this.getLogger().debug( "Creating source object for " + location
);
+ getLogger().debug( "Creating source object for " + location );
}
return new ResourceSource( location );
}
1.8 +5 -6
jakarta-avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/impl/SourceResolverImpl.java
Index: SourceResolverImpl.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/impl/SourceResolverImpl.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- SourceResolverImpl.java 13 May 2002 12:17:40 -0000 1.7
+++ SourceResolverImpl.java 13 Jun 2002 12:59:10 -0000 1.8
@@ -209,13 +209,12 @@
// windows: absolute paths can start with drive letter
if( location.length() > 2 && location.charAt( 2 ) == ':' )
{
- systemID = new StringBuffer( "file:" ).append( location
).toString();
+ systemID = "file:" + location;
}
else
{
final int protocolEnd = baseURI.indexOf( ':' );
- systemID = new StringBuffer( baseURI.substring( 0,
protocolEnd + 1 ) )
- .append( location ).toString();
+ systemID = baseURI.substring( 0, protocolEnd + 1 ) +
location;
}
}
else if( location.indexOf( ":" ) > 1 )
@@ -225,7 +224,7 @@
// windows: absolute paths can start with drive letter
else if( location.length() > 1 && location.charAt( 1 ) == ':' )
{
- systemID = new StringBuffer( "file:/" ).append( location
).toString();
+ systemID = "file:/" + location;
}
else
{
@@ -234,7 +233,7 @@
File temp = new File( baseURI.substring( "file:".length() ),
location );
String path = temp.getAbsolutePath();
// windows paths starts with drive letter
- if( path.charAt( 0 ) != File.separator.charAt( 0 ) )
+ if( path.charAt( 0 ) != File.separatorChar )
{
systemID = "file:/" + path;
}
1.4 +2 -2
jakarta-avalon-excalibur/zip/src/java/org/apache/excalibur/zip/ExtraFieldUtils.java
Index: ExtraFieldUtils.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/zip/src/java/org/apache/excalibur/zip/ExtraFieldUtils.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ExtraFieldUtils.java 7 Apr 2002 02:27:06 -0000 1.3
+++ ExtraFieldUtils.java 13 Jun 2002 12:59:10 -0000 1.4
@@ -54,7 +54,7 @@
return (ZipExtraField)clazz.newInstance();
}
final UnrecognizedExtraField unrecognized = new
UnrecognizedExtraField();
- unrecognized.setHeaderId( headerID );
+ unrecognized.setHeaderID( headerID );
return unrecognized;
}
1.3 +10 -7
jakarta-avalon-excalibur/zip/src/java/org/apache/excalibur/zip/ZipOutputStream.java
Index: ZipOutputStream.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/zip/src/java/org/apache/excalibur/zip/ZipOutputStream.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ZipOutputStream.java 7 Apr 2002 02:27:06 -0000 1.2
+++ ZipOutputStream.java 13 Jun 2002 12:59:10 -0000 1.3
@@ -12,6 +12,7 @@
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.Date;
+import java.util.Calendar;
import java.util.Hashtable;
import java.util.zip.CRC32;
import java.util.zip.Deflater;
@@ -210,18 +211,20 @@
*/
protected static ZipLong toDosTime( Date time )
{
- int year = time.getYear() + 1900;
- int month = time.getMonth() + 1;
+ Calendar cal = Calendar.getInstance();
+ cal.setTime( time );
+ int year = cal.get(Calendar.YEAR);
+ int month = cal.get(Calendar.MONTH) + 1;
if( year < 1980 )
{
return DOS_TIME_MIN;
}
long value = ( ( year - 1980 ) << 25 )
| ( month << 21 )
- | ( time.getDate() << 16 )
- | ( time.getHours() << 11 )
- | ( time.getMinutes() << 5 )
- | ( time.getSeconds() >> 1 );
+ | ( cal.get(Calendar.DAY_OF_MONTH) << 16 )
+ | ( cal.get(Calendar.HOUR_OF_DAY) << 11 )
+ | ( cal.get(Calendar.MINUTE) << 5 )
+ | ( cal.get(Calendar.SECOND) >> 1 );
byte[] result = new byte[ 4 ];
result[ 0 ] = (byte)( ( value & 0xFF ) );
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>