aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog11
-rw-r--r--netx/net/sourceforge/jnlp/util/lockingfile/LockedFile.java7
2 files changed, 15 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 536c42a..2d97c84 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,10 @@
-2013-04-19 Jiri Vanek <[email protected]>
+2013-04-25 Jiri Vanek <[email protected]>
+
+ Locking disabled on windows machines
+ * netx/net/sourceforge/jnlp/util/lockingfile/LockedFile.java:
+ (lock) and (unlock) are no-op on windows.
+
+2013-04-25 Jiri Vanek <[email protected]>
Splashscreen now strip commit id from released versions
* netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/BasePainter.java:
@@ -6,8 +12,7 @@
(drawBase) now using stripCommitFromVersion before printing drawing version
to splashscreen
* tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/BasePainterTest.java:
- (stripCommitFromVersion) new test for
-
+ (stripCommitFromVersion) new test for
2013-04-24 Adam Domurad <[email protected]>
diff --git a/netx/net/sourceforge/jnlp/util/lockingfile/LockedFile.java b/netx/net/sourceforge/jnlp/util/lockingfile/LockedFile.java
index 2941dd9..046c675 100644
--- a/netx/net/sourceforge/jnlp/util/lockingfile/LockedFile.java
+++ b/netx/net/sourceforge/jnlp/util/lockingfile/LockedFile.java
@@ -44,6 +44,7 @@ import java.nio.channels.FileLock;
import java.util.Map;
import java.util.WeakHashMap;
import java.util.concurrent.locks.ReentrantLock;
+import net.sourceforge.jnlp.runtime.JNLPRuntime;
/*
* Process & thread locked access to a file. Creates file if it does not already exist.
@@ -112,6 +113,9 @@ public class LockedFile {
* Lock access to the file. Lock is reentrant.
*/
public void lock() throws IOException {
+ if (JNLPRuntime.isWindows()) {
+ return;
+ }
// Create if does not already exist, cannot lock non-existing file
if (!isReadOnly()) {
this.file.createNewFile();
@@ -136,6 +140,9 @@ public class LockedFile {
* Unlock access to the file. Lock is reentrant.
*/
public void unlock() throws IOException {
+ if (JNLPRuntime.isWindows()) {
+ return;
+ }
boolean releaseProcessLock = (this.threadLock.getHoldCount() == 1);
try {
if (releaseProcessLock) {