diff options
author | PJ Fanning <fanningpj@apache.org> | 2021-10-21 10:14:10 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2021-10-21 10:14:10 +0000 |
commit | f454cfa63a7c2d256276ca81d11874a58c4a6fdd (patch) | |
tree | b0dc9499129f71f53af87e47b5d2c85e768d91e2 | |
parent | fa00e7d472eafd6354e77b43c3668cd205f857a3 (diff) | |
download | poi-f454cfa63a7c2d256276ca81d11874a58c4a6fdd.tar.gz poi-f454cfa63a7c2d256276ca81d11874a58c4a6fdd.zip |
[bug-65639] add doc about lack of thread saftey
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1894439 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | poi-scratchpad/src/main/java/org/apache/poi/hslf/record/FontEmbeddedData.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/FontEmbeddedData.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/FontEmbeddedData.java index b27cdb4b53..dc0a8e9410 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/FontEmbeddedData.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/FontEmbeddedData.java @@ -91,12 +91,22 @@ public class FontEmbeddedData extends RecordAtom implements FontFacet { out.write(_data); } + /** + * Overwrite the font data. Reading values from this FontEmbeddedData instance while calling setFontData + * is not thread safe. + * @param fontData new font data + */ public void setFontData(byte[] fontData) { fontHeader = null; _data = fontData.clone(); LittleEndian.putInt(_header, 4, _data.length); } + /** + * Read the font data. Reading values from this FontEmbeddedData instance while calling {@link #setFontData(byte[])} + * is not thread safe. + * @return font data + */ public FontHeader getFontHeader() { if (fontHeader == null) { FontHeader h = new FontHeader(); |