The only unsigned primitive integer type in Java is the 16 bit char
datatype data type; all of the other primitive integer types are signed. To interoperate with native languages, such as C or C++, that use unsigned types extensively, read unsigned values into the next larger Java signed primitive integer type. For example, use a long
to hold an unsigned 32-bit integer value obtained from native code.
...
Automated detection is infeasible in the general case.
Related Vulnerabilities
Search for vulnerabilities resulting from the violation of this guideline on the CERT website.
Bibliography
<ac:structured-macro ac:name="unmigrated-wiki-markup |
...
" ac:schema-version="1" ac:macro-id="1746b66c-497c-41b2-8c44-1f38dcce62aa"><ac:plain-text-body><![CDATA[ | [[API |
...
2006 |
...
AA. |
...
Bibliography#API |
...
06] |
...
] |
...
Class |
...
DataInputStream: |
...
method |
...
| ]]></ac:plain-text-body></ac:structured-macro> | |||
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="aa74cfa8-3e5f-4a02-a7dd-82303179c98a"><ac:plain-text-body><![CDATA[ | [[Harold 1997 | AA. Bibliography#Harold 97]] | Chapter 2: Primitive Data Types, Cross Platform Issues, Unsigned Integers | ]]></ac:plain-text-body></ac:structured-macro> |
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="04252163-c126-4c0f-afa2-696b2304dbe9"><ac:plain-text-body><![CDATA[ | [[Hitchens 2002 | AA. Bibliography#Hitchens 02]] | 2.4.5 Accessing Unsigned Data | ]]></ac:plain-text-body></ac:structured-macro> |
...
NUM04-J. Use shift operators correctly 03. Numeric Types and Operations (NUM) NUM07-J. Avoid using floating point numbers when precise computation is needed