Skip to content

Commit b44c25f

Browse files
author
Lee Rhodes
committed
Correct javadoc error
1 parent 6816cbf commit b44c25f

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

memory/src/main/java/com/yahoo/memory/UnsafeUtil.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,27 +115,31 @@ private UnsafeUtil() {}
115115
/**
116116
* Perform bounds checking using java assert (if enabled) checking the requested offset and length
117117
* against the allocated size.
118-
* If reqOff + reqLen > allocSize or any of the parameters are negative an exception will be thrown.
118+
* If reqOff + reqLen > allocSize or any of the parameters are negative an exception will
119+
* be thrown.
119120
* @param reqOff the requested offset
120121
* @param reqLen the requested length
121122
* @param allocSize the allocated size.
122123
*/
123124
public static void assertBounds(final long reqOff, final long reqLen, final long allocSize) {
124125
assert ((reqOff | reqLen | (reqOff + reqLen) | (allocSize - (reqOff + reqLen))) >= 0) :
125-
"offset: " + reqOff + ", reqLength: " + reqLen + ", size: " + allocSize;
126+
"reqOffset: " + reqOff + ", reqLength: " + reqLen
127+
+ ", (reqOff + reqLen): " + (reqOff + reqLen) + ", allocSize: " + allocSize;
126128
}
127129

128130
/**
129131
* Check the requested offset and length against the allocated size.
130-
* If reqOff + reqLen > allocSize or any of the parameters are negative an exception will be thrown.
132+
* If reqOff + reqLen > allocSize or any of the parameters are negative an exception will
133+
* be thrown.
131134
* @param reqOff the requested offset
132135
* @param reqLen the requested length
133136
* @param allocSize the allocated size.
134137
*/
135138
public static void checkBounds(final long reqOff, final long reqLen, final long allocSize) {
136139
if ((reqOff | reqLen | (reqOff + reqLen) | (allocSize - (reqOff + reqLen))) < 0) {
137-
throw new IllegalArgumentException("offset: " + reqOff + ", reqLength: " + reqLen + ", size: "
138-
+ allocSize);
140+
throw new IllegalArgumentException(
141+
"reqOffset: " + reqOff + ", reqLength: "
142+
+ ", (reqOff + reqLen): " + (reqOff + reqLen) + ", allocSize: " + allocSize);
139143
}
140144
}
141145

0 commit comments

Comments
 (0)