diff options
author | Andreas Beeker <kiwiwings@apache.org> | 2020-04-05 20:50:40 +0000 |
---|---|---|
committer | Andreas Beeker <kiwiwings@apache.org> | 2020-04-05 20:50:40 +0000 |
commit | 65ccec11cb7d8806b0da6c9c8dead6706621c1e7 (patch) | |
tree | c9c5b71607dd745fbea0bc80cbfdd6244ca5cea0 /src/java/org/apache/poi/common/usermodel | |
parent | d8421364646f195743625f24848205f999cdca53 (diff) | |
download | poi-65ccec11cb7d8806b0da6c9c8dead6706621c1e7.tar.gz poi-65ccec11cb7d8806b0da6c9c8dead6706621c1e7.zip |
Sonar fixes - String literals should not be duplicated
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1876163 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/poi/common/usermodel')
-rw-r--r-- | src/java/org/apache/poi/common/usermodel/fonts/FontCharset.java | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/java/org/apache/poi/common/usermodel/fonts/FontCharset.java b/src/java/org/apache/poi/common/usermodel/fonts/FontCharset.java index 32915149f2..28df6cad4e 100644 --- a/src/java/org/apache/poi/common/usermodel/fonts/FontCharset.java +++ b/src/java/org/apache/poi/common/usermodel/fonts/FontCharset.java @@ -24,11 +24,12 @@ import org.apache.poi.util.POILogFactory; import org.apache.poi.util.POILogger; /** - * Charset represents the basic set of characters associated with a font (that it can display), and + * Charset represents the basic set of characters associated with a font (that it can display), and * corresponds to the ANSI codepage (8-bit or DBCS) of that character set used by a given language. - * + * * @since POI 3.17-beta2 */ +@SuppressWarnings("java:S1192") public enum FontCharset { /** Specifies the English character set. */ ANSI(0x00000000, "Cp1252"), @@ -80,17 +81,17 @@ public enum FontCharset { OEM(0x000000FF, "Cp1252"); private static FontCharset[] _table = new FontCharset[256]; - + private int nativeId; private Charset charset; - + static { for (FontCharset c : values()) { _table[c.getNativeId()] = c; } } - + FontCharset(int flag, String javaCharsetName) { this.nativeId = flag; if (javaCharsetName.length() > 0) { @@ -113,12 +114,12 @@ public enum FontCharset { public Charset getCharset() { return charset; } - + public int getNativeId() { return nativeId; } public static FontCharset valueOf(int value){ - return (value < 0 || value >= _table.length) ? null :_table[value]; + return (value < 0 || value >= _table.length) ? null : _table[value]; } }
\ No newline at end of file |