Need to explicitly catch UnsatisfiedLinkError exception for System.load()

This commit is contained in:
rcritten 2010-01-13 21:21:04 +00:00
parent cec65550af
commit 5e878024aa
2 changed files with 6 additions and 3 deletions

View File

@ -15,12 +15,12 @@ diff -uN --recursive jss-4.2.6.orig/mozilla/security/jss/org/mozilla/jss/CryptoM
+ System.load( "/usr/lib64/jss/libjss4.so" );
+ Debug.trace(Debug.VERBOSE, "jss library loaded");
+ mNativeLibrariesLoaded = true;
+ } catch( Exception e ) {
+ } catch( UnsatisfiedLinkError e ) {
+ try {
+ System.load( "/usr/lib/jss/libjss4.so" );
+ Debug.trace(Debug.VERBOSE, "jss library loaded");
+ mNativeLibrariesLoaded = true;
+ } catch( Exception f ) {
+ } catch( UnsatisfiedLinkError f ) {
+ Debug.trace(Debug.VERBOSE, "jss library load failed");
+ }
+ }

View File

@ -1,6 +1,6 @@
Name: jss
Version: 4.2.6
Release: 5%{?dist}
Release: 6%{?dist}
Summary: Java Security Services (JSS)
Group: System Environment/Libraries
@ -143,6 +143,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Wed Jan 13 2010 Rob Crittenden <rcritten@redhat.com> 4.2.6-6
- Need to explicitly catch UnsatisfiedLinkError exception for System.load()
* Thu Jan 7 2010 Rob Crittenden <rcritten@redhat.com> 4.2.6-5
- Move location of libjss4.so to subdirectory and use System.load() to
load it instead of System.loadLibrary() for Fedora packaging compliance