0 Replies Latest reply on Mar 23, 2006 12:17 PM by Robert Morris

    Simple objects can fail to clone properly.

    Robert Morris Newbie

      public void testCopyTextFormatter() throws Exception {
      DecimalFormat format = new DecimalFormat( "##0.#####E0" );
      format.format( 5.35 );
      DecimalFormat cloneOfFormat= (DecimalFormat) new JBossObjectOutputStream( null, null ).smartClone( format );
      assertEquals( format.format( 5.35 ), cloneOfFormat.format( 5.35 ) );
      }

      A similiar test can be constructed for new JButton() which will also fail.