+ if (o instanceof SimpleSessionHandle[]) {\r
+ sessions = (SimpleSessionHandle[]) o;\r
+ } else {\r
+ // legacy support or incorrect path.\r
+ if (o instanceof SessionHandle[]) {\r
+ log.info("Importing VAMSAS 0.1 clientHandle list.");\r
+ SessionHandle[] oldsess = (SessionHandle[]) o;\r
+ File sessdir;\r
+ sessions = new SimpleSessionHandle[oldsess.length];\r
+ for (int s=0;s<oldsess.length;s++)\r
+ {\r
+ try {\r
+ sessdir = new SessionUrn(oldsess[s].getSessionUrn()).asFile();\r
+ // try to locate it.\r
+ sessions[s] = new SimpleSessionHandle(oldsess[s].getSessionUrn(), sessdir);\r
+ } catch (Exception e)\r
+ {\r
+ // give up and report an error.\r
+ sessions = null;\r
+ throw new Exception("Legacy SessionFile problem. Couldn't locate "+oldsess[s]+" as a file.",e);\r
+ }\r
+ }\r
+ }\r
+ }\r