Fix the track EDKT187: If a module do not use PCD, PcdLib library class need not...
[mirror_edk2.git] / Tools / Source / GenBuild / org / tianocore / build / global / SurfaceAreaQuery.java
index 4b5e1ff..1086bb8 100644 (file)
@@ -624,10 +624,9 @@ public class SurfaceAreaQuery {
                 libraryClassName.add(libraryClassList[i].getKeyword());\r
                        }\r
         }\r
-               String[] libraryArray = new String[libraryClassName.size()];\r
-               for (int i = 0; i < libraryClassName.size(); i++) {\r
-                       libraryArray[i] = libraryClassName.get(i);\r
-               }\r
+\r
+        String[] libraryArray = new String[libraryClassName.size()];\r
+        libraryClassName.toArray(libraryArray);\r
         return libraryArray;\r
     }\r
 \r