Code Review
/
yangtools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Include Uint.ZERO in lower saturation bounds
[yangtools.git]
/
yang
/
yang-common
/
src
/
main
/
java
/
org
/
opendaylight
/
yangtools
/
yang
/
common
/
Uint32.java
diff --git
a/yang/yang-common/src/main/java/org/opendaylight/yangtools/yang/common/Uint32.java
b/yang/yang-common/src/main/java/org/opendaylight/yangtools/yang/common/Uint32.java
index 5fa071378de0f3c5f47b163984ebecea9f9c46ad..5b3e6c2b6a739b6e0193b689848ba0ce87bf0797 100644
(file)
--- a/
yang/yang-common/src/main/java/org/opendaylight/yangtools/yang/common/Uint32.java
+++ b/
yang/yang-common/src/main/java/org/opendaylight/yangtools/yang/common/Uint32.java
@@
-253,7
+253,7
@@
public class Uint32 extends Number implements CanonicalValue<Uint32> {
* @return A Uint32 instance
*/
public static Uint32 saturatedOf(final byte byteVal) {
* @return A Uint32 instance
*/
public static Uint32 saturatedOf(final byte byteVal) {
- return byteVal < 0 ? Uint32.ZERO : instanceFor(byteVal);
+ return byteVal <
=
0 ? Uint32.ZERO : instanceFor(byteVal);
}
/**
}
/**
@@
-264,7
+264,7
@@
public class Uint32 extends Number implements CanonicalValue<Uint32> {
* @return A Uint32 instance
*/
public static Uint32 saturatedOf(final short shortVal) {
* @return A Uint32 instance
*/
public static Uint32 saturatedOf(final short shortVal) {
- return shortVal < 0 ? Uint32.ZERO : instanceFor(shortVal);
+ return shortVal <
=
0 ? Uint32.ZERO : instanceFor(shortVal);
}
/**
}
/**
@@
-275,7
+275,7
@@
public class Uint32 extends Number implements CanonicalValue<Uint32> {
* @return A Uint32 instance
*/
public static Uint32 saturatedOf(final int intVal) {
* @return A Uint32 instance
*/
public static Uint32 saturatedOf(final int intVal) {
- return intVal < 0 ? Uint32.ZERO : instanceFor(intVal);
+ return intVal <
=
0 ? Uint32.ZERO : instanceFor(intVal);
}
/**
}
/**
@@
-287,7
+287,7
@@
public class Uint32 extends Number implements CanonicalValue<Uint32> {
* @return A Uint32 instance
*/
public static Uint32 saturatedOf(final long longVal) {
* @return A Uint32 instance
*/
public static Uint32 saturatedOf(final long longVal) {
- if (longVal < 0) {
+ if (longVal <
=
0) {
return Uint32.ZERO;
}
if (longVal >= MAX_VALUE_LONG) {
return Uint32.ZERO;
}
if (longVal >= MAX_VALUE_LONG) {