commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Yandell (JIRA)" <j...@apache.org>
Subject [jira] Commented: (IO-117) EndianUtils.readSwappedUnsignedInteger() may return a negative number
Date Mon, 16 Apr 2007 13:20:17 GMT

    [ https://issues.apache.org/jira/browse/IO-117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12489108
] 

Henri Yandell commented on IO-117:
----------------------------------

Do you have any particular examples/test cases in mind where there are problems, or is this
theoretical?

> EndianUtils.readSwappedUnsignedInteger() may return a negative number
> ---------------------------------------------------------------------
>
>                 Key: IO-117
>                 URL: https://issues.apache.org/jira/browse/IO-117
>             Project: Commons IO
>          Issue Type: Bug
>    Affects Versions: 1.3.1
>            Reporter: Hiroshi Ikeda
>
> Methods about reading unsigned-integer in class EndianUtils may return a negative number,
due to casting int to long.
> Calculations with operator & etc. are under integer in these methods so its results
are integer,
> then implicit casting the results to long keeps its positive/negative sign.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


Mime
View raw message