mirror of https://github.com/apache/lucene.git
Fix unchecked warning
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1307131 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1b61bbd592
commit
69878cf594
|
@ -24,12 +24,11 @@ package org.apache.lucene.util;
|
|||
* <p>Pulled from http://www.javapuzzlers.com (I
|
||||
* think?).</p>
|
||||
*/
|
||||
|
||||
@SuppressWarnings({"unchecked","rawtypes"})
|
||||
public final class Rethrow {
|
||||
/**
|
||||
* Classy puzzler to rethrow any checked exception as an unchecked one.
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
private static class Rethrower<T extends Throwable> {
|
||||
private void rethrow(Throwable t) throws T {
|
||||
throw (T) t;
|
||||
|
|
Loading…
Reference in New Issue