@@ -46,7 +46,6 @@ This file is part of the iText (R) project.
46
46
import com .itextpdf .io .IOException ;
47
47
import com .itextpdf .io .util .ArrayUtil ;
48
48
49
- import java .text .MessageFormat ;
50
49
import java .util .Set ;
51
50
52
51
/**
@@ -277,7 +276,7 @@ public static FontProgram createFont(String name, byte[] font, boolean cached) t
277
276
if (name != null ) {
278
277
fontKey = name ;
279
278
} else {
280
- fontKey = MessageFormat . format ( "{0}" , ArrayUtil .hashCode (font ));
279
+ fontKey = Integer . toString ( ArrayUtil .hashCode (font ));
281
280
}
282
281
fontFound = FontCache .getFont (fontKey );
283
282
if (fontFound != null ) {
@@ -378,7 +377,7 @@ public static FontProgram createType1Font(String name, byte[] afm, byte[] pfb, b
378
377
if (name != null ) {
379
378
fontKey = name ;
380
379
} else {
381
- fontKey = MessageFormat . format ( "{0}" , ArrayUtil .hashCode (afm ));
380
+ fontKey = Integer . toString ( ArrayUtil .hashCode (afm ));
382
381
}
383
382
fontProgram = FontCache .getFont (fontKey );
384
383
if (fontProgram != null ) {
@@ -463,7 +462,7 @@ public static FontProgram createFont(String ttc, int ttcIndex, boolean cached) t
463
462
public static FontProgram createFont (byte [] ttc , int ttcIndex , boolean cached ) throws java .io .IOException {
464
463
String fontKey = null ;
465
464
if (cached ) {
466
- fontKey = MessageFormat . format ( "{0}{1}" , ArrayUtil .hashCode (ttc ), ttcIndex );
465
+ fontKey = Integer . toString ( ArrayUtil .hashCode (ttc )) + Integer . toString ( ttcIndex );
467
466
FontProgram fontFound = FontCache .getFont (fontKey );
468
467
if (fontFound != null ) {
469
468
return fontFound ;
0 commit comments