]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Fix for bug #37417:
authorJeremias Maerki <jeremias@apache.org>
Wed, 9 Nov 2005 08:09:24 +0000 (08:09 +0000)
committerJeremias Maerki <jeremias@apache.org>
Wed, 9 Nov 2005 08:09:24 +0000 (08:09 +0000)
Work around situations with incomplete class loaders that don't report package information.
Submitted by: Timothy Gates <tgates.at.xplantechnology.com>

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@331991 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/Version.java

index 221244d60365a3838dac89bd801e4bfca5de75fb..31d463136fa634aa8068040b4eee741c389e867e 100644 (file)
@@ -30,7 +30,11 @@ public class Version {
      * @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