Project

General

Profile

« Previous | Next » 

Revision 935

Added by Jing Tao over 22 years ago

Some code format problem was fixed.

View differences:

src/edu/ucsb/nceas/metacat/AuthLdap.java
183 183
        {
184 184
            util.debugMessage("An invalid DN was provided!");
185 185
        } 
186
        catch(javax.naming.ReferralException re) 
186
        catch (javax.naming.ReferralException re) 
187 187
        {
188 188
          util.debugMessage("referral during authentication");
189 189
          util.debugMessage("Referral information: "+re.getReferralInfo());
......
196 196
            Thread.sleep(5000); //this is a manual override of ldap's 
197 197
                                //hideously long time out period.
198 198
            util.debugMessage("Awake after 5 seconds.");
199
            if(referralContext == null)
199
            if (referralContext == null)
200 200
            {
201 201
              t.interrupt();
202 202
              authenticated = false;
......
207 207

  
208 208
            }
209 209
          }
210
          catch(Exception e)
210
          catch (Exception e)
211 211
          {
212 212
            authenticated = false;
213 213
          }
......
525 525
        // Close the context when we're done
526 526
        ctx.close();
527 527

  
528
    } catch(ReferralException re) {
528
    } catch (ReferralException re) {
529 529
      try
530 530
      {
531 531
        refExc = re;
......
537 537
        //this is a manual override of ldap's hideously long time
538 538
        //out period.
539 539
        util.debugMessage("Awake after 5 seconds.");
540
        if(referralContext == null)
540
        if (referralContext == null)
541 541
        {
542 542
          t.interrupt();
543 543
          return null;
......
575 575
        referralContext.close();
576 576
        dc.close();
577 577
      }
578
      catch(Exception e)
578
      catch (Exception e)
579 579
      {
580 580
        return groups;
581 581
      }
......
919 919
    boolean moreReferrals=true;
920 920
    //set a while loop is because we don't know if a referral excption contains
921 921
    //another referral exception
922
    while(moreReferrals)
922
    while (moreReferrals)
923 923
    {
924 924
      try
925 925
      {
......
941 941
        moreReferrals=false;
942 942
      }//try
943 943
      //if referral have another referral excption
944
      catch(ReferralException re)
944
      catch (ReferralException re)
945 945
      {
946 946
        //keep running in while loop
947 947
        moreReferrals=true;
......
949 949
        refExc=re;
950 950
      }
951 951
      //catch a authentication exception
952
      catch(AuthenticationException ae)
952
      catch (AuthenticationException ae)
953 953
      {
954 954
        util.debugMessage("Error running referral handler thread: " + 
955 955
                          ae.getMessage());
......
959 959
        referralContext = null;
960 960
      }
961 961
      //catch a naming exception
962
      catch(NamingException ne)
962
      catch (NamingException ne)
963 963
      {
964 964
        util.debugMessage("Error running referral handler thread: " + 
965 965
                          ne.getMessage());

Also available in: Unified diff