From 4b38943bdb92259f0713fd1e246d936eef4ebfb4 Mon Sep 17 00:00:00 2001 From: drizea Date: Mon, 23 Jul 2012 10:16:54 +0300 Subject: [PATCH] fix REAUTH bug when session expire exception was throwned --- .../android/accountAccess/AccountAccess.java | 5 +++-- .../checkout/ItemsCheckOutListView.java | 3 +++ .../src/org/evergreen/android/globals/Utils.java | 25 ++++++++++++---------- 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/Open-ILS/src/Android/src/org/evergreen/android/accountAccess/AccountAccess.java b/Open-ILS/src/Android/src/org/evergreen/android/accountAccess/AccountAccess.java index a9f27ba852..7fbf4f9b11 100644 --- a/Open-ILS/src/Android/src/org/evergreen/android/accountAccess/AccountAccess.java +++ b/Open-ILS/src/Android/src/org/evergreen/android/accountAccess/AccountAccess.java @@ -640,7 +640,9 @@ public class AccountAccess { //fields of interest : expire_time List listHoldsAhr = null; - listHoldsAhr = (List) Utils.doRequest(conn, SERVICE_CIRC, METHOD_FETCH_HOLDS, authToken, cm, new Object[]{authToken,userID}); + Object resp = Utils.doRequest(conn, SERVICE_CIRC, METHOD_FETCH_HOLDS, authToken, cm, new Object[]{authToken,userID}); + + listHoldsAhr = (List) resp; for(int i=0;i)response).get("textcode"); - if(textcode != null){ - if(textcode.equals("NO_SESSION")){ - System.out.println("REQUIRE NEW SESSION"); - throw new SessionNotFoundException(); - } - - } - }catch(Exception e){ - System.err.println("Exception in retreive" + e.getMessage()); + String textcode = null; + try{ + textcode = ((Map)response).get("textcode"); + }catch(Exception e){ + System.err.println("Exception in retreive" + e.getMessage()); + } + + if(textcode != null){ + if(textcode.equals("NO_SESSION")){ + //System.out.println("REQUIRE NEW SESSION"); + throw new SessionNotFoundException(); + } + } + return response; } -- 2.11.0