tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1406392 - in /tomcat/trunk: java/org/apache/tomcat/util/net/NioEndpoint.java modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReport.java
Date Tue, 06 Nov 2012 23:07:43 GMT
Author: markt
Date: Tue Nov  6 23:07:43 2012
New Revision: 1406392

URL: http://svn.apache.org/viewvc?rev=1406392&view=rev
Log:
Fix some more warnings

Modified:
    tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
    tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReport.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1406392&r1=1406391&r2=1406392&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Tue Nov  6 23:07:43 2012
@@ -1209,7 +1209,9 @@ public class NioEndpoint extends Abstrac
                         cancelledKey(sk,SocketStatus.ERROR);
                         return false;
                     }
-                    sd.fchannel = new FileInputStream(f).getChannel();
+                    @SuppressWarnings("resource") // Closed when channel is closed
+                    FileInputStream fis = new FileInputStream(f);
+                    sd.fchannel = fis.getChannel();
                 }
 
                 //configure output channel

Modified: tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReport.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReport.java?rev=1406392&r1=1406391&r2=1406392&view=diff
==============================================================================
--- tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReport.java
(original)
+++ tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReport.java
Tue Nov  6 23:07:43 2012
@@ -247,7 +247,7 @@ public class SlowQueryReport extends Abs
             "The date and time of the last invocation"
         };
 
-        static final OpenType[] FIELD_TYPES = new OpenType[] {
+        static final OpenType<?>[] FIELD_TYPES = new OpenType[] {
             SimpleType.STRING,
             SimpleType.INTEGER,
             SimpleType.LONG,
@@ -281,7 +281,7 @@ public class SlowQueryReport extends Abs
             return FIELD_DESCRIPTIONS;
         }
 
-        public static OpenType[] getFieldTypes() {
+        public static OpenType<?>[] getFieldTypes() {
             return FIELD_TYPES;
         }
 



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


Mime
View raw message