[freenet-cvs] r17489 - trunk/freenet/src/freenet/node
toad at freenetproject.org
toad at freenetproject.org
Sat Feb 2 23:42:40 UTC 2008
Author: toad
Date: 2008-02-02 23:42:40 +0000 (Sat, 02 Feb 2008)
New Revision: 17489
Modified:
trunk/freenet/src/freenet/node/FailureTable.java
Log:
indenting
Modified: trunk/freenet/src/freenet/node/FailureTable.java
===================================================================
--- trunk/freenet/src/freenet/node/FailureTable.java 2008-02-02 23:42:17 UTC (rev 17488)
+++ trunk/freenet/src/freenet/node/FailureTable.java 2008-02-02 23:42:40 UTC (rev 17489)
@@ -167,18 +167,18 @@
public void deleteOffer(BlockOffer offer) {
synchronized(this) {
- int idx = -1;
- for(int i=0;i<offers.length;i++) {
- if(offers[i] == offer) idx = i;
+ int idx = -1;
+ for(int i=0;i<offers.length;i++) {
+ if(offers[i] == offer) idx = i;
+ }
+ if(idx == -1) return;
+ BlockOffer[] newOffers = new BlockOffer[offers.length-1];
+ if(idx > 0)
+ System.arraycopy(offers, 0, newOffers, 0, idx);
+ if(idx < newOffers.length)
+ System.arraycopy(offers, idx+1, newOffers, idx, offers.length-idx);
+ offers = newOffers;
}
- if(idx == -1) return;
- BlockOffer[] newOffers = new BlockOffer[offers.length-1];
- if(idx > 0)
- System.arraycopy(offers, 0, newOffers, 0, idx);
- if(idx < newOffers.length)
- System.arraycopy(offers, idx+1, newOffers, idx, offers.length-idx);
- offers = newOffers;
- }
if(offers.length == 0) {
synchronized(FailureTable.this) {
blockOfferListByKey.removeKey(entry.key);
More information about the cvs
mailing list