changeset 1679:39287902fb0c

minor
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 31 May 2022 15:39:58 -0600
parents f54484aae295
children 9ef19f5ea973
files src/goodjava/lucene/logging/LoggingIndexWriter.java
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
diff -r f54484aae295 -r 39287902fb0c src/goodjava/lucene/logging/LoggingIndexWriter.java
--- a/src/goodjava/lucene/logging/LoggingIndexWriter.java	Tue May 31 14:44:29 2022 -0600
+++ b/src/goodjava/lucene/logging/LoggingIndexWriter.java	Tue May 31 15:39:58 2022 -0600
@@ -73,8 +73,7 @@
 		if( indexFile.exists() ) {
 			try {
 				Map map = (Map)JsonParser.parse( IoUtils.readAll(new FileReader(indexFile)) );
-				Number num = (Number)map.get("version");
-				if( num != null && num.intValue() == version ) {
+				if( ((Number)map.get("version")).intValue() == version ) {
 					List fileNames = (List)map.get("files");
 					for( int i=0; i<logs.length; i++ ) {
 						File file = new File( logDir, (String)fileNames.get(i) );