@@ -349,24 +349,24 @@ private int toCIDFromRanges(byte[] code)
349349 */
350350 void addCharMapping (byte [] codes , String unicode )
351351 {
352- if (codes .length == 1 )
352+ switch (codes .length )
353353 {
354- charToUnicodeOneByte . put ( CMapStrings . getIndexValue ( codes ), unicode );
355- unicodeToByteCodes .put (unicode , CMapStrings .getByteValue (codes ));
356- }
357- else if ( codes . length == 2 )
358- {
359- charToUnicodeTwoBytes .put (CMapStrings .getIndexValue (codes ), unicode );
360- unicodeToByteCodes .put (unicode , CMapStrings .getByteValue (codes ));
361- }
362- else if ( codes . length == 3 || codes . length == 4 )
363- {
364- charToUnicodeMoreBytes .put (toInt (codes ), unicode );
365- unicodeToByteCodes .put (unicode , codes .clone ());
366- }
367- else
368- {
369- LOG . warn ( "Mappings with more than 4 bytes (here: {}) aren't supported yet" , codes . length ) ;
354+ case 1 :
355+ charToUnicodeOneByte .put (CMapStrings .getIndexValue (codes ), unicode );
356+ unicodeToByteCodes . put ( unicode , CMapStrings . getByteValue ( codes ));
357+ break ;
358+ case 2 :
359+ charToUnicodeTwoBytes .put (CMapStrings .getIndexValue (codes ), unicode );
360+ unicodeToByteCodes .put (unicode , CMapStrings .getByteValue (codes ));
361+ break ;
362+ case 3 :
363+ case 4 :
364+ charToUnicodeMoreBytes .put (toInt (codes ), unicode );
365+ unicodeToByteCodes .put (unicode , codes .clone ());
366+ break ;
367+ default :
368+ LOG . warn ( "Mappings with more than 4 bytes (here: {}) aren't supported yet" , codes . length );
369+ break ;
370370 }
371371 // fixme: ugly little hack
372372 if (SPACE .equals (unicode ))
0 commit comments