Use map method directly if possible
JDT provides a new cleanup which allows to transform code to call
methods directly on map instead of accessing the values or the keys
before calling a method. In this change an access to size is simplified.
Saves code which we have to read and might be slightly faster.
Change-Id: Ibc37922089209c1969fae4d7de5850033b099acf
Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
diff --git a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/runtime/PerformanceStats.java b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/runtime/PerformanceStats.java
index 3adce7e..948ed4c 100644
--- a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/runtime/PerformanceStats.java
+++ b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/runtime/PerformanceStats.java
@@ -200,7 +200,7 @@
* will be empty if there are no recorded statistics.
*/
public static PerformanceStats[] getAllStats() {
- return statMap.values().toArray(new PerformanceStats[statMap.values().size()]);
+ return statMap.values().toArray(new PerformanceStats[statMap.size()]);
}
/**