db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker/util Base64.java
Date Sat, 22 May 2004 10:03:02 GMT
brj         2004/05/22 03:03:02

  Modified:    src/java/org/apache/ojb/broker/util/sequence
                        SequenceManagerNextValImpl.java
                        SequenceManagerStoredProcedureImpl.java
                        SequenceManagerNativeImpl.java
                        AbstractSequenceManager.java
                        SequenceManagerHelper.java
               src/java/org/apache/ojb/broker/util/batch
                        PreparedStatementInvocationHandler.java
               src/java/org/apache/ojb/broker/util/logging
                        CommonsLoggerImpl.java
               src/java/org/apache/ojb/broker/util Base64.java
  Log:
  commenting empty blocks
  
  Revision  Changes    Path
  1.16      +4 -1      db-ojb/src/java/org/apache/ojb/broker/util/sequence/SequenceManagerNextValImpl.java
  
  Index: SequenceManagerNextValImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/util/sequence/SequenceManagerNextValImpl.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- SequenceManagerNextValImpl.java	4 Apr 2004 23:53:38 -0000	1.15
  +++ SequenceManagerNextValImpl.java	22 May 2004 10:03:02 -0000	1.16
  @@ -183,6 +183,7 @@
           }
           catch (Exception ignore)
           {
  +            // ignore it
           }
           finally
           {
  @@ -192,6 +193,7 @@
               }
               catch (Exception ignore)
               {
  +                // ignore it
               }
           }
   
  @@ -208,6 +210,7 @@
               }
               catch (Exception ignore)
               {
  +                // ignore it
               }
           }
       }
  
  
  
  1.9       +3 -1      db-ojb/src/java/org/apache/ojb/broker/util/sequence/SequenceManagerStoredProcedureImpl.java
  
  Index: SequenceManagerStoredProcedureImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/util/sequence/SequenceManagerStoredProcedureImpl.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- SequenceManagerStoredProcedureImpl.java	4 Apr 2004 23:53:38 -0000	1.8
  +++ SequenceManagerStoredProcedureImpl.java	22 May 2004 10:03:02 -0000	1.9
  @@ -261,6 +261,7 @@
               }
               catch (SQLException ignore)
               {
  +                // ignore it
               }
           }
       }
  @@ -296,6 +297,7 @@
               }
               catch (SQLException ignore)
               {
  +                // ignore it
               }
           }
       }
  
  
  
  1.16      +2 -1      db-ojb/src/java/org/apache/ojb/broker/util/sequence/SequenceManagerNativeImpl.java
  
  Index: SequenceManagerNativeImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/util/sequence/SequenceManagerNativeImpl.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- SequenceManagerNativeImpl.java	9 Apr 2004 13:22:30 -0000	1.15
  +++ SequenceManagerNativeImpl.java	22 May 2004 10:03:02 -0000	1.16
  @@ -242,6 +242,7 @@
                   }
                   catch (SQLException e)
                   {
  +                    // ignore it
                   }
               }
           }
  
  
  
  1.17      +3 -1      db-ojb/src/java/org/apache/ojb/broker/util/sequence/AbstractSequenceManager.java
  
  Index: AbstractSequenceManager.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/util/sequence/AbstractSequenceManager.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- AbstractSequenceManager.java	11 May 2004 17:19:40 -0000	1.16
  +++ AbstractSequenceManager.java	22 May 2004 10:03:02 -0000	1.17
  @@ -148,6 +148,7 @@
       public void afterStore(JdbcAccess dbAccess, ClassDescriptor cld, Object obj)
               throws SequenceManagerException
       {
  +        // do nothing
       }
   
       /**
  @@ -156,5 +157,6 @@
       public void setReferenceFKs(Object obj, ClassDescriptor cld)
               throws SequenceManagerException
       {
  +       // do nothing
       }
   }
  
  
  
  1.17      +3 -2      db-ojb/src/java/org/apache/ojb/broker/util/sequence/SequenceManagerHelper.java
  
  Index: SequenceManagerHelper.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/util/sequence/SequenceManagerHelper.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- SequenceManagerHelper.java	11 May 2004 17:19:39 -0000	1.16
  +++ SequenceManagerHelper.java	22 May 2004 10:03:02 -0000	1.17
  @@ -310,7 +310,8 @@
               }
               catch (SQLException ignore)
               {
  -            }
  +                // ignore it
  +           }
           }
           return result;
       }
  
  
  
  1.12      +2 -0      db-ojb/src/java/org/apache/ojb/broker/util/batch/PreparedStatementInvocationHandler.java
  
  Index: PreparedStatementInvocationHandler.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/util/batch/PreparedStatementInvocationHandler.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- PreparedStatementInvocationHandler.java	4 Apr 2004 23:53:37 -0000	1.11
  +++ PreparedStatementInvocationHandler.java	22 May 2004 10:03:02 -0000	1.12
  @@ -63,6 +63,7 @@
           }
           catch ( Exception ex )
           {
  +            // ignore it
           }
           SET_BIG_DECIMAL = setBigDecimal;
       }
  @@ -95,6 +96,7 @@
           }
           catch ( SecurityException e )
           {
  +            // ignore it
           }
       }
   
  
  
  
  1.4       +2 -1      db-ojb/src/java/org/apache/ojb/broker/util/logging/CommonsLoggerImpl.java
  
  Index: CommonsLoggerImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/util/logging/CommonsLoggerImpl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- CommonsLoggerImpl.java	4 Apr 2004 23:53:38 -0000	1.3
  +++ CommonsLoggerImpl.java	22 May 2004 10:03:02 -0000	1.4
  @@ -293,6 +293,7 @@
   	 */
   	public void configure(Configuration config) throws ConfigurationException
   	{
  +	    // do nothing
   	}
   
   	/**
  
  
  
  1.6       +72 -37    db-ojb/src/java/org/apache/ojb/broker/util/Base64.java
  
  Index: Base64.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/util/Base64.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Base64.java	4 Apr 2004 23:53:36 -0000	1.5
  +++ Base64.java	22 May 2004 10:03:02 -0000	1.6
  @@ -407,34 +407,55 @@
        * @return The Base64-encoded object
        * @since 1.4
        */
  -    public static String encodeObject( java.io.Serializable serializableObject, boolean
breakLines )
  +    public static String encodeObject(java.io.Serializable serializableObject, boolean
breakLines)
       {
  -        java.io.ByteArrayOutputStream baos  = null; 
  -        java.io.OutputStream          b64os = null; 
  -        java.io.ObjectOutputStream    oos   = null; 
  -        
  +        java.io.ByteArrayOutputStream baos = null;
  +        java.io.OutputStream b64os = null;
  +        java.io.ObjectOutputStream oos = null;
  +
           try
           {
  -            baos  = new java.io.ByteArrayOutputStream();
  -            b64os = new Base64.OutputStream( baos, Base64.ENCODE, breakLines );
  -            oos   = new java.io.ObjectOutputStream( b64os );
  -            
  -            oos.writeObject( serializableObject );
  -        }   // end try
  -        catch( java.io.IOException e )
  +            baos = new java.io.ByteArrayOutputStream();
  +            b64os = new Base64.OutputStream(baos, Base64.ENCODE, breakLines);
  +            oos = new java.io.ObjectOutputStream(b64os);
  +
  +            oos.writeObject(serializableObject);
  +        } // end try
  +        catch (java.io.IOException e)
           {
               e.printStackTrace();
               return null;
  -        }   // end catch
  +        } // end catch
           finally
           {
  -            try{ oos.close();   } catch( Exception e ){}
  -            try{ b64os.close(); } catch( Exception e ){}
  -            try{ baos.close();  } catch( Exception e ){}
  -        }   // end finally
  -        
  -        return new String( baos.toByteArray() );
  -    }   // end encode
  +            try
  +            {
  +                oos.close();
  +            }
  +            catch (Exception e)
  +            {
  +                // ignore it
  +            }
  +            try
  +            {
  +                b64os.close();
  +            }
  +            catch (Exception e)
  +            {
  +                // ignore it
  +            }
  +            try
  +            {
  +                baos.close();
  +            }
  +            catch (Exception e)
  +            {
  +                // ignore it
  +            }
  +        } // end finally
  +
  +        return new String(baos.toByteArray());
  +    } // end encode
       
       
       /**
  @@ -700,36 +721,50 @@
        * @return The decoded and deserialized object
        * @since 1.4
        */
  -    public static Object decodeToObject( String encodedObject )
  +    public static Object decodeToObject(String encodedObject)
       {
  -        byte[] objBytes = decode( encodedObject );
  -        
  +        byte[] objBytes = decode(encodedObject);
  +
           java.io.ByteArrayInputStream bais = null;
  -        java.io.ObjectInputStream    ois  = null;
  -        
  +        java.io.ObjectInputStream ois = null;
  +
           try
           {
  -            bais = new java.io.ByteArrayInputStream( objBytes );
  -            ois  = new java.io.ObjectInputStream( bais );
  -        
  +            bais = new java.io.ByteArrayInputStream(objBytes);
  +            ois = new java.io.ObjectInputStream(bais);
  +
               return ois.readObject();
  -        }   // end try
  -        catch( java.io.IOException e )
  +        } // end try
  +        catch (java.io.IOException e)
           {
               e.printStackTrace();
               return null;
  -        }   // end catch
  -        catch( java.lang.ClassNotFoundException e )
  +        } // end catch
  +        catch (java.lang.ClassNotFoundException e)
           {
               e.printStackTrace();
               return null;
  -        }   // end catch
  +        } // end catch
           finally
           {
  -            try{ bais.close(); } catch( Exception e ){}
  -            try{ ois.close();  } catch( Exception e ){}
  -        }   // end finally
  -    }   // end decodeObject
  +            try
  +            {
  +                bais.close();
  +            }
  +            catch (Exception e)
  +            {
  +                // ignore it
  +           }
  +            try
  +            {
  +                ois.close();
  +            }
  +            catch (Exception e)
  +            {
  +                // ignore it
  +            }
  +        } // end finally
  +    } // end decodeObject
       
       
       /**
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message