[prev in list] [next in list] [prev in thread] [next in thread]
List: jakarta-commons-dev
Subject: Re: svn commit: r491359 - /jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/EndianUtil
From: "Henri Yandell" <flamefew () gmail ! com>
Date: 2006-12-31 19:14:17
Message-ID: 31cc37360612311114v2f3e47dk86d341d7f8fa6c28 () mail ! gmail ! com
[Download RAW message or body]
https://issues.apache.org/jira/browse/IO-101 with a testSymmetryOfLong
in EndianUtilsTest.
With Gary's change, the fix becomes:
- return low + (high << 32);
+ return (high << 32) + (0xffffffffL & low);
The test still passes, so I guess things are good.
Hen
On 12/31/06, Stephen Colebourne <scolebourne@btopenworld.com> wrote:
> This was a recent bug fix. Do we have tests to show that removing this
> cast doesn't cause the bug to reappear?
>
> Stephen
>
>
> ggregory@apache.org wrote:
> > Author: ggregory
> > Date: Sat Dec 30 17:08:34 2006
> > New Revision: 491359
> >
> > URL: http://svn.apache.org/viewvc?view=rev&rev=491359
> > Log:
> > Remove unnecessary cast from long to long.
> >
> > Modified:
> > jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/EndianUtils.java
> >
> > Modified: jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/EndianUtils.java
> >
> > URL: http://svn.apache.org/viewvc/jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/EndianUtils.java?view=diff&rev=491359&r1=491358&r2=491359
> > ==============================================================================
> > --- jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/EndianUtils.java \
> > (original)
> > +++ jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/EndianUtils.java \
> > Sat Dec 30 17:08:34 2006 @@ -224,7 +224,7 @@
> > ( ( data[ offset + 5 ] & 0xff ) << 8 ) +
> > ( ( data[ offset + 6 ] & 0xff ) << 16 ) +
> > ( ( data[ offset + 7 ] & 0xff ) << 24 );
> > - return ((long) high << 32) + (0xffffffffL & low);
> > + return (high << 32) + (0xffffffffL & low);
> > }
> >
> > /**
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic