Skip to content

Commit f7d2c05

Browse files
committed
4.3.3512
1 parent 58b974b commit f7d2c05

File tree

42 files changed

+4941
-57
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+4941
-57
lines changed

Java/androidfsstorage/app/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ android {
3030
jarJar {
3131
rules = [
3232
'stax-api-1.0.1.jar' : 'javax.xml.** com.ithit.webdav.xml.@1',
33-
'webdav-server-4.2.2822.jar': 'javax.xml.stream.** com.ithit.webdav.xml.stream.@1'
33+
'webdav-server-4.3.3512.jar': 'javax.xml.stream.** com.ithit.webdav.xml.stream.@1'
3434
]
3535
}
3636

@@ -71,11 +71,11 @@ dependencies {
7171
implementation 'commons-io:commons-io:2.4'
7272
implementation 'com.google.code.gson:gson:2.7'
7373
implementation 'com.android.support:appcompat-v7:27.1.1'
74-
implementation('com.ithit.webdav.integration:android-integration:4.2.2822', {
74+
implementation('com.ithit.webdav.integration:android-integration:4.3.3512', {
7575
exclude group: 'org.nanohttpd', module: 'nanohttpd'
7676
})
7777
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
7878
jarJar 'stax:stax-api:1.0.1'
79-
jarJar 'com.ithit.webdav:webdav-server:4.2.2822'
79+
jarJar 'com.ithit.webdav:webdav-server:4.3.3512'
8080
testImplementation 'junit:junit:4.12'
8181
}

Java/deltav/pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.ithit.webdav.samples</groupId>
88
<artifactId>deltav</artifactId>
9-
<version>4.2.2815</version>
9+
<version>4.3.3512</version>
1010
<packaging>war</packaging>
1111

1212
<properties>
@@ -23,7 +23,7 @@
2323
<dependency>
2424
<groupId>com.ithit.webdav.integration</groupId>
2525
<artifactId>servlet-integration</artifactId>
26-
<version>4.2.2815</version>
26+
<version>4.3.3512</version>
2727
</dependency>
2828
<dependency>
2929
<groupId>commons-dbcp</groupId>
@@ -125,7 +125,7 @@
125125
<dependency>
126126
<groupId>com.ithit.webdav</groupId>
127127
<artifactId>webdav-server</artifactId>
128-
<version>4.2.2815</version>
128+
<version>4.3.3512</version>
129129
</dependency>
130130

131131
<dependency>
@@ -165,7 +165,7 @@
165165
<goal>copy-resources</goal>
166166
</goals>
167167
<configuration>
168-
<outputDirectory>${project.build.directory}/deltav-4.2.2815/META-INF</outputDirectory>
168+
<outputDirectory>${project.build.directory}/deltav-4.3.3512/META-INF</outputDirectory>
169169
<overwrite>true</overwrite>
170170
<resources>
171171
<resource>
@@ -244,7 +244,7 @@
244244
<server>filesystem</server>
245245
<port>11021</port>
246246
<path>/</path>
247-
<warSourceDirectory>target/deltav-4.2.2815</warSourceDirectory>
247+
<warSourceDirectory>target/deltav-4.3.3512</warSourceDirectory>
248248
</configuration>
249249
</plugin>
250250
<plugin>

Java/deltav/src/main/java/com/ithit/webdav/samples/deltavservlet/SearchFacade.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ void indexRootFolder(String indexFolder, Integer interval) {
6565
indexWriter.commit();
6666
new Indexer.CommitTask(indexWriter, logger).schedule(interval);
6767
searcher = new Searcher(indexFolder, standardAnalyzer, logger);
68-
} catch (IOException e) {
68+
} catch (Throwable e) {
6969
logger.logError("Cannot initialize Lucene", e);
7070
}
7171
}
@@ -175,7 +175,7 @@ void indexFile(String fileName, Integer currentId, Integer oldId, HierarchyItemI
175175
} else {
176176
indexWriter.updateDocument(new Term(ID, oldId != null ? oldId.toString() : currentId.toString()), doc);
177177
}
178-
} catch (Exception e) {
178+
} catch (Throwable e) {
179179
logger.logError("Error while indexing file: " + currentId, e);
180180
}
181181
}
@@ -196,15 +196,15 @@ private void indexContent(Integer currentId, FileImpl file, Document doc) {
196196
String content = tika.parseToString(stream, metadata, MAX_CONTENT_LENGTH);
197197
doc.add(new TextField(CONTENTS, content, Field.Store.YES));
198198
}
199-
} catch (Exception ex) {
199+
} catch (Throwable ex) {
200200
if (!(ex instanceof ZeroByteFileException)) {
201201
logger.logError("Error while indexing content: " + currentId, ex);
202202
}
203203
} finally {
204204
if (stream != null) {
205205
try {
206206
stream.close();
207-
} catch (IOException e) {
207+
} catch (Throwable e) {
208208
logger.logError("Error closing stream while indexing: " + currentId, e);
209209
}
210210
}
@@ -217,7 +217,7 @@ private void indexContent(Integer currentId, FileImpl file, Document doc) {
217217
void stop() {
218218
try {
219219
indexWriter.close();
220-
} catch (IOException e) {
220+
} catch (Throwable e) {
221221
logger.logError("Cannot release index resources", e);
222222
}
223223
}
@@ -230,7 +230,7 @@ void stop() {
230230
void deleteIndex(HierarchyItemImpl file) {
231231
try {
232232
indexWriter.deleteDocuments(new Term(ID, String.valueOf(file.getId())));
233-
} catch (Exception e) {
233+
} catch (Throwable e) {
234234
logger.logDebug("Cannot delete index for the file: " + file.getId());
235235
}
236236
}
@@ -261,7 +261,7 @@ static class CommitTask extends TimerTask {
261261
public void run() {
262262
try {
263263
indexWriter.commit();
264-
} catch (IOException e) {
264+
} catch (Throwable e) {
265265
logger.logError("Cannot commit.", e);
266266
}
267267
}
@@ -336,7 +336,7 @@ Map<String, String> search(String searchLine, SearchOptions options, boolean sni
336336
if (options.isSearchContent()) {
337337
paths.putAll(searchContent(searchLine, snippet, reader));
338338
}
339-
} catch (Exception e) {
339+
} catch (Throwable e) {
340340
logger.logError("Error while doing index search.", e);
341341
}
342342
return paths;
@@ -376,7 +376,7 @@ private Map<String, String> searchWithSnippet(IndexReader indexReader, Query que
376376
highlighter.setMaxDocCharsToAnalyze(Indexer.MAX_CONTENT_LENGTH);
377377
highlighter.setTextFragmenter(fragmenter);
378378

379-
ScoreDoc scoreDocs[] = indexSearcher.search(query, 100).scoreDocs;
379+
ScoreDoc[] scoreDocs = indexSearcher.search(query, 100).scoreDocs;
380380
Map<String, String> result = new LinkedHashMap<>();
381381
for (ScoreDoc scoreDoc : scoreDocs) {
382382
Document document = indexSearcher.doc(scoreDoc.doc);

Java/filesystemstorage/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.ithit.webdav.samples</groupId>
88
<artifactId>filesystemstorage</artifactId>
9-
<version>4.2.2815</version>
9+
<version>4.3.3512</version>
1010
<packaging>war</packaging>
1111

1212
<properties>
@@ -34,7 +34,7 @@
3434
<dependency>
3535
<groupId>com.ithit.webdav.integration</groupId>
3636
<artifactId>servlet-integration</artifactId>
37-
<version>4.2.2815</version>
37+
<version>4.3.3512</version>
3838
</dependency>
3939
<dependency>
4040
<groupId>commons-io</groupId>
@@ -142,7 +142,7 @@
142142
<dependency>
143143
<groupId>com.ithit.webdav</groupId>
144144
<artifactId>webdav-server</artifactId>
145-
<version>4.2.2815</version>
145+
<version>4.3.3512</version>
146146
</dependency>
147147
<dependency>
148148
<groupId>net.java.dev.jna</groupId>
@@ -228,7 +228,7 @@
228228
<server>filesystem</server>
229229
<port>11021</port>
230230
<path>/</path>
231-
<warSourceDirectory>target/filesystemstorage-4.2.2815</warSourceDirectory>
231+
<warSourceDirectory>target/filesystemstorage-4.3.3512</warSourceDirectory>
232232
</configuration>
233233
</plugin>
234234
<plugin>

Java/filesystemstorage/src/main/java/com/ithit/webdav/samples/fsstorageservlet/SearchFacade.java

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import com.ithit.webdav.server.HierarchyItem;
44
import com.ithit.webdav.server.Logger;
5-
import com.ithit.webdav.server.exceptions.ServerException;
65
import com.ithit.webdav.server.search.SearchOptions;
76
import org.apache.commons.lang.StringEscapeUtils;
87
import org.apache.lucene.analysis.TokenStream;
@@ -95,14 +94,14 @@ private class IndexTask extends TimerTask {
9594
*/
9695
@Override
9796
public void run() {
98-
List<HierarchyItem> filesToIndex = new ArrayList<>();
99-
File data = new File(dataFolder);
100-
StandardAnalyzer standardAnalyzer = new StandardAnalyzer();
101-
searcher = new Searcher(indexFolder, standardAnalyzer, logger);
102-
getFilesToIndex(data.listFiles(), filesToIndex, dataFolder);
10397
ForkJoinPool forkJoinPool = new ForkJoinPool(4);
10498
Directory fsDir;
10599
try {
100+
List<HierarchyItem> filesToIndex = new ArrayList<>();
101+
File data = new File(dataFolder);
102+
StandardAnalyzer standardAnalyzer = new StandardAnalyzer();
103+
searcher = new Searcher(indexFolder, standardAnalyzer, logger);
104+
getFilesToIndex(data.listFiles(), filesToIndex, dataFolder);
106105
fsDir = FSDirectory.open(Paths.get(indexFolder));
107106
IndexWriterConfig conf = new IndexWriterConfig(standardAnalyzer);
108107
conf.setOpenMode(IndexWriterConfig.OpenMode.CREATE_OR_APPEND);
@@ -164,7 +163,7 @@ private void addFileToTheList(List<HierarchyItem> result, String dataFolder, Fil
164163
context += "/";
165164
}
166165
result.add(engine.getHierarchyItem(context));
167-
} catch (Exception e) {
166+
} catch (Throwable e) {
168167
logger.logDebug("Cannot add file to the list: " + f.getAbsolutePath());
169168
}
170169
}
@@ -217,7 +216,7 @@ protected void compute() {
217216
for (HierarchyItem f : files) {
218217
try {
219218
indexFile(f.getName(), f.getPath(), null, f);
220-
} catch (ServerException e) {
219+
} catch (Throwable e) {
221220
logger.logDebug("Cannot find path for this file.");
222221
}
223222
}
@@ -280,7 +279,7 @@ void indexFile(String fileName, String currentPath, String oldPath, HierarchyIte
280279
void stop() {
281280
try {
282281
indexWriter.close();
283-
} catch (IOException e) {
282+
} catch (Throwable e) {
284283
logger.logError("Cannot release index resources", e);
285284
}
286285
}
@@ -293,7 +292,7 @@ void stop() {
293292
void deleteIndex(HierarchyItem file) {
294293
try {
295294
indexWriter.deleteDocuments(new Term(PATH, file.getPath()));
296-
} catch (Exception e) {
295+
} catch (Throwable e) {
297296
logger.logError("Cannot delete index for the file.", e);
298297
}
299298
}
@@ -324,7 +323,7 @@ static class CommitTask extends TimerTask {
324323
public void run() {
325324
try {
326325
indexWriter.commit();
327-
} catch (IOException e) {
326+
} catch (Throwable e) {
328327
logger.logError("Cannot commit.", e);
329328
}
330329
}
@@ -403,7 +402,7 @@ Map<String, String> search(String searchLine, SearchOptions options, String pare
403402
if (options.isSearchName()) {
404403
paths.putAll(searchName(searchLine, parent));
405404
}
406-
} catch (Exception e) {
405+
} catch (Throwable e) {
407406
logger.logError("Error while doing index search.", e);
408407
}
409408
return paths;
@@ -435,7 +434,7 @@ private Map<String, String> searchWithSnippet(IndexReader indexReader, Query que
435434
Highlighter highlighter = new Highlighter(htmlFormatter, queryScorer);
436435
highlighter.setTextFragmenter(fragmenter);
437436

438-
ScoreDoc scoreDocs[] = indexSearcher.search(query, 100).scoreDocs;
437+
ScoreDoc[] scoreDocs = indexSearcher.search(query, 100).scoreDocs;
439438
Map<String, String> result = new LinkedHashMap<>();
440439
for (ScoreDoc scoreDoc : scoreDocs) {
441440
Document document = indexSearcher.doc(scoreDoc.doc);

Java/oraclestorage/pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.ithit.webdav.samples</groupId>
88
<artifactId>oraclestorage</artifactId>
9-
<version>4.2.2815</version>
9+
<version>4.3.3512</version>
1010
<packaging>war</packaging>
1111

1212
<properties>
@@ -23,7 +23,7 @@
2323
<dependency>
2424
<groupId>com.ithit.webdav.integration</groupId>
2525
<artifactId>servlet-integration</artifactId>
26-
<version>4.2.2815</version>
26+
<version>4.3.3512</version>
2727
</dependency>
2828
<dependency>
2929
<groupId>commons-dbcp</groupId>
@@ -125,7 +125,7 @@
125125
<dependency>
126126
<groupId>com.ithit.webdav</groupId>
127127
<artifactId>webdav-server</artifactId>
128-
<version>4.2.2815</version>
128+
<version>4.3.3512</version>
129129
</dependency>
130130

131131
<dependency>
@@ -165,7 +165,7 @@
165165
<goal>copy-resources</goal>
166166
</goals>
167167
<configuration>
168-
<outputDirectory>${project.build.directory}/oraclestorage-4.2.2815/META-INF</outputDirectory>
168+
<outputDirectory>${project.build.directory}/oraclestorage-4.3.3512/META-INF</outputDirectory>
169169
<overwrite>true</overwrite>
170170
<resources>
171171
<resource>
@@ -244,7 +244,7 @@
244244
<server>filesystem</server>
245245
<port>11021</port>
246246
<path>/</path>
247-
<warSourceDirectory>target/oraclestorage-4.2.2815</warSourceDirectory>
247+
<warSourceDirectory>target/oraclestorage-4.3.3512</warSourceDirectory>
248248
</configuration>
249249
</plugin>
250250
<plugin>

Java/oraclestorage/src/main/java/com/ithit/webdav/samples/oraclestorageservlet/SearchFacade.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ void indexFile(String fileName, Integer currentId, Integer oldId, HierarchyItemI
175175
} else {
176176
indexWriter.updateDocument(new Term(ID, oldId != null ? oldId.toString() : currentId.toString()), doc);
177177
}
178-
} catch (Exception e) {
178+
} catch (Throwable e) {
179179
logger.logError("Error while indexing file: " + currentId, e);
180180
}
181181
}
@@ -196,15 +196,15 @@ private void indexContent(Integer currentId, FileImpl file, Document doc) {
196196
String content = tika.parseToString(stream, metadata, MAX_CONTENT_LENGTH);
197197
doc.add(new TextField(CONTENTS, content, Field.Store.YES));
198198
}
199-
} catch (Exception ex) {
199+
} catch (Throwable ex) {
200200
if (!(ex instanceof ZeroByteFileException)) {
201201
logger.logError("Error while indexing content: " + currentId, ex);
202202
}
203203
} finally {
204204
if (stream != null) {
205205
try {
206206
stream.close();
207-
} catch (IOException e) {
207+
} catch (Throwable e) {
208208
logger.logError("Error while indexing file content: " + currentId, e);
209209
}
210210
}
@@ -230,7 +230,7 @@ void stop() {
230230
void deleteIndex(HierarchyItemImpl file) {
231231
try {
232232
indexWriter.deleteDocuments(new Term(ID, String.valueOf(file.getId())));
233-
} catch (Exception e) {
233+
} catch (Throwable e) {
234234
logger.logDebug("Cannot delete index for the file: " + file.getId());
235235
}
236236
}
@@ -336,7 +336,7 @@ Map<String, String> search(String searchLine, SearchOptions options, boolean sni
336336
if (options.isSearchContent()) {
337337
paths.putAll(searchContent(searchLine, snippet, reader));
338338
}
339-
} catch (Exception e) {
339+
} catch (Throwable e) {
340340
logger.logError("Error while doing index search.", e);
341341
}
342342
return paths;
@@ -376,7 +376,7 @@ private Map<String, String> searchWithSnippet(IndexReader indexReader, Query que
376376
highlighter.setMaxDocCharsToAnalyze(Indexer.MAX_CONTENT_LENGTH);
377377
highlighter.setTextFragmenter(fragmenter);
378378

379-
ScoreDoc scoreDocs[] = indexSearcher.search(query, 100).scoreDocs;
379+
ScoreDoc[] scoreDocs = indexSearcher.search(query, 100).scoreDocs;
380380
Map<String, String> result = new LinkedHashMap<>();
381381
for (ScoreDoc scoreDoc : scoreDocs) {
382382
Document document = indexSearcher.doc(scoreDoc.doc);

0 commit comments

Comments
 (0)