Author: akarasulu
Date: Wed Jul 28 21:47:45 2004
New Revision: 30893
Modified:
incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/message/spi/Provider.java
Log:
switched to snickers as default provider
Modified:
incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/message/spi/Provider.java
==============================================================================
---
incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/message/spi/Provider.java
(original)
+++
incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/message/spi/Provider.java
Wed Jul 28 21:47:45 2004
@@ -241,7 +241,7 @@
{
/** Default BER Library provider class name */
public static final String DEFAULT_PROVIDER =
- "org.apache.ldap.common.berlib.snacc.SnaccProvider" ;
+ "org.apache.snickers.ldap.SnickersProvider" ;
/** BER Library provider class name property */
public static final String BERLIB_PROVIDER =
@@ -372,7 +372,6 @@
throws ProviderException
{
Provider provider = null ;
- Class providerClass = null ;
String className = a_env.getProperty( BERLIB_PROVIDER ) ;
// --------------------------------------------------------------------
@@ -476,9 +475,9 @@
}
catch ( FileNotFoundException fnfe )
{
- ProviderException l_pe = new ProviderException( null,
+ ProviderException pe = new ProviderException( null,
"Failed to load " + propFile.getAbsolutePath() );
- l_pe.addThrowable( fnfe );
+ pe.addThrowable( fnfe );
}
catch ( IOException ioe )
{
@@ -493,11 +492,11 @@
}
- // Prop file not on classpath so we try lookin for it in $JAVA_HOME/lib
File javaHome = new File( System.getProperty( "java.home" ), "lib" );
File userHome = new File( System.getProperty( "user.home" ) );
File wkdirHome = new File( System.getProperty( "user.dir" ) );
+ // If prop file not on classpath so we try lookin for it other places
if ( env == null )
{
File propFile = new File( javaHome, BERLIB_PROPFILE );
@@ -556,8 +555,7 @@
if ( System.getProperties().containsKey( BERLIB_PROVIDER )
&& ( System.getProperty( BERLIB_PROVIDER ) != null ) )
{
- env.setProperty(
- BERLIB_PROVIDER,
+ env.setProperty( BERLIB_PROVIDER,
System.getProperty( BERLIB_PROVIDER ) );
}