@@ -116,17 +116,16 @@ private static String getPlatformDir() {
116116 }
117117 File [] possibleSdks = sdkDir .listFiles (new FileFilter () {
118118 @ Override
119- public boolean accept (File pathname ) {
120- return pathname .isDirectory () && pathname .getAbsolutePath ().contains ("android-sdk" );
119+ public boolean accept (File path ) {
120+ return path .isDirectory () && path .getAbsolutePath ().contains ("android-sdk" );
121121 }
122122 });
123123 for (File possibleSdk : possibleSdks ) {
124124 File platformsDir = new File (possibleSdk , "platforms" );
125125 File [] platforms = platformsDir .listFiles (new FileFilter () {
126126 @ Override
127- public boolean accept (File pathname ) {
128- return pathname .isDirectory ()
129- && pathname .toPath ().getFileName ().toString ().startsWith ("android-" );
127+ public boolean accept (File path ) {
128+ return path .isDirectory () && path .getName ().startsWith ("android-" );
130129 }
131130 });
132131 if (platforms == null || platforms .length == 0 ) {
@@ -137,10 +136,8 @@ public boolean accept(File pathname) {
137136 @ Override
138137 public int compare (File o1 , File o2 ) {
139138 final int MAX_VALUE = 1000 ;
140- String suffix1 = o1 .toPath ().getFileName ().toString ()
141- .substring ("android-" .length ());
142- String suffix2 = o2 .toPath ().getFileName ().toString ()
143- .substring ("android-" .length ());
139+ String suffix1 = o1 .getName ().substring ("android-" .length ());
140+ String suffix2 = o2 .getName ().substring ("android-" .length ());
144141 int suff1 , suff2 ;
145142 try {
146143 suff1 = Integer .parseInt (suffix1 );
0 commit comments