mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Merged V2.0 to HEAD
svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V2.0@5161 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V2.0@5162 . - Word 2003 fix svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V2.0@5167 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V2.0@5168 . - .sh executable scripts git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5174 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
@@ -151,24 +151,24 @@ public class FileLock
|
||||
public final boolean hasOverlap(long offset, long len)
|
||||
{
|
||||
|
||||
// Check if the lock is for the whole file
|
||||
|
||||
if (isWholeFile())
|
||||
// Check if the lock is for the whole file
|
||||
|
||||
if ( isWholeFile())
|
||||
return true;
|
||||
|
||||
// Check if the locks overlap
|
||||
|
||||
// Check if the locks overlap
|
||||
|
||||
long endOff = getOffset() + getLength();
|
||||
|
||||
long endOff = getOffset() + ( getLength() - 1);
|
||||
|
||||
if (getOffset() < offset && endOff < offset)
|
||||
return false;
|
||||
|
||||
endOff = offset + len;
|
||||
|
||||
if (getOffset() > endOff)
|
||||
endOff = offset + ( len - 1);
|
||||
|
||||
if ( getOffset() > endOff)
|
||||
return false;
|
||||
|
||||
// Locks overlap
|
||||
// Locks overlap
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user