projects
/
jSite2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add PersistentGet
[jSite2.git]
/
src
/
net
/
pterodactylus
/
util
/
fcp
/
PersistentPut.java
diff --git
a/src/net/pterodactylus/util/fcp/PersistentPut.java
b/src/net/pterodactylus/util/fcp/PersistentPut.java
index
40843b9
..
ee56439
100644
(file)
--- a/
src/net/pterodactylus/util/fcp/PersistentPut.java
+++ b/
src/net/pterodactylus/util/fcp/PersistentPut.java
@@
-38,11
+38,7
@@
public class PersistentPut extends BaseMessage {
* length could not be parsed
*/
public long getDataLength() {
* length could not be parsed
*/
public long getDataLength() {
- try {
- return Long.valueOf(getField("DataLength"));
- } catch (NumberFormatException nfe1) {
- return -1;
- }
+ return FcpUtils.safeParseLong(getField("DataLength"));
}
/**
}
/**
@@
-73,12
+69,7
@@
public class PersistentPut extends BaseMessage {
* the number of retries could not be parsed
*/
public int getMaxRetries() {
* the number of retries could not be parsed
*/
public int getMaxRetries() {
- try {
- return Integer.valueOf(getField("MaxRetries"));
- } catch (NumberFormatException nfe1) {
- /* we need to return -2 here as -1 is also a valid value. */
- return -2;
- }
+ return FcpUtils.safeParseInt(getField("MaxRetries"));
}
/**
}
/**