xmlgraphics-fop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 37417] New: - Patch to support fop from partially implemented Class Loaders.
Date Wed, 09 Nov 2005 00:09:24 GMT
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: fop-dev@xmlgraphics.apache.org
        ReportedBy: tgates@xplantechnology.com


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.

Mime
View raw message