Author: toad
Date: 2008-03-01 23:54:22 +0000 (Sat, 01 Mar 2008)
New Revision: 18314
Modified:
trunk/freenet/src/freenet/config/IntOption.java
trunk/freenet/src/freenet/config/LongOption.java
trunk/freenet/src/freenet/config/ShortOption.java
trunk/freenet/src/freenet/node/fcp/ClientRequest.java
trunk/freenet/src/freenet/support/Fields.java
Log:
Rename parseLong -> parseSILong etc.
Modified: trunk/freenet/src/freenet/config/IntOption.java
===================================================================
--- trunk/freenet/src/freenet/config/IntOption.java 2008-03-01 23:49:16 UTC
(rev 18313)
+++ trunk/freenet/src/freenet/config/IntOption.java 2008-03-01 23:54:22 UTC
(rev 18314)
@@ -28,7 +28,7 @@
public IntOption(SubConfig conf, String optionName, String
defaultValueString,
int sortOrder, boolean expert, boolean forceWrite,
String shortDesc, String longDesc, IntCallback cb) {
super(conf, optionName, cb, sortOrder, expert, forceWrite,
shortDesc, longDesc, Option.DATA_TYPE_NUMBER);
- this.defaultValue = Fields.parseInt(defaultValueString);
+ this.defaultValue = Fields.parseSIInt(defaultValueString);
this.cb = cb;
this.currentValue = defaultValue;
this.cachedStringValue = defaultValueString;
@@ -50,7 +50,7 @@
public void setValue(String val) throws InvalidConfigValueException {
int x;
try{
- x = Fields.parseInt(val);
+ x = Fields.parseSIInt(val);
} catch (NumberFormatException e) {
throw new
InvalidConfigValueException(l10n("parseError", "val", val));
}
@@ -62,7 +62,7 @@
public void setInitialValue(String val) throws
InvalidConfigValueException {
int x;
try{
- x = Fields.parseInt(val);
+ x = Fields.parseSIInt(val);
} catch (NumberFormatException e) {
throw new
InvalidConfigValueException(l10n("parseError", "val", val));
}
Modified: trunk/freenet/src/freenet/config/LongOption.java
===================================================================
--- trunk/freenet/src/freenet/config/LongOption.java 2008-03-01 23:49:16 UTC
(rev 18313)
+++ trunk/freenet/src/freenet/config/LongOption.java 2008-03-01 23:54:22 UTC
(rev 18314)
@@ -28,7 +28,7 @@
public LongOption(SubConfig conf, String optionName, String
defaultValueString,
int sortOrder, boolean expert, boolean forceWrite,
String shortDesc, String longDesc, LongCallback cb) {
super(conf, optionName, cb, sortOrder, expert, forceWrite,
shortDesc, longDesc, Option.DATA_TYPE_NUMBER);
- this.defaultValue = Fields.parseLong(defaultValueString);
+ this.defaultValue = Fields.parseSILong(defaultValueString);
this.cb = cb;
this.currentValue = defaultValue;
this.cachedStringValue = defaultValueString;
@@ -50,7 +50,7 @@
public void setValue(String val) throws InvalidConfigValueException {
long x;
try{
- x = Fields.parseLong(val);
+ x = Fields.parseSILong(val);
}catch (NumberFormatException e) {
throw new
InvalidConfigValueException(l10n("parseError", "val", val));
}
@@ -70,7 +70,7 @@
public void setInitialValue(String val) throws
InvalidConfigValueException {
long x;
try{
- x = Fields.parseLong(val);
+ x = Fields.parseSILong(val);
}catch (NumberFormatException e) {
throw new
InvalidConfigValueException(l10n("parseError", "val", val));
}
Modified: trunk/freenet/src/freenet/config/ShortOption.java
===================================================================
--- trunk/freenet/src/freenet/config/ShortOption.java 2008-03-01 23:49:16 UTC
(rev 18313)
+++ trunk/freenet/src/freenet/config/ShortOption.java 2008-03-01 23:54:22 UTC
(rev 18314)
@@ -29,7 +29,7 @@
public void setValue(String val) throws InvalidConfigValueException {
short x;
try{
- x= Fields.parseShort(val);
+ x= Fields.parseSIShort(val);
} catch (NumberFormatException e) {
throw new
InvalidConfigValueException(l10n("unrecognisedShort", "val", val));
}
@@ -44,7 +44,7 @@
public void setInitialValue(String val) throws
InvalidConfigValueException {
short x;
try{
- x = Fields.parseShort(val);
+ x = Fields.parseSIShort(val);
} catch (NumberFormatException e) {
throw new
InvalidConfigValueException(l10n("unrecognisedShort", "val", val));
}
Modified: trunk/freenet/src/freenet/node/fcp/ClientRequest.java
===================================================================
--- trunk/freenet/src/freenet/node/fcp/ClientRequest.java 2008-03-01
23:49:16 UTC (rev 18313)
+++ trunk/freenet/src/freenet/node/fcp/ClientRequest.java 2008-03-01
23:54:22 UTC (rev 18314)
@@ -105,7 +105,7 @@
finished = Fields.stringToBool(fs.get("Finished"), false);
global = Fields.stringToBool(fs.get("Global"), false);
final String stime = fs.get("StartupTime");
- this.startupTime = stime == null ? System.currentTimeMillis() :
Fields.parseLong(stime);
+ this.startupTime = stime == null ? System.currentTimeMillis() :
Fields.parseSILong(stime);
completionTime = fs.getLong("CompletionTime", 0);
if (finished)
started=true;
Modified: trunk/freenet/src/freenet/support/Fields.java
===================================================================
--- trunk/freenet/src/freenet/support/Fields.java 2008-03-01 23:49:16 UTC
(rev 18313)
+++ trunk/freenet/src/freenet/support/Fields.java 2008-03-01 23:54:22 UTC
(rev 18314)
@@ -579,7 +579,7 @@
* @throws NumberFormatException
* if the string is not parseable
*/
- public static short parseShort(String s) throws NumberFormatException {
+ public static short parseSIShort(String s) throws NumberFormatException
{
short res = 1;
int x = s.length() - 1;
int idx;
@@ -606,7 +606,7 @@
* @throws NumberFormatException
* if the string is not parseable
*/
- public static int parseInt(String s) throws NumberFormatException {
+ public static int parseSIInt(String s) throws NumberFormatException {
int res = 1;
int x = s.length() - 1;
int idx;
@@ -637,7 +637,7 @@
* @throws NumberFormatException
* if the string is not parseable
*/
- public static long parseLong(String s) throws NumberFormatException {
+ public static long parseSILong(String s) throws NumberFormatException {
long res = 1;
int x = s.length() - 1;
int idx;