[freenet-cvs] r10920 - in trunk/freenet: . .settings src/freenet/node src/freenet/support
Author: nextgens
Date: 2006-11-14 14:44:45 + (Tue, 14 Nov 2006)
New Revision: 10920
Modified:
trunk/freenet/.classpath
trunk/freenet/.project
trunk/freenet/.settings/org.eclipse.jdt.core.prefs
trunk/freenet/src/freenet/node/FNPPacketMangler.java
trunk/freenet/src/freenet/support/SizeUtil.java
Log:
revert latest commit
Modified: trunk/freenet/.classpath
===
--- trunk/freenet/.classpath2006-11-14 14:43:25 UTC (rev 10919)
+++ trunk/freenet/.classpath2006-11-14 14:44:45 UTC (rev 10920)
@@ -3,6 +3,5 @@
-
Modified: trunk/freenet/.project
===
--- trunk/freenet/.project 2006-11-14 14:43:25 UTC (rev 10919)
+++ trunk/freenet/.project 2006-11-14 14:44:45 UTC (rev 10920)
@@ -22,8 +22,6 @@
- org.eclipse.jem.workbench.JavaEMFNature
org.eclipse.jdt.core.javanature
- org.eclipse.jem.beaninfo.BeanInfoNature
Modified: trunk/freenet/.settings/org.eclipse.jdt.core.prefs
===
--- trunk/freenet/.settings/org.eclipse.jdt.core.prefs 2006-11-14 14:43:25 UTC
(rev 10919)
+++ trunk/freenet/.settings/org.eclipse.jdt.core.prefs 2006-11-14 14:44:45 UTC
(rev 10920)
@@ -1,4 +1,4 @@
-#Fri Sep 08 23:07:46 CEST 2006
+#Sun Jul 09 17:12:16 CEST 2006
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
@@ -11,5 +11,5 @@
org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
org.eclipse.jdt.core.compiler.source=1.4
org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
-org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL,HIGH,LOW
-org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,REDFLAG,REMOVE
+org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL,HIGH
+org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,REDFLAG
Modified: trunk/freenet/src/freenet/node/FNPPacketMangler.java
===
--- trunk/freenet/src/freenet/node/FNPPacketMangler.java2006-11-14
14:43:25 UTC (rev 10919)
+++ trunk/freenet/src/freenet/node/FNPPacketMangler.java2006-11-14
14:44:45 UTC (rev 10920)
@@ -284,7 +284,6 @@
}
}else if (negType == 1){
// We are gonna do simple StS
- System.out.println("STS packet in! "+packetType);
if((packetType < 0) || (packetType > 3)) {
Logger.error(this, "Decrypted auth packet but unknown
packet type "+packetType+" from "+replyTo+" possibly from "+pn);
Modified: trunk/freenet/src/freenet/support/SizeUtil.java
===
--- trunk/freenet/src/freenet/support/SizeUtil.java 2006-11-14 14:43:25 UTC
(rev 10919)
+++ trunk/freenet/src/freenet/support/SizeUtil.java 2006-11-14 14:44:45 UTC
(rev 10920)
@@ -4,12 +4,14 @@
* Size formatting utility.
*/
public class SizeUtil {
- public static String[] suffixes = {"B",
"KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"};
public static String formatSize(long sz) {
+ // First determine suffix
+
+ String[] suffixes = {"B",
"KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"};
long s = 1;
int i;
- for(i=0;i sz) {
break;
@@ -20,7 +22,7 @@
s /= 1024; // we use the previous unit
if (s == 1) // Bytes? Then we don't need real numbers with a
comma
{
- return sz + " " + SizeUtil.suffixes[0];
+ return sz + " " + suffixes[0];
}
else
{
@@ -30,8 +32,7 @@
o = o.substring(0, 3);
else if((o.indexOf('.') > -1) && (o.indexOf('E') == -1)
&& (o.length() > 4))
o = o.substring(0, 4);
- if(i < SizeUtil.suffixes.length) // handle the case
where the mantissa is Infinity
- o += " " + SizeUtil.suffixes[i];
+ o += " " + suffixes[i];
return o;
}
}
[freenet-cvs] r10920 - in trunk/freenet: . .settings src/freenet/node src/freenet/support
Author: nextgens
Date: 2006-11-14 14:44:45 + (Tue, 14 Nov 2006)
New Revision: 10920
Modified:
trunk/freenet/.classpath
trunk/freenet/.project
trunk/freenet/.settings/org.eclipse.jdt.core.prefs
trunk/freenet/src/freenet/node/FNPPacketMangler.java
trunk/freenet/src/freenet/support/SizeUtil.java
Log:
revert latest commit
Modified: trunk/freenet/.classpath
===
--- trunk/freenet/.classpath2006-11-14 14:43:25 UTC (rev 10919)
+++ trunk/freenet/.classpath2006-11-14 14:44:45 UTC (rev 10920)
@@ -3,6 +3,5 @@
-
Modified: trunk/freenet/.project
===
--- trunk/freenet/.project 2006-11-14 14:43:25 UTC (rev 10919)
+++ trunk/freenet/.project 2006-11-14 14:44:45 UTC (rev 10920)
@@ -22,8 +22,6 @@
- org.eclipse.jem.workbench.JavaEMFNature
org.eclipse.jdt.core.javanature
- org.eclipse.jem.beaninfo.BeanInfoNature
Modified: trunk/freenet/.settings/org.eclipse.jdt.core.prefs
===
--- trunk/freenet/.settings/org.eclipse.jdt.core.prefs 2006-11-14 14:43:25 UTC
(rev 10919)
+++ trunk/freenet/.settings/org.eclipse.jdt.core.prefs 2006-11-14 14:44:45 UTC
(rev 10920)
@@ -1,4 +1,4 @@
-#Fri Sep 08 23:07:46 CEST 2006
+#Sun Jul 09 17:12:16 CEST 2006
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
@@ -11,5 +11,5 @@
org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
org.eclipse.jdt.core.compiler.source=1.4
org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
-org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL,HIGH,LOW
-org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,REDFLAG,REMOVE
+org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL,HIGH
+org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,REDFLAG
Modified: trunk/freenet/src/freenet/node/FNPPacketMangler.java
===
--- trunk/freenet/src/freenet/node/FNPPacketMangler.java2006-11-14
14:43:25 UTC (rev 10919)
+++ trunk/freenet/src/freenet/node/FNPPacketMangler.java2006-11-14
14:44:45 UTC (rev 10920)
@@ -284,7 +284,6 @@
}
}else if (negType == 1){
// We are gonna do simple StS
- System.out.println("STS packet in! "+packetType);
if((packetType < 0) || (packetType > 3)) {
Logger.error(this, "Decrypted auth packet but unknown
packet type "+packetType+" from "+replyTo+" possibly from "+pn);
Modified: trunk/freenet/src/freenet/support/SizeUtil.java
===
--- trunk/freenet/src/freenet/support/SizeUtil.java 2006-11-14 14:43:25 UTC
(rev 10919)
+++ trunk/freenet/src/freenet/support/SizeUtil.java 2006-11-14 14:44:45 UTC
(rev 10920)
@@ -4,12 +4,14 @@
* Size formatting utility.
*/
public class SizeUtil {
- public static String[] suffixes = {"B",
"KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"};
public static String formatSize(long sz) {
+ // First determine suffix
+
+ String[] suffixes = {"B",
"KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"};
long s = 1;
int i;
- for(i=0;i sz) {
break;
@@ -20,7 +22,7 @@
s /= 1024; // we use the previous unit
if (s == 1) // Bytes? Then we don't need real numbers with a
comma
{
- return sz + " " + SizeUtil.suffixes[0];
+ return sz + " " + suffixes[0];
}
else
{
@@ -30,8 +32,7 @@
o = o.substring(0, 3);
else if((o.indexOf('.') > -1) && (o.indexOf('E') == -1)
&& (o.length() > 4))
o = o.substring(0, 4);
- if(i < SizeUtil.suffixes.length) // handle the case
where the mantissa is Infinity
- o += " " + SizeUtil.suffixes[i];
+ o += " " + suffixes[i];
return o;
}
}
___
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs
