code: private void generateSession() {
          this.session = this.system.getSession(getSettings(), this.useLegacyLocalRepository);
          if (this.disableClassPathWorkspaceReader) {
              ((DefaultRepositorySystemSession) this.session).setWorkspaceReader(null);
          }
      }
docs: Generates an instance of the {@link DefaultRepositorySystemSession} and takes into account related properties