in src/main/java/org/apache/sling/jcr/classloader/internal/ClassLoaderWriterImpl.java [282:306]
public boolean rename(final String oldName, final String newName) {
final String oldPath = cleanPath(oldName);
final String newPath = cleanPath(newName);
Session session = null;
try {
session = this.createSession();
session.move(oldPath, newPath);
session.save();
this.handleChangeEvent(oldName);
this.handleChangeEvent(newName);
return true;
} catch (final RepositoryException re) {
logger.error("Cannot rename " + oldName + " to " + newName, re);
} finally {
if ( session != null ) {
session.logout();
}
}
// fall back to false in case of error or non-existence of oldFileName
return false;
}