Author: jflesch
Date: 2008-02-13 22:26:39 +0000 (Wed, 13 Feb 2008)
New Revision: 17881
Modified:
trunk/freenet/src/freenet/clients/http/StatisticsToadlet.java
trunk/freenet/src/freenet/node/Announcer.java
trunk/freenet/src/freenet/node/IPDetectorPluginManager.java
trunk/freenet/src/freenet/node/NodeARKInserter.java
trunk/freenet/src/freenet/node/NodeCryptoConfig.java
trunk/freenet/src/freenet/node/simulator/RealNodeNetworkColoringTest.java
trunk/freenet/src/freenet/node/useralerts/RevocationKeyFoundUserAlert.java
trunk/freenet/test/freenet/support/URIPreEncoderTest.java
Log:
indent:Remove some unused local variables
Modified: trunk/freenet/src/freenet/clients/http/StatisticsToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/StatisticsToadlet.java
2008-02-13 22:06:39 UTC (rev 17880)
+++ trunk/freenet/src/freenet/clients/http/StatisticsToadlet.java
2008-02-13 22:26:39 UTC (rev 17881)
@@ -401,21 +401,15 @@
long cachedSize = cachedKeys * fix32kb;
long storeKeys = node.getChkDatastore().keyCount();
long storeSize = storeKeys * fix32kb;
- long overallKeys = cachedKeys + storeKeys;
- long overallSize = cachedSize + storeSize;
-
long maxCachedKeys = node.getChkDatacache().getMaxKeys();
long maxStoreKeys = node.getChkDatastore().getMaxKeys();
long maxOverallKeys = node.getMaxTotalKeys();
- long maxOverallSize = maxOverallKeys * fix32kb;
-
long cacheHits = node.getChkDatacache().hits();
long cacheMisses = node.getChkDatacache().misses();
long cacheAccesses = cacheHits + cacheMisses;
long storeHits = node.getChkDatastore().hits();
long storeMisses = node.getChkDatastore().misses();
long storeAccesses = storeHits + storeMisses;
- long overallAccesses = storeAccesses + cacheAccesses;
long cacheWrites=node.getChkDatacache().writes();
long storeWrites=node.getChkDatastore().writes();
Modified: trunk/freenet/src/freenet/node/Announcer.java
===================================================================
--- trunk/freenet/src/freenet/node/Announcer.java 2008-02-13 22:06:39 UTC
(rev 17880)
+++ trunk/freenet/src/freenet/node/Announcer.java 2008-02-13 22:26:39 UTC
(rev 17881)
@@ -44,9 +44,6 @@
/** We want to announce to 3 different seednodes. */
final int WANT_ANNOUNCEMENTS = 3;
private int sentAnnouncements;
- /** The time when we last sent an announcement. */
- private long timeSentAnnouncement;
- private long timeCompletedAnnouncement;
private long startTime;
private long timeAddedSeeds;
static final long MIN_ADDED_SEEDS_INTERVAL = 60*1000;
@@ -346,7 +343,6 @@
addAnnouncedIPs(addrs);
sentAnnouncements++;
runningAnnouncements++;
- timeSentAnnouncement = now;
announcedToIdentities.add(new
ByteArrayWrapper(seed.getIdentity()));
sendAnnouncement(seed);
}
@@ -413,7 +409,6 @@
synchronized(Announcer.this) {
runningAnnouncements--;
Logger.error(this, "Announcement to
"+seed.userToString()+" completed, now running "+runningAnnouncements+"
announcements");
- timeCompletedAnnouncement = now;
if(runningAnnouncements == 0) {
startTime =
System.currentTimeMillis() + COOLING_OFF_PERIOD;
sentAnnouncements = 0;
Modified: trunk/freenet/src/freenet/node/IPDetectorPluginManager.java
===================================================================
--- trunk/freenet/src/freenet/node/IPDetectorPluginManager.java 2008-02-13
22:06:39 UTC (rev 17880)
+++ trunk/freenet/src/freenet/node/IPDetectorPluginManager.java 2008-02-13
22:26:39 UTC (rev 17881)
@@ -254,7 +254,6 @@
private HashMap /*<FredIPDetectorPlugin,DetectorRunner>*/ runners = new
HashMap();
private boolean lastDetectAttemptFailed;
private long lastDetectAttemptEndedTime;
- private long firstTimeMaybeFakePeers;
private long firstTimeUrgent;
/**
Modified: trunk/freenet/src/freenet/node/NodeARKInserter.java
===================================================================
--- trunk/freenet/src/freenet/node/NodeARKInserter.java 2008-02-13 22:06:39 UTC
(rev 17880)
+++ trunk/freenet/src/freenet/node/NodeARKInserter.java 2008-02-13 22:26:39 UTC
(rev 17881)
@@ -53,8 +53,6 @@
private boolean shouldInsert;
private Peer[] lastInsertedPeers;
private boolean canStart;
- private long preInsertARKNumber = -1;
-
void start() {
if(!enabled) return;
canStart = true;
@@ -151,7 +149,6 @@
Bucket b = new SimpleReadOnlyArrayBucket(buf);
long number = crypto.myARKNumber;
- preInsertARKNumber = number;
InsertableClientSSK ark = crypto.myARK;
FreenetURI uri =
ark.getInsertURI().setKeyType("USK").setSuggestedEdition(number);
Modified: trunk/freenet/src/freenet/node/NodeCryptoConfig.java
===================================================================
--- trunk/freenet/src/freenet/node/NodeCryptoConfig.java 2008-02-13
22:06:39 UTC (rev 17880)
+++ trunk/freenet/src/freenet/node/NodeCryptoConfig.java 2008-02-13
22:26:39 UTC (rev 17881)
@@ -35,9 +35,6 @@
/** The NodeCrypto, if there is one */
private NodeCrypto crypto;
- /** Whether the NodeCrypto has finished starting */
- private boolean started;
-
/** Whether we should prevent multiple connections to the same IP
(taking into account other
* NodeCrypto's - this will usually be set for opennet but not for
darknet). */
private boolean oneConnectionPerAddress;
@@ -173,22 +170,19 @@
synchronized void starting(NodeCrypto crypto2) {
if(crypto != null) throw new IllegalStateException("Replacing
existing NodeCrypto "+crypto+" with "+crypto2);
crypto = crypto2;
- started = false;
}
synchronized void started(NodeCrypto crypto2) {
if(crypto != null) throw new IllegalStateException("Replacing
existing NodeCrypto "+crypto+" with "+crypto2);
- started = true;
}
synchronized void maybeStarted(NodeCrypto crypto2) {
- if(crypto != null)
- started = true;
+ if(crypto != null) {
+ }
}
synchronized void stopping(NodeCrypto crypto2) {
crypto = null;
- started = false;
}
public synchronized int getPort() {
Modified:
trunk/freenet/src/freenet/node/simulator/RealNodeNetworkColoringTest.java
===================================================================
--- trunk/freenet/src/freenet/node/simulator/RealNodeNetworkColoringTest.java
2008-02-13 22:06:39 UTC (rev 17880)
+++ trunk/freenet/src/freenet/node/simulator/RealNodeNetworkColoringTest.java
2008-02-13 22:26:39 UTC (rev 17881)
@@ -137,11 +137,7 @@
// Now sit back and watch the fireworks!
int cycleNumber = 0;
- int lastSwaps = 0;
- int lastNoSwaps = 0;
- int failures = 0;
- int successes = 0;
- RunningAverage general = new
BootstrappingDecayingRunningAverage(0.0, 0.0, 1.0, 2000, null);
+ RunningAverage general = new BootstrappingDecayingRunningAverage(0.0,
0.0, 1.0, 2000, null);
RunningAverage aRate = new BootstrappingDecayingRunningAverage(0.0,
0.0, 1.0, 500, null);
RunningAverage bRate = new
BootstrappingDecayingRunningAverage(0.0, 0.0, 1.0, 500, null);
RunningAverage bridgeRate = new
BootstrappingDecayingRunningAverage(0.0, 0.0, 1.0, 500, null);
@@ -149,8 +145,6 @@
HashSet aIds=new HashSet();
HashSet bIds=new HashSet();
HashSet bridgeIds=new HashSet();
- int pings = 0;
-
while(true) {
cycleNumber++;
Modified:
trunk/freenet/src/freenet/node/useralerts/RevocationKeyFoundUserAlert.java
===================================================================
--- trunk/freenet/src/freenet/node/useralerts/RevocationKeyFoundUserAlert.java
2008-02-13 22:06:39 UTC (rev 17880)
+++ trunk/freenet/src/freenet/node/useralerts/RevocationKeyFoundUserAlert.java
2008-02-13 22:26:39 UTC (rev 17881)
@@ -7,11 +7,8 @@
import freenet.support.HTMLNode;
public class RevocationKeyFoundUserAlert extends AbstractUserAlert {
- private final String msg;
-
public RevocationKeyFoundUserAlert(String msg){
super(false,
L10n.getString("RevocationKeyFoundUserAlert.title"),
L10n.getString("RevocationKeyFoundUserAlert.text", "message", msg), new
HTMLNode("#", L10n.getString("RevocationKeyFoundUserAlert.text", "message",
msg)), UserAlert.CRITICAL_ERROR, true, null, false, null);
- this.msg=msg;
}
public void isValid(boolean b){
Modified: trunk/freenet/test/freenet/support/URIPreEncoderTest.java
===================================================================
--- trunk/freenet/test/freenet/support/URIPreEncoderTest.java 2008-02-13
22:06:39 UTC (rev 17880)
+++ trunk/freenet/test/freenet/support/URIPreEncoderTest.java 2008-02-13
22:26:39 UTC (rev 17881)
@@ -15,7 +15,6 @@
*/
package freenet.support;
-import java.net.URI;
import freenet.utils.UTFUtil;
import junit.framework.TestCase;
@@ -56,8 +55,8 @@
* not safe chars into safe chars.
*/
public void testEncodeURI() {
- String toEncode = prtblAscii+stressedUTF_8Chars;
- URI encoded;
+ //String toEncode = prtblAscii+stressedUTF_8Chars;
+ //URI encoded;
//try {
// encoded = URIPreEncoder.encodeURI(toEncode);
this method will throw a not expected exception because '%' is included as a
valid char
// assertTrue(containsOnlyValidChars(encoded.toString()));