You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2019/09/24 06:23:52 UTC

svn commit: r1867422 - /pdfbox/branches/issue4569/fontbox/src/main/java/org/apache/fontbox/ttf/GlyphSubstitutionTable.java

Author: tilman
Date: Tue Sep 24 06:23:52 2019
New Revision: 1867422

URL: http://svn.apache.org/viewvc?rev=1867422&view=rev
Log:
PDFBOX-4071: use jdk8 lambda expressions

Modified:
    pdfbox/branches/issue4569/fontbox/src/main/java/org/apache/fontbox/ttf/GlyphSubstitutionTable.java

Modified: pdfbox/branches/issue4569/fontbox/src/main/java/org/apache/fontbox/ttf/GlyphSubstitutionTable.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/fontbox/src/main/java/org/apache/fontbox/ttf/GlyphSubstitutionTable.java?rev=1867422&r1=1867421&r2=1867422&view=diff
==============================================================================
--- pdfbox/branches/issue4569/fontbox/src/main/java/org/apache/fontbox/ttf/GlyphSubstitutionTable.java (original)
+++ pdfbox/branches/issue4569/fontbox/src/main/java/org/apache/fontbox/ttf/GlyphSubstitutionTable.java Tue Sep 24 06:23:52 2019
@@ -557,15 +557,9 @@ public class GlyphSubstitutionTable exte
 
         if (enabledFeatures != null && result.size() > 1)
         {
-            Collections.sort(result, new Comparator<FeatureRecord>()
-            {
-                @Override
-                public int compare(FeatureRecord o1, FeatureRecord o2)
-                {
-                    return Integer.compare(enabledFeatures.indexOf(o1.getFeatureTag()),
-                            enabledFeatures.indexOf(o2.getFeatureTag()));
-                }
-            });
+            Collections.sort(result, 
+                    (o1, o2) -> Integer.compare(enabledFeatures.indexOf(o1.getFeatureTag()),
+                                                enabledFeatures.indexOf(o2.getFeatureTag())));
         }
 
         return result;