/** * {@inheritDoc} */ @Override protected void decorateBuilder(SCMBuilder<?, ?> builder) { ((GitSCMBuilder<?>) builder).withBrowser(browser); }
/** * {@inheritDoc} */ @NonNull @Override public SCM build(@NonNull SCMHead head, @CheckForNull SCMRevision revision) { GitSCMBuilder<?> builder = newBuilder(head, revision); if (MethodUtils.isOverridden(AbstractGitSCMSource.class, getClass(), "getExtensions")) { builder.withExtensions(getExtensions()); } if (MethodUtils.isOverridden(AbstractGitSCMSource.class, getClass(), "getBrowser")) { builder.withBrowser(getBrowser()); } if (MethodUtils.isOverridden(AbstractGitSCMSource.class, getClass(), "getGitTool")) { builder.withGitTool(getGitTool()); } if (MethodUtils.isOverridden(AbstractGitSCMSource.class, getClass(), "getRefSpecs")) { List<String> specs = new ArrayList<>(); for (RefSpec spec: getRefSpecs()) { specs.add(spec.toString()); } builder.withoutRefSpecs().withRefSpecs(specs); } builder.withTraits(getTraits()); decorate(builder); return builder.build(); }