DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=37417>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=37417 Summary: Patch to support fop from partially implemented Class Loaders. Product: Fop Version: 1.0dev Platform: All OS/Version: other Status: NEW Severity: enhancement Priority: P5 Component: general AssignedTo: [email protected] ReportedBy: [EMAIL PROTECTED] org.apach.fop.Version line 33 (ver 328820) assumes that Version.class.getPackage() will return the package info of the class however it may return null if it was loaded from an incomplete class loader that doesn't implement definePackage correctly by loading the manifest info from the jar file. Whilst the proper solution is to fix these class loaders it would be prudent to gracefully handle this situation. The attached patch attempts to do so. ==START PATCH== Index: src/java/org/apache/fop/Version.java =================================================================== --- src/java/org/apache/fop/Version.java (revision 331635) +++ src/java/org/apache/fop/Version.java (working copy) @@ -30,7 +30,11 @@ * @return the version string */ public static String getVersion() { - String version = Version.class.getPackage().getImplementationVersion (); + String version = null; + Package jarinfo = Version.class.getPackage(); + if(jarinfo != null) { + version = jarinfo.getImplementationVersion(); + } if (version == null) { //Fallback if FOP is used in a development environment String headURL ==END PATCH== -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
