Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 83862 Details for
Bug 44735
Unable to create platform lock file
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
update patch against HEAD
44735_org.eclipse.osgi.txt (text/plain), 2.21 KB, created by
Thomas Watson
on 2007-11-27 09:33:46 EST
(
hide
)
Description:
update patch against HEAD
Filename:
MIME Type:
Creator:
Thomas Watson
Created:
2007-11-27 09:33:46 EST
Size:
2.21 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.osgi >Index: supplement/src/org/eclipse/core/runtime/internal/adaptor/Locker_JavaNio.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.osgi/supplement/src/org/eclipse/core/runtime/internal/adaptor/Locker_JavaNio.java,v >retrieving revision 1.7 >diff -u -r1.7 Locker_JavaNio.java >--- supplement/src/org/eclipse/core/runtime/internal/adaptor/Locker_JavaNio.java 11 Sep 2007 17:33:15 -0000 1.7 >+++ supplement/src/org/eclipse/core/runtime/internal/adaptor/Locker_JavaNio.java 27 Nov 2007 14:31:16 -0000 >@@ -8,12 +8,12 @@ > * Contributors: > * IBM Corporation - initial API and implementation > * Danail Nachev (Prosyst) - bug 185654 >+ * Andrei Loskutov - bug 44735 > *******************************************************************************/ > package org.eclipse.core.runtime.internal.adaptor; > > import java.io.*; >-import java.nio.channels.FileLock; >-import java.nio.channels.OverlappingFileLockException; >+import java.nio.channels.*; > import org.eclipse.osgi.util.NLS; > > /** >@@ -31,7 +31,12 @@ > public synchronized boolean lock() throws IOException { > raFile = new RandomAccessFile(lockFile, "rw"); //$NON-NLS-1$ > try { >- fileLock = raFile.getChannel().tryLock(); >+ /* >+ * fix for bug http://bugs.sun.com/view_bug.do?bug_id=6628575 and >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=44735#c17 >+ */ >+ FileChannel fc = raFile.getChannel(); >+ fileLock = fc.tryLock(0, fc.size(), false); > } catch (IOException ioe) { > // print exception if debugging > if (BasicLocation.DEBUG) >@@ -77,7 +82,12 @@ > RandomAccessFile temp = new RandomAccessFile(lockFile, "rw"); //$NON-NLS-1$ > FileLock tempLock = null; > try { >- tempLock = temp.getChannel().tryLock(); >+ /* >+ * fix for bug http://bugs.sun.com/view_bug.do?bug_id=6628575 and >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=44735#c17 >+ */ >+ FileChannel fc = temp.getChannel(); >+ tempLock = fc.tryLock(0, fc.size(), false); > if (tempLock != null) { > tempLock.release(); // allow IOException to propagate because that would mean it is still locked > return false;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 44735
:
6431
|
6453
|
83850
|
83851
|
83852
|
83862
|
83875
|
84020
|
84086
|
84230