提交 06d4cf11 编写于 作者: K kohsuke

integrated custom annotation checker

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@29918 71c3de6d-444a-0410-be80-ed276b4c234a
上级 e4818812
......@@ -87,6 +87,18 @@ THE SOFTWARE.
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.kohsuke</groupId>
<artifactId>access-modifier-checker</artifactId>
<version>1.0</version>
<executions>
<execution>
<goals>
<goal>enforce</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antlr-plugin</artifactId>
<configuration>
......@@ -748,6 +760,12 @@ THE SOFTWARE.
<version>2.2.3</version>
</dependency>
<dependency>
<groupId>org.kohsuke</groupId>
<artifactId>access-modifier-annotation</artifactId>
<version>1.0</version>
</dependency>
<!-- offline profiler API to put in the classpath if we need it -->
<!--dependency>
<groupId>com.yourkit.api</groupId>
......
/*
* The MIT License
*
* Copyright (c) 2010, Kohsuke Kawaguchi
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package hudson;
import org.kohsuke.accmod.Restricted;
import java.lang.annotation.Documented;
/**
* Accompanies {@link Restricted} annotation to indicate when the access restriction was placed.
*
* @author Kohsuke Kawaguchi
* @since 1.355
*/
@Documented
public @interface RestrictedSince {
/**
* Hudson version number that this restriction has started.
*/
String value();
}
......@@ -145,6 +145,8 @@ import org.jvnet.hudson.reactor.Milestone;
import org.jvnet.hudson.reactor.Reactor;
import org.jvnet.hudson.reactor.ReactorListener;
import org.jvnet.hudson.reactor.TaskGraphBuilder.Handle;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.DoNotUse;
import org.kohsuke.stapler.Ancestor;
import org.kohsuke.stapler.HttpRedirect;
import org.kohsuke.stapler.HttpResponse;
......
......@@ -26,6 +26,7 @@ package hudson.tasks;
import hudson.Launcher;
import hudson.Functions;
import hudson.Extension;
import hudson.RestrictedSince;
import hudson.Util;
import hudson.diagnosis.OldDataMonitor;
import static hudson.Util.fixEmptyAndTrim;
......@@ -39,6 +40,9 @@ import hudson.util.FormValidation;
import hudson.util.Secret;
import hudson.util.XStream2;
import org.apache.tools.ant.types.selectors.SelectorUtils;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.DoNotUse;
import org.kohsuke.accmod.restrictions.NoExternalUse;
import org.kohsuke.stapler.QueryParameter;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.export.Exported;
......@@ -136,6 +140,8 @@ public class Mailer extends Notifier {
* @deprecated as of 1.286
* Use {@link #descriptor()} to obtain the current instance.
*/
@Restricted(NoExternalUse.class)
@RestrictedSince("1.355")
public static DescriptorImpl DESCRIPTOR;
public static DescriptorImpl descriptor() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册