You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Gary Johnston <gj...@us.ibm.com> on 2008/02/28 19:36:34 UTC

BeanUtils 1.8.0 in Struts 1.3.9?

Hi, all,
I couldn't find an answer to this in the 1.3.9 beta docs or in the mailing 
list archives:  Does Struts 1.3.9 plan to move up to BeanUtils 1.8.0? Both 
are currently beta releases, but the Struts 1.3.9 beta includes BeanUtils 
1.7.0.  Any chance that the next Struts 1.3.9 beta/rc/whatever could move 
up to include BeanUtils 1.8.0 beta (and, subsequently, BeanUtils 1.8.0 
once it is released)?  BeanUtils hasn't had a release in quite a while, so 
it seems like it would be a good opportunity for Struts 1.3.9 to release 
with the latest and greatest BeanUtils.
- Gary 
Gary Johnston
Team Lead, Web Diagram Editor, Struts Tools
Rational Application Developer Development

gjohnsto@us.ibm.com
(919) 254-0027; tieline: 444-0027; ITN: 24440027
4205 S. Miami Blvd., Durham, NC 27703-9141
USPS: PO Box 12195, 9ZUA/B501/N112, 3039 Cornwallis Rd.
Research Triangle Park, NC 27709-2195 


BeanUtils 1.8.0 (was BeanUtils 1.8.0 in Struts 1.3.9?)

Posted by Al Sutton <al...@alsutton.com>.
Given the general warm feeling towards 1.8.0, should we make sure 2.1 uses 
it as well?

Al.

----- Original Message ----- 
From: "Paul Benedict" <pb...@apache.org>
To: "Struts Developers List" <de...@struts.apache.org>
Sent: Friday, February 29, 2008 3:43 AM
Subject: Re: BeanUtils 1.8.0 in Struts 1.3.9?


> When 1.8 is released, it will become the official version for Struts 1.4.
> However, that doesn't stop anyone from upgrading 1.3.9 themselves. 1.7 
> will
> stay the preferred dependency for 1.3.x
>
> Paul
>
> On Thu, Feb 28, 2008 at 12:36 PM, Gary Johnston <gj...@us.ibm.com> 
> wrote:
>
>>
>> Hi, all,
>> I couldn't find an answer to this in the 1.3.9 beta docs or in the 
>> mailing
>> list archives:  Does Struts 1.3.9 plan to move up to BeanUtils 1.8.0?
>>  Both are currently beta releases, but the Struts 1.3.9 beta includes
>> BeanUtils 1.7.0.  Any chance that the next Struts 1.3.9 beta/rc/whatever
>> could move up to include BeanUtils 1.8.0 beta (and, subsequently,
>> BeanUtils 1.8.0 once it is released)?  BeanUtils hasn't had a release in
>> quite a while, so it seems like it would be a good opportunity for Struts
>> 1.3.9 to release with the latest and greatest BeanUtils.  - Gary
>> ------------------------------
>>  *Gary 
>> Johnston*<http://w3.ibm.com/bluepages/searchByName.wss?task=viewrecord&index=1&uid=225256897>
>> Team Lead, Web Diagram Editor, Struts <http://struts.apache.org/> Tools
>> Rational Application Developer 
>> Development<http://www.ibm.com/software/awdtools/developer/application/index.html>
>> [image: Rational Software] <http://www.ibm.com/software/rational/>[image:
>> WebSphere Software] <http://www.ibm.com/software/websphere/>
>> gjohnsto@us.ibm.com
>> (919) 254-0027; tieline: 444-0027; 
>> ITN<http://w3.ibm.com/bluepages/help/en/whk/html/itn.html>:
>> 24440027
>> 4205 S. Miami Blvd., Durham, NC 
>> 27703-9141<http://maps.google.com/maps?q=4205+S.+Miami,+Durham,+NC&ie=UTF8&ll=35.904207,-78.851795&spn=0.012497,0.018733&t=h&z=16&om=1>
>> USPS: PO Box 12195, 9ZUA/B501/N112, 3039 Cornwallis Rd.
>> Research Triangle Park, NC 
>> 27709-2195<http://maps.google.com/maps?f=q&hl=en&geocode=&q=3039+Cornwallis,+NC+27709-2195&sll=37.0625,-95.677068&sspn=49.624204,76.728516&ie=UTF8&ll=35.908778,-78.862953&spn=0.012496,0.018733&t=h&z=16&om=1>
>>  ------------------------------
>>
>>
> 


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


Re: BeanUtils 1.8.0 in Struts 1.3.9?

Posted by Paul Benedict <pb...@apache.org>.
When 1.8 is released, it will become the official version for Struts 1.4.
However, that doesn't stop anyone from upgrading 1.3.9 themselves. 1.7 will
stay the preferred dependency for 1.3.x

Paul

On Thu, Feb 28, 2008 at 12:36 PM, Gary Johnston <gj...@us.ibm.com> wrote:

>
> Hi, all,
> I couldn't find an answer to this in the 1.3.9 beta docs or in the mailing
> list archives:  Does Struts 1.3.9 plan to move up to BeanUtils 1.8.0?
>  Both are currently beta releases, but the Struts 1.3.9 beta includes
> BeanUtils 1.7.0.  Any chance that the next Struts 1.3.9 beta/rc/whatever
> could move up to include BeanUtils 1.8.0 beta (and, subsequently,
> BeanUtils 1.8.0 once it is released)?  BeanUtils hasn't had a release in
> quite a while, so it seems like it would be a good opportunity for Struts
> 1.3.9 to release with the latest and greatest BeanUtils.  - Gary
> ------------------------------
>  *Gary Johnston*<http://w3.ibm.com/bluepages/searchByName.wss?task=viewrecord&index=1&uid=225256897>
> Team Lead, Web Diagram Editor, Struts <http://struts.apache.org/> Tools
> Rational Application Developer Development<http://www.ibm.com/software/awdtools/developer/application/index.html>
> [image: Rational Software] <http://www.ibm.com/software/rational/>[image:
> WebSphere Software] <http://www.ibm.com/software/websphere/>
> gjohnsto@us.ibm.com
> (919) 254-0027; tieline: 444-0027; ITN<http://w3.ibm.com/bluepages/help/en/whk/html/itn.html>:
> 24440027
> 4205 S. Miami Blvd., Durham, NC 27703-9141<http://maps.google.com/maps?q=4205+S.+Miami,+Durham,+NC&ie=UTF8&ll=35.904207,-78.851795&spn=0.012497,0.018733&t=h&z=16&om=1>
> USPS: PO Box 12195, 9ZUA/B501/N112, 3039 Cornwallis Rd.
> Research Triangle Park, NC 27709-2195<http://maps.google.com/maps?f=q&hl=en&geocode=&q=3039+Cornwallis,+NC+27709-2195&sll=37.0625,-95.677068&sspn=49.624204,76.728516&ie=UTF8&ll=35.908778,-78.862953&spn=0.012496,0.018733&t=h&z=16&om=1>
>  ------------------------------
>
>

Re: BeanUtils 1.8.0 in Struts 1.3.9?

Posted by Niall Pemberton <ni...@gmail.com>.
On Thu, Feb 28, 2008 at 6:44 PM, Antonio Petrelli
<an...@gmail.com> wrote:
> 2008/2/28, Gary Johnston <gj...@us.ibm.com>:
>
> >
>  > I couldn't find an answer to this in the 1.3.9 beta docs or in the mailing list archives:  Does Struts 1.3.9 plan to move up to BeanUtils 1.8.0?  Both are currently beta releases, but the Struts 1.3.9 beta includes BeanUtils 1.7.0.  Any chance that the next Struts 1.3.9 beta/rc/whatever could move up to include BeanUtils 1.8.0 beta (and, subsequently, BeanUtils 1.8.0 once it is released)?  BeanUtils hasn't had a release in quite a while, so it seems like it would be a good opportunity for Struts 1.3.9 to release with the latest and greatest BeanUtils.
>
>
>  In the release notes of BeanUtils 1.8.0 you can read:
>
>  <snip>
>  Compatibility with 1.7.0
>  ========================
>  BeanUtils 1.8.0-BETA is binary compatible release with Beanutils 1.7.0,
>  containing a number of bug fixes and enhancements.
>  </snip>
>
>  Therefore you can put the new version of BeanUtils on your side with
>  no side effects.
>  I believe that, if BeanUtils 1.8.x won't become GA, it won't be
>  included in Struts 1.3.x (or 1.4).

The main reason there hasn't been a BeanUtils 1.8.0 release is because
a memory leak issue was raised that I haven't had the time or
inclination to look at yet. Having said that the same issue exists in
BeanUtils 1.7.0 so IMO upgrading to BeanUtils 1.8.0-BETA is a good
idea and I've been using it in a live environment since it was
released.

Niall

>  Antonio

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


Re: BeanUtils 1.8.0 in Struts 1.3.9?

Posted by Antonio Petrelli <an...@gmail.com>.
2008/2/28, Gary Johnston <gj...@us.ibm.com>:
>
> I couldn't find an answer to this in the 1.3.9 beta docs or in the mailing list archives:  Does Struts 1.3.9 plan to move up to BeanUtils 1.8.0?  Both are currently beta releases, but the Struts 1.3.9 beta includes BeanUtils 1.7.0.  Any chance that the next Struts 1.3.9 beta/rc/whatever could move up to include BeanUtils 1.8.0 beta (and, subsequently, BeanUtils 1.8.0 once it is released)?  BeanUtils hasn't had a release in quite a while, so it seems like it would be a good opportunity for Struts 1.3.9 to release with the latest and greatest BeanUtils.


In the release notes of BeanUtils 1.8.0 you can read:

<snip>
Compatibility with 1.7.0
========================
BeanUtils 1.8.0-BETA is binary compatible release with Beanutils 1.7.0,
containing a number of bug fixes and enhancements.
</snip>

Therefore you can put the new version of BeanUtils on your side with
no side effects.
I believe that, if BeanUtils 1.8.x won't become GA, it won't be
included in Struts 1.3.x (or 1.4).

Antonio

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


Re: OT: BeanUtils 1.7 and 1.8

Posted by Niall Pemberton <ni...@gmail.com>.
You should ask this on the commons user list:
  http://commons.apache.org/beanutils/mail-lists.html

...but the reason is because you have used the wrong names for keys in
your Map - the first character should be lower case (so "properyA" and
"propertyB") - this is the java beans spec

If you change the key names then it works.

Niall

On Fri, Feb 29, 2008 at 8:27 AM, Giovanni Azua <gi...@imc.nl> wrote:
> hi,
>
>  Sorry for the of-topic but given that BeanUtils is heavily used in
>  Struts, can anyone suggest why this test does not pass neither in 1.7
>  nor 1.8? alternative way using BeanUtils? I had to end up implementing
>  my own Reflection-based copyProperties ...
>
>
>  //------------------------------------------------------------------------
>     public void
>     testCopyProperties()
>     throws Exception
>     {
>         class SomeBean
>         {
>
>  //----------------------------------------------------------------
>             public final double
>             getPropertyA()
>             {
>                 return thePropertyA;
>             }
>
>
>  //----------------------------------------------------------------
>             public final void
>             setPropertyA(double aPropertyA)
>             {
>                 thePropertyA = aPropertyA;
>             }
>
>
>  //----------------------------------------------------------------
>             public final double
>             getPropertyB()
>             {
>                 return thePropertyB;
>             }
>
>
>  //----------------------------------------------------------------
>             public final void
>             setPropertyB(double aPropertyB)
>             {
>                 thePropertyB = aPropertyB;
>             }
>
>
>  //----------------------------------------------------------------
>             /** (non-Javadoc)
>              * @see java.lang.Object#toString()
>              */
>             @Override
>             public String
>             toString()
>             {
>                 return "(" + getPropertyA() + ", " + getPropertyB() + ")";
>             }
>
>
>  //----------------------------------------------------------------
>             // members
>
>  //----------------------------------------------------------------
>             private double thePropertyA = 0;
>             private double thePropertyB = 0;
>         }
>
>         Object myBean = new SomeBean();
>
>         String myExpected = "(1.0, 1.0)";
>
>         Map<String, Object> myMap = new HashMap<String, Object>();
>         myMap.put("PropertyA", 1.0);
>         myMap.put("PropertyB", 1.0);
>
>         BeanUtilsBean.getInstance().copyProperties(myBean, myMap);
>
>         assertEquals("BeanUtilsBean.copyProperties did not work as
>  expected",
>             myExpected, myBean.toString());
>     }
>
>  TIA,
>  regards,
>  Giovanni
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>  For additional commands, e-mail: dev-help@struts.apache.org
>
>

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


OT: BeanUtils 1.7 and 1.8

Posted by Giovanni Azua <gi...@imc.nl>.
hi,

Sorry for the of-topic but given that BeanUtils is heavily used in 
Struts, can anyone suggest why this test does not pass neither in 1.7 
nor 1.8? alternative way using BeanUtils? I had to end up implementing 
my own Reflection-based copyProperties ...

    
//------------------------------------------------------------------------
    public void
    testCopyProperties()
    throws Exception
    {
        class SomeBean
        {
            
//----------------------------------------------------------------
            public final double
            getPropertyA()
            {
                return thePropertyA;
            }

            
//----------------------------------------------------------------
            public final void
            setPropertyA(double aPropertyA)
            {
                thePropertyA = aPropertyA;
            }

            
//----------------------------------------------------------------
            public final double
            getPropertyB()
            {
                return thePropertyB;
            }

            
//----------------------------------------------------------------
            public final void
            setPropertyB(double aPropertyB)
            {
                thePropertyB = aPropertyB;
            }

            
//----------------------------------------------------------------
            /** (non-Javadoc)
             * @see java.lang.Object#toString()
             */
            @Override
            public String
            toString()
            {
                return "(" + getPropertyA() + ", " + getPropertyB() + ")";
            }           

            
//----------------------------------------------------------------
            // members
            
//----------------------------------------------------------------
            private double thePropertyA = 0;
            private double thePropertyB = 0;
        }
       
        Object myBean = new SomeBean();
         
        String myExpected = "(1.0, 1.0)";

        Map<String, Object> myMap = new HashMap<String, Object>();
        myMap.put("PropertyA", 1.0);
        myMap.put("PropertyB", 1.0);

        BeanUtilsBean.getInstance().copyProperties(myBean, myMap);
       
        assertEquals("BeanUtilsBean.copyProperties did not work as 
expected",
            myExpected, myBean.toString());       
    }   

TIA,
regards,
Giovanni 

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