Skip to content

Commit ddcc6ff

Browse files
committed
4.1.2765
1 parent 7ee9f21 commit ddcc6ff

File tree

11 files changed

+207
-184
lines changed

11 files changed

+207
-184
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.1.2762.jar': 'javax.xml.stream.** com.ithit.webdav.xml.stream.@1'
33+
'webdav-server-4.1.2715.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.1.2762', {
74+
implementation('com.ithit.webdav.integration:android-integration:4.1.2715', {
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.1.2762'
79+
jarJar 'com.ithit.webdav:webdav-server:4.1.2715'
8080
testImplementation 'junit:junit:4.12'
8181
}

Java/deltav/pom.xml

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
35
<modelVersion>4.0.0</modelVersion>
46

57
<groupId>com.ithit.webdav.samples</groupId>
68
<artifactId>deltav</artifactId>
7-
<version>4.1.2760</version>
9+
<version>4.1.2715</version>
810
<packaging>war</packaging>
911

1012
<properties>
1113
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
12-
<frontend-maven-plugin.version>1.6</frontend-maven-plugin.version>
1314
</properties>
1415

1516
<dependencies>
@@ -22,12 +23,12 @@
2223
<dependency>
2324
<groupId>com.ithit.webdav.integration</groupId>
2425
<artifactId>servlet-integration</artifactId>
25-
<version>4.1.2762</version>
26+
<version>4.1.2715</version>
2627
</dependency>
2728
<dependency>
2829
<groupId>commons-dbcp</groupId>
2930
<artifactId>commons-dbcp</artifactId>
30-
<version>1.4</version>
31+
<version>1.2.2</version>
3132
<scope>runtime</scope>
3233
</dependency>
3334
<dependency>
@@ -45,17 +46,17 @@
4546
<dependency>
4647
<groupId>org.apache.lucene</groupId>
4748
<artifactId>lucene-core</artifactId>
48-
<version>7.6.0</version>
49+
<version>7.5.0</version>
4950
</dependency>
5051
<dependency>
5152
<groupId>org.apache.lucene</groupId>
5253
<artifactId>lucene-queryparser</artifactId>
53-
<version>7.6.0</version>
54+
<version>7.5.0</version>
5455
</dependency>
5556
<dependency>
5657
<groupId>org.apache.lucene</groupId>
5758
<artifactId>lucene-highlighter</artifactId>
58-
<version>7.6.0</version>
59+
<version>7.5.0</version>
5960
</dependency>
6061
<dependency>
6162
<groupId>org.apache.tika</groupId>
@@ -124,7 +125,7 @@
124125
<dependency>
125126
<groupId>com.ithit.webdav</groupId>
126127
<artifactId>webdav-server</artifactId>
127-
<version>4.1.2762</version>
128+
<version>4.1.2715</version>
128129
</dependency>
129130

130131
<dependency>
@@ -164,7 +165,7 @@
164165
<goal>copy-resources</goal>
165166
</goals>
166167
<configuration>
167-
<outputDirectory>${project.build.directory}/deltav-4.1.2762/META-INF</outputDirectory>
168+
<outputDirectory>${project.build.directory}/deltav-4.1.2715/META-INF</outputDirectory>
168169
<overwrite>true</overwrite>
169170
<resources>
170171
<resource>
@@ -192,9 +193,15 @@
192193
</goals>
193194
<configuration>
194195
<target>
195-
<input message="Please enter the test database url ofr jdbc connection: " addproperty="db.url" defaultvalue="jdbc:oracle:thin:@localhost:1521:XE" />
196-
<input message="Please enter the test database login: " addproperty="db.login" defaultvalue="system" />
197-
<input message="Please enter the test database login: " addproperty="db.password" />
196+
<input
197+
message="Please enter the test database url ofr jdbc connection: "
198+
addproperty="db.url" defaultvalue="jdbc:oracle:thin:@localhost:1521:XE"/>
199+
<input
200+
message="Please enter the test database login: "
201+
addproperty="db.login" defaultvalue="system"/>
202+
<input
203+
message="Please enter the test database login: "
204+
addproperty="db.password" />
198205
</target>
199206
<exportAntProperties>true</exportAntProperties>
200207
</configuration>
@@ -208,7 +215,7 @@
208215
<configuration>
209216
<target>
210217
<exec executable="start" vmlauncher="false">
211-
<arg line="http://localhost:11021/" />
218+
<arg line="http://localhost:11021/"/>
212219
</exec>
213220
</target>
214221
</configuration>
@@ -222,7 +229,7 @@
222229
<configuration>
223230
<target>
224231
<exec executable="xdg-open">
225-
<arg line="http://localhost:11021/" />
232+
<arg line="http://localhost:11021/"/>
226233
</exec>
227234
</target>
228235
</configuration>
@@ -237,7 +244,7 @@
237244
<server>filesystem</server>
238245
<port>11021</port>
239246
<path>/</path>
240-
<warSourceDirectory>target/deltav-4.1.2762</warSourceDirectory>
247+
<warSourceDirectory>target/deltav-4.1.2715</warSourceDirectory>
241248
</configuration>
242249
</plugin>
243250
<plugin>
@@ -268,7 +275,7 @@
268275
<plugin>
269276
<groupId>com.github.eirslett</groupId>
270277
<artifactId>frontend-maven-plugin</artifactId>
271-
<version>${frontend-maven-plugin.version}</version>
278+
<version>1.6</version>
272279
<executions>
273280
<execution>
274281
<id>install node and npm</id>
@@ -293,6 +300,9 @@
293300
</configuration>
294301
</execution>
295302
</executions>
303+
<configuration>
304+
<escapeString>\</escapeString>
305+
</configuration>
296306
</plugin>
297307
</plugins>
298308
</build>

Java/deltav/src/main/dbresources/db/deltav.sql

Lines changed: 51 additions & 51 deletions
Large diffs are not rendered by default.

Java/filesystemstorage/pom.xml

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
35
<modelVersion>4.0.0</modelVersion>
46

57
<groupId>com.ithit.webdav.samples</groupId>
68
<artifactId>filesystemstorage</artifactId>
7-
<version>4.1.2760</version>
9+
<version>4.1.2715</version>
810
<packaging>war</packaging>
911

1012
<properties>
@@ -32,18 +34,18 @@
3234
<dependency>
3335
<groupId>com.ithit.webdav.integration</groupId>
3436
<artifactId>servlet-integration</artifactId>
35-
<version>4.1.2762</version>
37+
<version>4.1.2715</version>
3638
</dependency>
3739
<dependency>
3840
<groupId>commons-io</groupId>
3941
<artifactId>commons-io</artifactId>
40-
<version>2.6</version>
42+
<version>2.4</version>
4143
<scope>compile</scope>
4244
</dependency>
4345
<dependency>
4446
<groupId>commons-dbcp</groupId>
4547
<artifactId>commons-dbcp</artifactId>
46-
<version>1.4</version>
48+
<version>1.2.2</version>
4749
<scope>provided</scope>
4850
</dependency>
4951
<dependency>
@@ -52,20 +54,26 @@
5254
<version>1.4</version>
5355
<scope>provided</scope>
5456
</dependency>
57+
<dependency>
58+
<groupId>com.hynnet</groupId>
59+
<artifactId>oracle-driver-ojdbc6</artifactId>
60+
<version>12.1.0.1</version>
61+
<scope>provided</scope>
62+
</dependency>
5563
<dependency>
5664
<groupId>org.apache.lucene</groupId>
5765
<artifactId>lucene-core</artifactId>
58-
<version>7.6.0</version>
66+
<version>7.5.0</version>
5967
</dependency>
6068
<dependency>
6169
<groupId>org.apache.lucene</groupId>
6270
<artifactId>lucene-queryparser</artifactId>
63-
<version>7.6.0</version>
71+
<version>7.5.0</version>
6472
</dependency>
6573
<dependency>
6674
<groupId>org.apache.lucene</groupId>
6775
<artifactId>lucene-highlighter</artifactId>
68-
<version>7.6.0</version>
76+
<version>7.5.0</version>
6977
</dependency>
7078
<dependency>
7179
<groupId>org.apache.tika</groupId>
@@ -134,7 +142,7 @@
134142
<dependency>
135143
<groupId>com.ithit.webdav</groupId>
136144
<artifactId>webdav-server</artifactId>
137-
<version>4.1.2762</version>
145+
<version>4.1.2715</version>
138146
</dependency>
139147
<dependency>
140148
<groupId>net.java.dev.jna</groupId>
@@ -191,7 +199,7 @@
191199
<configuration>
192200
<target>
193201
<exec executable="start" vmlauncher="false">
194-
<arg line="http://localhost:11021/" />
202+
<arg line="http://localhost:11021/"/>
195203
</exec>
196204
</target>
197205
</configuration>
@@ -205,7 +213,7 @@
205213
<configuration>
206214
<target>
207215
<exec executable="xdg-open">
208-
<arg line="http://localhost:11021/" />
216+
<arg line="http://localhost:11021/"/>
209217
</exec>
210218
</target>
211219
</configuration>
@@ -220,7 +228,7 @@
220228
<server>filesystem</server>
221229
<port>11021</port>
222230
<path>/</path>
223-
<warSourceDirectory>target/filesystemstorage-4.1.2762</warSourceDirectory>
231+
<warSourceDirectory>target/filesystemstorage-4.1.2715</warSourceDirectory>
224232
</configuration>
225233
</plugin>
226234
<plugin>
@@ -251,6 +259,9 @@
251259
</configuration>
252260
</execution>
253261
</executions>
262+
<configuration>
263+
<escapeString>\</escapeString>
264+
</configuration>
254265
</plugin>
255266
</plugins>
256267
</build>

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

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ class FileImpl extends HierarchyItemImpl implements File, Lock,
3232

3333
private String snippet;
3434

35-
private OpenOption[] allowedOpenFileOptions;
36-
3735
/**
3836
* Initializes a new instance of the {@link FileImpl} class.
3937
*
@@ -45,13 +43,6 @@ class FileImpl extends HierarchyItemImpl implements File, Lock,
4543
*/
4644
private FileImpl(String name, String path, long created, long modified, WebDavEngine engine) {
4745
super(name, path, created, modified, engine);
48-
49-
/* Mac OS X and Ubuntu doesn't work with ExtendedOpenOption.NOSHARE_DELETE */
50-
String systemName = System.getProperty("os.name").toLowerCase();
51-
this.allowedOpenFileOptions = (systemName.contains("mac") || systemName.contains("linux")) ?
52-
(new OpenOption[]{StandardOpenOption.WRITE, StandardOpenOption.CREATE, StandardOpenOption.READ}) :
53-
(new OpenOption[]{StandardOpenOption.WRITE, StandardOpenOption.CREATE, StandardOpenOption.READ,
54-
ExtendedOpenOption.NOSHARE_DELETE});
5546
}
5647

5748
/**
@@ -253,7 +244,7 @@ public void read(OutputStream out, long startIndex, long count) throws ServerExc
253244
public long write(InputStream content, String contentType, long startIndex, long totalFileLength)
254245
throws LockedException, ServerException, IOException {
255246
ensureHasToken();
256-
SeekableByteChannel writer = Files.newByteChannel(getFullPath(), this.allowedOpenFileOptions);
247+
SeekableByteChannel writer = Files.newByteChannel(getFullPath(), StandardOpenOption.WRITE, StandardOpenOption.CREATE, StandardOpenOption.READ, ExtendedOpenOption.NOSHARE_DELETE);
257248
if (startIndex == 0) {
258249
// If we override the file we must set position to 0 because writer could be at not 0 position.
259250
writer = writer.truncate(0);

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
import java.io.IOException;
66
import java.nio.ByteBuffer;
77
import java.nio.charset.Charset;
8-
import java.nio.file.FileSystemException;
98
import java.nio.file.Files;
9+
import java.nio.file.NoSuchFileException;
1010
import java.nio.file.Paths;
1111
import java.nio.file.attribute.UserDefinedFileAttributeView;
1212

@@ -40,15 +40,11 @@ public String getExtendedAttribute(String path, String attribName) throws Server
4040
.getFileAttributeView(Paths.get(path), UserDefinedFileAttributeView.class);
4141
ByteBuffer buf;
4242
try {
43-
if (view.list().isEmpty()) {
44-
return null;
45-
}
46-
4743
buf = ByteBuffer.allocate(view.size(attribName));
4844
view.read(attribName, buf);
4945
buf.flip();
5046
return Charset.defaultCharset().decode(buf).toString();
51-
} catch (FileSystemException ignore) {
47+
} catch (NoSuchFileException ignored) {
5248
} catch (IOException e) {
5349
throw new ServerException(String.format("Reading attribute '%s' from file '%s' failed.", attribName, path), e);
5450
}

Java/filesystemstorage/src/main/webapp/WEB-INF/web.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
</init-param>
2828
<init-param>
2929
<param-name>root</param-name>
30-
<param-value>/Users/evgenymokhnachev/projects/jira_dms/web_dav_folder/</param-value>
30+
<param-value></param-value>
3131
</init-param>
3232
<init-param>
3333
<param-name>index-interval</param-name>

0 commit comments

Comments
 (0)