@@ -132,7 +132,7 @@ private void newEra(boolean force, int nextEra) {
132132 Log .writeLog (this , this .toString (), "era not forced - incremented era to " + nextEra );
133133 }
134134 try {
135- int oldEra = this .era ;
135+ int previousEra = this .era ;
136136
137137 // we are done here - we are in a new era.
138138 this .era = nextEra ;
@@ -141,25 +141,24 @@ private void newEra(boolean force, int nextEra) {
141141 if (this .memento != null ) this .memento .save (this );
142142
143143 /* now:
144- oldEra .. era that was used a few milliseconds before. Keep it.
144+ previousEra .. era that was used a few milliseconds before. Keep it.
145145 this.era .. era we are going to work with
146146
147147 Now, there could be a very old version with same number as this.era - remove it before you set up
148148 fresh era
149149 */
150150
151- if (this .era == oldEra ) {
152- Log .writeLog (this , this .toString (), "this.era == oldEra - nothing to do" );
151+ if (this .era == previousEra ) {
152+ Log .writeLog (this , this .toString (), "this.era == previousEra - nothing to do" );
153153 } else {
154- Log .writeLog (this , this .toString (), "old era is going to be overwritten: " + this .era );
155- // drop very very old chunks - if available
154+ // drop very very old chunks - if available - if not - don't care
156155 this .getChunkStorage ().dropChunks (this .era );
157156
158157 Log .writeLog (this , this .toString (),
159158 "setup new era by cloning previous chunk meta data: "
160- + this .era + " | " + oldEra );
159+ + this .era + " | " + previousEra );
161160 // setup new era - copy all chunks
162- for (ASAPInternalChunk chunk : this .getChunkStorage ().getChunks (oldEra )) {
161+ for (ASAPInternalChunk chunk : this .getChunkStorage ().getChunks (previousEra )) {
163162 ASAPInternalChunk copyChunk = this .getChunkStorage ().getChunk (chunk .getUri (), this .era );
164163 copyChunk .clone (chunk );
165164 }
0 commit comments