You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by kk...@apache.org on 2014/07/28 09:02:31 UTC
svn commit: r1613897 -
/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/FairBlockingQueue.java
Author: kkolinko
Date: Mon Jul 28 07:02:31 2014
New Revision: 1613897
URL: http://svn.apache.org/r1613897
Log:
Revert generics changes from r1613123
The code is compiled with Java 7, so why change them?
With recommended Eclipse settings those produce compiler warnings.
(Generic types/Redundant type arguments warning)
Modified:
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/FairBlockingQueue.java
Modified: tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/FairBlockingQueue.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/FairBlockingQueue.java?rev=1613897&r1=1613896&r2=1613897&view=diff
==============================================================================
--- tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/FairBlockingQueue.java (original)
+++ tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/FairBlockingQueue.java Mon Jul 28 07:02:31 2014
@@ -201,13 +201,13 @@ public class FairBlockingQueue<E> implem
E item = items.poll();
if (item==null) {
//queue is empty, add ourselves as waiters
- ExchangeCountDownLatch<E> c = new ExchangeCountDownLatch<E>(1);
+ ExchangeCountDownLatch<E> c = new ExchangeCountDownLatch<>(1);
waiters.addLast(c);
//return a future that will wait for the object
- result = new ItemFuture<E>(c);
+ result = new ItemFuture<>(c);
} else {
//return a future with the item
- result = new ItemFuture<E>(item);
+ result = new ItemFuture<>(item);
}
} finally {
lock.unlock();
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: svn commit: r1613897 - /tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/FairBlockingQueue.java
Posted by Filip Hanik <fi...@hanik.com>.
On Mon, Jul 28, 2014 at 1:02 AM, <kk...@apache.org> wrote:
> Author: kkolinko
> Date: Mon Jul 28 07:02:31 2014
> New Revision: 1613897
>
> URL: http://svn.apache.org/r1613897
> Log:
> Revert generics changes from r1613123
> The code is compiled with Java 7, so why change them?
>
copy/paste mistake from the tc7.0.x version
> With recommended Eclipse settings those produce compiler warnings.
> (Generic types/Redundant type arguments warning)
>
Not using eclipse, and I would recommend that we don't expect our
contributors to be on a certain platform.
If we wish to enforce something, the tools should be provided within the
project itself, not depend on committers' independent platforms.
ie, the CI could complain/fail if we wish to be that strict.
Thanks for the fix.
>
> Modified:
>
> tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/FairBlockingQueue.java
>
> Modified:
> tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/FairBlockingQueue.java
> URL:
> http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/FairBlockingQueue.java?rev=1613897&r1=1613896&r2=1613897&view=diff
>
> ==============================================================================
> ---
> tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/FairBlockingQueue.java
> (original)
> +++
> tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/FairBlockingQueue.java
> Mon Jul 28 07:02:31 2014
> @@ -201,13 +201,13 @@ public class FairBlockingQueue<E> implem
> E item = items.poll();
> if (item==null) {
> //queue is empty, add ourselves as waiters
> - ExchangeCountDownLatch<E> c = new
> ExchangeCountDownLatch<E>(1);
> + ExchangeCountDownLatch<E> c = new
> ExchangeCountDownLatch<>(1);
> waiters.addLast(c);
> //return a future that will wait for the object
> - result = new ItemFuture<E>(c);
> + result = new ItemFuture<>(c);
> } else {
> //return a future with the item
> - result = new ItemFuture<E>(item);
> + result = new ItemFuture<>(item);
> }
> } finally {
> lock.unlock();
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>