Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 195824 - FileAlreadyLockedException in checkstyle.AuxPropsImpl.copyToCacheDir
FileAlreadyLockedException in checkstyle.AuxPropsImpl.copyToCacheDir
Product: projects
Classification: Unclassified
Component: Maven
All All
: P3 (vote)
: 7.2
Assigned To: Milos Kleint
Depends on:
  Show dependency treegraph
Reported: 2011-02-22 19:43 UTC by rdelaplante
Modified: 2012-03-17 10:35 UTC (History)
0 users

See Also:
Issue Type: DEFECT

stacktrace (9.12 KB, text/plain)
2011-02-22 19:43 UTC, rdelaplante

Note You need to log in before you can comment on or make changes to this bug.
Description rdelaplante 2011-02-22 19:43:27 UTC
Build: NetBeans IDE Dev (Build 201102160501)
VM: Java HotSpot(TM) Client VM, 16.3-b01, Java(TM) SE Runtime Environment, 1.6.0_20-b02
OS: Linux

User Comments:
rdelaplante: I opened the IDE and got this exception

java.lang.Throwable: Locked by:
   at org.openide.filesystems.FileLock.<init>(
   at org.netbeans.modules.masterfs.filebasedfs.fileobjects.LockForFile.<init>(
   at org.netbeans.modules.masterfs.filebasedfs.fileobjects.LockForFile.tryLock(
   at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FileObj.lock(
   at org.openide.filesystems.FileObject.delete(
   at org.netbeans.modules.maven.format.checkstyle.AuxPropsImpl.copyToCacheDir(
Comment 1 rdelaplante 2011-02-22 19:43:32 UTC
Created attachment 106313 [details]
Comment 2 Jesse Glick 2011-02-28 16:17:48 UTC
Might be a race condition.
Comment 3 Milos Kleint 2012-03-13 15:19:22 UTC
I'm not clear how it could happen in the current codebase, given that all cases of copying the file are protected by synchronized (AuxPropsImpl.this) makes sure that we use just one method to copy files and avoid deleting the file if it exists.
Comment 4 Quality Engineering 2012-03-17 10:35:48 UTC
Integrated into 'main-golden', will be available in build *201203170400* on (upload may still be in progress)
User: Milos Kleint <>
Log: #195824 unify ways of copying the checkstyle config file to a configuration area.. never delete, just overwrite.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo