瀏覽代碼

Changed serialVersionUID in the serialization of font-cache and some minor related changes


git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1373227 13f79535-47bb-0310-9956-ffa450edef68
tags/fop-2_0
Mehdi Houshmand 11 年之前
父節點
當前提交
726e1ef309
共有 1 個文件被更改,包括 7 次插入4 次删除
  1. 7
    4
      src/java/org/apache/fop/fonts/FontCache.java

+ 7
- 4
src/java/org/apache/fop/fonts/FontCache.java 查看文件

* Serialization Version UID. Change this value if you want to make sure the * Serialization Version UID. Change this value if you want to make sure the
* user's cache file is purged after an update. * user's cache file is purged after an update.
*/ */
private static final long serialVersionUID = 605232520271754719L;
private static final long serialVersionUID = 9129238336422194339L;


/** logging instance */ /** logging instance */
private static Log log = LogFactory.getLog(FontCache.class); private static Log log = LogFactory.getLog(FontCache.class);
private static final String DEFAULT_CACHE_FILENAME = "fop-fonts.cache"; private static final String DEFAULT_CACHE_FILENAME = "fop-fonts.cache";


/** has this cache been changed since it was last read? */ /** has this cache been changed since it was last read? */
private transient boolean changed = false;
private transient boolean changed;


/** change lock */ /** change lock */
private final boolean[] changeLock = new boolean[1]; private final boolean[] changeLock = new boolean[1];
/** /**
* master mapping of font url -> font info. This needs to be a list, since a * master mapping of font url -> font info. This needs to be a list, since a
* TTC file may contain more than 1 font. * TTC file may contain more than 1 font.
* @serial
*/ */
private Map<String, CachedFontFile> fontfileMap = null; private Map<String, CachedFontFile> fontfileMap = null;


/** /**
* mapping of font url -> file modified date (for all fonts that have failed * mapping of font url -> file modified date (for all fonts that have failed
* to load) * to load)
* @serial
*/ */
private Map<String, Long> failedFontMap = null; private Map<String, Long> failedFontMap = null;


* *
* @return the font cache deserialized from the file (or null if no cache * @return the font cache deserialized from the file (or null if no cache
* file exists or if it could not be read) * file exists or if it could not be read)
* @deprecated use {@link #loadFrom(File)} instead
*/ */
public static FontCache load() { public static FontCache load() {
return loadFrom(getDefaultCacheFile(false)); return loadFrom(getDefaultCacheFile(false));
/** /**
* Writes the font cache to disk. * Writes the font cache to disk.
* *
* @throws FOPException
* fop exception
* @throws FOPException fop exception
* @deprecated use {@link #saveTo(File)} instead
*/ */
public void save() throws FOPException { public void save() throws FOPException {
saveTo(getDefaultCacheFile(true)); saveTo(getDefaultCacheFile(true));

Loading…
取消
儲存