Author: kkolinko
Date: Thu Feb 12 22:46:54 2015
New Revision: 1659427
URL: http://svn.apache.org/r1659427
Log:
For https://issues.apache.org/bugzilla/show_bug.cgi?id=57021
Fix compilation errors with Java 6
Java 6 does not like when the code throws a Throwable but it is not declared as
thrown by the method. Java 7 is fine though.
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/jni/Library.java
Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/jni/Library.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/jni/Library.java?rev=1659427&r1=1659426&r2=1659427&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/jni/Library.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/jni/Library.java Thu Feb 12
22:46:54 2015
@@ -32,7 +32,7 @@ public final class Library {
*/
private static Library _instance = null;
- private Library() throws Exception {
+ private Library() throws Throwable {
boolean loaded = false;
String path = System.getProperty("java.library.path");
String [] paths = path.split(File.pathSeparator);
@@ -41,7 +41,9 @@ public final class Library {
try {
System.loadLibrary(NAMES[i]);
loaded = true;
- } catch (ThreadDeath | VirtualMachineError t) {
+ } catch (ThreadDeath t) {
+ throw t;
+ } catch (VirtualMachineError t) {
throw t;
} catch (Throwable t) {
String name = System.mapLibraryName(NAMES[i]);
@@ -164,7 +166,7 @@ public final class Library {
* @param libraryName the name of the library to load
*/
public static boolean initialize(String libraryName)
- throws Exception
+ throws Throwable
{
if (_instance == null) {
if (libraryName == null)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]