Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[JENKINS-42877] Set @restricted for methods used only through Jelly a…
…s well as undo copyright changes.
  • Loading branch information
Evaristo Gutiérrez committed Apr 19, 2017
1 parent afdeba4 commit 6dd16c3
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 4 deletions.
Expand Up @@ -38,6 +38,8 @@ of this software and associated documentation files (the "Software"), to deal
import org.jenkinsci.lib.configprovider.ConfigProvider;
import org.jenkinsci.lib.configprovider.model.Config;
import org.jenkinsci.lib.configprovider.model.ContentType;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;
import org.kohsuke.stapler.HttpRedirect;
import org.kohsuke.stapler.HttpResponse;
import org.kohsuke.stapler.QueryParameter;
Expand Down Expand Up @@ -84,6 +86,7 @@ public String getIconFileName() {
/**
* used by configfiles.jelly to resolve the correct path to the icon (see JENKINS-24441)
*/
@Restricted(NoExternalUse.class)
public String getIconUrl(String rootUrl) {
if (rootUrl.endsWith("/")) {
return rootUrl + ICON_PATH.substring(1);
Expand All @@ -94,6 +97,7 @@ public String getIconUrl(String rootUrl) {
/**
* used by configfiles.jelly to gather the class to be referenced when loading jelly files
*/
@Restricted(NoExternalUse.class)
public Class getJellyFilesClass() {
return ConfigFilesUIContract.class;
}
Expand Down
Expand Up @@ -17,6 +17,8 @@
import org.jenkinsci.plugins.configfiles.ConfigFilesManagement;
import org.jenkinsci.plugins.configfiles.ConfigFilesUIContract;
import org.jenkinsci.plugins.configfiles.Messages;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;
import org.kohsuke.stapler.*;

import javax.servlet.ServletException;
Expand All @@ -43,6 +45,7 @@ public String getIconFileName() {
/**
* used by configfiles.jelly to resolve the correct path to the icon (see JENKINS-24441)
*/
@Restricted(NoExternalUse.class)
public String getIconUrl(String rootUrl) {
if (rootUrl.endsWith("/")) {
return rootUrl + ConfigFilesManagement.ICON_PATH.substring(1);
Expand All @@ -53,6 +56,7 @@ public String getIconUrl(String rootUrl) {
/**
* used by configfiles.jelly to gather the class to be referenced when loading jelly files
*/
@Restricted(NoExternalUse.class)
public Class getJellyFilesClass() {
return ConfigFilesUIContract.class;
}
Expand Down
@@ -1,4 +1,4 @@
# Copyright (c) 2017, Dominik Bartholdi
# Copyright (c) 2011, Olivier Lamy
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
Expand Down
@@ -1,4 +1,4 @@
# Copyright (c) 2017, Dominik Bartholdi
# Copyright (c) 2011, Olivier Lamy
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
Expand Down
@@ -1,4 +1,4 @@
# Copyright (c) 2017, Dominik Bartholdi
# Copyright (c) 2011, Olivier Lamy
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
Expand Down
@@ -1,4 +1,4 @@
# Copyright (c) 2017, Dominik Bartholdi
# Copyright (c) 2011, Olivier Lamy
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
Expand Down

0 comments on commit 6dd16c3

Please sign in to comment.