From: Jeremias Maerki Date: Wed, 9 Nov 2005 08:09:24 +0000 (+0000) Subject: Fix for bug #37417: X-Git-Tag: fop-0_90-alpha1~75 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d4a1e07e04ff5d2420955109eb9aa6c400ed670e;p=xmlgraphics-fop.git Fix for bug #37417: Work around situations with incomplete class loaders that don't report package information. Submitted by: Timothy Gates git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@331991 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/Version.java b/src/java/org/apache/fop/Version.java index 221244d60..31d463136 100644 --- a/src/java/org/apache/fop/Version.java +++ b/src/java/org/apache/fop/Version.java @@ -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