You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2019/03/22 10:54:32 UTC

[tomcat] branch 7.0.x updated: Generics: Properties

This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/7.0.x by this push:
     new ba9c387  Generics: Properties
ba9c387 is described below

commit ba9c3875a520a1b766902ba71555a769abbbbc27
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Fri Mar 22 10:54:24 2019 +0000

    Generics: Properties
---
 .../tomcat/dbcp/dbcp/BasicDataSourceFactory.java       | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/java/org/apache/tomcat/dbcp/dbcp/BasicDataSourceFactory.java b/java/org/apache/tomcat/dbcp/dbcp/BasicDataSourceFactory.java
index 2ae9282..d5629a9 100644
--- a/java/org/apache/tomcat/dbcp/dbcp/BasicDataSourceFactory.java
+++ b/java/org/apache/tomcat/dbcp/dbcp/BasicDataSourceFactory.java
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -134,7 +134,7 @@ public class BasicDataSourceFactory implements ObjectFactory {
      */
     @Override
     public Object getObjectInstance(Object obj, Name name, Context nameCtx,
-                                    Hashtable environment)
+                                    Hashtable<?,?> environment)
         throws Exception {
 
         // We only know how to deal with <code>javax.naming.Reference</code>s
@@ -163,7 +163,7 @@ public class BasicDataSourceFactory implements ObjectFactory {
     /**
      * Creates and configures a {@link BasicDataSource} instance based on the
      * given properties.
-     * 
+     *
      * @param properties the datasource configuration properties
      * @throws Exception if an error occurs creating the data source
      */
@@ -226,7 +226,7 @@ public class BasicDataSourceFactory implements ObjectFactory {
         if (value != null) {
             dataSource.setLifo(Boolean.valueOf(value).booleanValue());
         }
-        
+
         value = properties.getProperty(PROP_MAXACTIVE);
         if (value != null) {
             dataSource.setMaxActive(Integer.parseInt(value));
@@ -276,7 +276,7 @@ public class BasicDataSourceFactory implements ObjectFactory {
         if (value != null) {
             dataSource.setMinEvictableIdleTimeMillis(Long.parseLong(value));
         }
-        
+
         value = properties.getProperty(PROP_SOFTMINEVICTABLEIDLETIMEMILLIS);
         if (value != null) {
             dataSource.setSoftMinEvictableIdleTimeMillis(Long.parseLong(value));
@@ -311,7 +311,7 @@ public class BasicDataSourceFactory implements ObjectFactory {
         if (value != null) {
             dataSource.setValidationQueryTimeout(Integer.parseInt(value));
         }
-        
+
         value = properties.getProperty(PROP_ACCESSTOUNDERLYINGCONNECTIONALLOWED);
         if (value != null) {
             dataSource.setAccessToUnderlyingConnectionAllowed(Boolean.valueOf(value).booleanValue());
@@ -323,7 +323,7 @@ public class BasicDataSourceFactory implements ObjectFactory {
         }
 
         value = properties.getProperty(PROP_REMOVEABANDONEDTIMEOUT);
-        if (value != null) {     
+        if (value != null) {
             dataSource.setRemoveAbandonedTimeout(Integer.parseInt(value));
         }
 
@@ -351,7 +351,7 @@ public class BasicDataSourceFactory implements ObjectFactory {
         value = properties.getProperty(PROP_CONNECTIONPROPERTIES);
         if (value != null) {
           Properties p = getProperties(value);
-          Enumeration e = p.propertyNames();
+          Enumeration<?> e = p.propertyNames();
           while (e.hasMoreElements()) {
             String propertyName = (String) e.nextElement();
             dataSource.addConnectionProperty(propertyName, p.getProperty(propertyName));


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org