code: public Lock makeLock(final String name) {
      return new Lock() {
        public boolean obtain() {
          return true;
        }
  
        public void release() {
        }
  
        public boolean isLocked() {
          throw new UnsupportedOperationException();
        }
  
        public String toString() {
          return "Lock@" + new Path(directory, name);
        }
      };
    }
docs: /* (non-Javadoc)
  @see org.apache.lucene.store.Directory#makeLock(java.lang.String)