docs: public @Nullable String getRootUrl() throws IllegalStateException {
          final JenkinsLocationConfiguration config = JenkinsLocationConfiguration.get();
          if (config == null) {
              // Try to get standard message if possible
              final Jenkins j = Jenkins.getInstance();
              throw new IllegalStateException("Jenkins instance " + j + " has been successfully initialized, but JenkinsLocationConfiguration is undefined.");
          }
          String url = config.getUrl();
          if(url!=null) {
              return Util.ensureEndsWith(url,"/");
          }
          StaplerRequest req = Stapler.getCurrentRequest();
          if(req!=null)
              return getRootUrlFromRequest();
          return null;
      }