OSDN Git Service

リファクタリング. 可変長引数に変更.
authoryukihane <yukihane.feather@gmail.com>
Sat, 17 Sep 2011 07:58:51 +0000 (16:58 +0900)
committeryukihane <yukihane.feather@gmail.com>
Sat, 17 Sep 2011 07:58:51 +0000 (16:58 +0900)
frontend/src/saccubus/net/Cookie.java
frontend/src/saccubus/net/CookieWinMsIe.java

index 03fc962..bf3da89 100644 (file)
@@ -55,7 +55,7 @@ public abstract class Cookie {
      * @param cookieDirs cookie保存ディレクトリの候補.
      * @return ユーザセッション文字列. 無ければnull.
      */
-    protected final String getUserSessionFromDir(List<File> cookieDirs, String charsetName) throws IOException {
+    protected final String getUserSessionFromDir(String charsetName, File... cookieDirs) throws IOException {
         for (File dir : cookieDirs) {
             if (dir.isDirectory()) {
                 File[] files = dir.listFiles();
index ea147ed..c2f74c6 100644 (file)
@@ -34,6 +34,6 @@ public class CookieWinMsIe extends Cookie {
         // これは何だ?
         searchDirs.add(new File(userProfile + "\\Cookies\\"));
 
-        return getUserSessionFromDir(searchDirs, "MS932");
+        return getUserSessionFromDir("MS932", searchDirs.toArray(new File[0]));
     }
 }