nacho       00/12/03 17:15:03

  Modified:    src/share/org/apache/tomcat/request SimpleRealm.java
  Log:
  Using new getDebug() to avoid
  some strange problems between windows JDK's .
  
  Something really weird was happen, Sun JDK 1.3.0
  was running just fine but JDK 1.2.2 issue
  Illegal Access Exceptions with the same code,
  or i'm crazy?  ( perhaps this last :)
  
  Revision  Changes    Path
  1.15      +3 -7      
jakarta-tomcat/src/share/org/apache/tomcat/request/SimpleRealm.java
  
  Index: SimpleRealm.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/request/SimpleRealm.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- SimpleRealm.java  2000/12/04 00:38:57     1.14
  +++ SimpleRealm.java  2000/12/04 01:15:03     1.15
  @@ -93,7 +93,6 @@
       public void contextInit(Context ctx)
        throws TomcatException
       {
  -        super.contextInit(ctx);
           setContextManager(ctx.getContextManager());
           init(cm,ctx);
           try {
  @@ -176,13 +175,11 @@
       /** Called when the ContextManger is started
        */
       public void engineInit(ContextManager cm) throws TomcatException {
  -//        super.engineInit(cm);
           init(cm,null);
       }
   
       void init(ContextManager cm,Context ctx) {
        if( memoryRealm==null) {
  -            System.out.println(cm);
            memoryRealm = new MemoryRealm(filename,cm.getHome());
            try {
                memoryRealm.readMemoryRealm();
  @@ -213,7 +210,7 @@
           }
   
           public void addUser(String name, String pass, String groups ) {
  -            if( debug > 0 )  log( "Add user " + name + " " + pass + " " + groups );
  +            if( getDebug() > 0 )  log( "Add user " + name + " " + pass + " " + 
groups );
               passwords.put( name, pass );
               groups += ",";
               while (true) {
  @@ -243,7 +240,7 @@
   
           public boolean checkPassword( String user, String pass ) {
               if( user==null ) return false;
  -            if( debug > 0 ) log( "check " + user+ " " + pass + " " + passwords.get( 
user ));
  +            if( getDebug() > 0 ) log( "check " + user+ " " + pass + " " + 
passwords.get( user ));
               return pass.equals( (String)passwords.get( user ) );
           }
   
  @@ -259,7 +256,7 @@
   
           public boolean userInRole( String user, String role ) {
               Vector users=(Vector)roles.get(role);
  -            if( debug > 0 ) log( "check role " + user+ " " + role + " "  );
  +            if( getDebug() > 0 ) log( "check role " + user+ " " + role + " "  );
               if(users==null) return false;
               return users.indexOf( user ) >=0 ;
           }
  @@ -297,4 +294,3 @@
       }
   
   }
  -
  
  
  

Reply via email to