diff options
author | Jeremias Maerki <jeremias@apache.org> | 2005-11-09 08:09:24 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2005-11-09 08:09:24 +0000 |
commit | d4a1e07e04ff5d2420955109eb9aa6c400ed670e (patch) | |
tree | 5333c7efa2161ec42190c0d21de920b4d7d83dc5 | |
parent | 3f0251fb8f171eb45d45d1c24f857d8209aeb30f (diff) | |
download | xmlgraphics-fop-d4a1e07e04ff5d2420955109eb9aa6c400ed670e.tar.gz xmlgraphics-fop-d4a1e07e04ff5d2420955109eb9aa6c400ed670e.zip |
Fix for bug #37417:
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
-rw-r--r-- | src/java/org/apache/fop/Version.java | 6 |
1 files changed, 5 insertions, 1 deletions
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 |