Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
FIY695
jenkins
提交
4a98beaf
J
jenkins
项目概览
FIY695
/
jenkins
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
jenkins
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
4a98beaf
编写于
8月 04, 2014
作者:
J
Jesse Glick
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Using ExtensionList.lookup consistently.
上级
d025cfbd
变更
75
隐藏空白更改
内联
并排
Showing
75 changed file
with
102 addition
and
108 deletion
+102
-108
core/src/main/java/hudson/FilePath.java
core/src/main/java/hudson/FilePath.java
+4
-14
core/src/main/java/hudson/Functions.java
core/src/main/java/hudson/Functions.java
+1
-1
core/src/main/java/hudson/LauncherDecorator.java
core/src/main/java/hudson/LauncherDecorator.java
+1
-1
core/src/main/java/hudson/PluginManager.java
core/src/main/java/hudson/PluginManager.java
+1
-1
core/src/main/java/hudson/UDPBroadcastFragment.java
core/src/main/java/hudson/UDPBroadcastFragment.java
+1
-1
core/src/main/java/hudson/URLConnectionDecorator.java
core/src/main/java/hudson/URLConnectionDecorator.java
+1
-1
core/src/main/java/hudson/cli/CLICommand.java
core/src/main/java/hudson/cli/CLICommand.java
+1
-1
core/src/main/java/hudson/cli/CliTransportAuthenticator.java
core/src/main/java/hudson/cli/CliTransportAuthenticator.java
+1
-1
core/src/main/java/hudson/console/ConsoleAnnotatorFactory.java
...src/main/java/hudson/console/ConsoleAnnotatorFactory.java
+1
-1
core/src/main/java/hudson/console/ConsoleLogFilter.java
core/src/main/java/hudson/console/ConsoleLogFilter.java
+1
-1
core/src/main/java/hudson/diagnosis/HudsonHomeDiskUsageMonitor.java
...ain/java/hudson/diagnosis/HudsonHomeDiskUsageMonitor.java
+1
-1
core/src/main/java/hudson/model/AbstractProject.java
core/src/main/java/hudson/model/AbstractProject.java
+6
-2
core/src/main/java/hudson/model/Actionable.java
core/src/main/java/hudson/model/Actionable.java
+4
-7
core/src/main/java/hudson/model/AdministrativeMonitor.java
core/src/main/java/hudson/model/AdministrativeMonitor.java
+1
-1
core/src/main/java/hudson/model/AperiodicWork.java
core/src/main/java/hudson/model/AperiodicWork.java
+1
-1
core/src/main/java/hudson/model/Api.java
core/src/main/java/hudson/model/Api.java
+2
-1
core/src/main/java/hudson/model/BuildStepListener.java
core/src/main/java/hudson/model/BuildStepListener.java
+1
-1
core/src/main/java/hudson/model/BuildVariableContributor.java
.../src/main/java/hudson/model/BuildVariableContributor.java
+1
-1
core/src/main/java/hudson/model/ComputerPanelBox.java
core/src/main/java/hudson/model/ComputerPanelBox.java
+2
-1
core/src/main/java/hudson/model/ComputerPinger.java
core/src/main/java/hudson/model/ComputerPinger.java
+1
-1
core/src/main/java/hudson/model/Descriptor.java
core/src/main/java/hudson/model/Descriptor.java
+2
-1
core/src/main/java/hudson/model/DescriptorVisibilityFilter.java
...rc/main/java/hudson/model/DescriptorVisibilityFilter.java
+1
-1
core/src/main/java/hudson/model/DownloadService.java
core/src/main/java/hudson/model/DownloadService.java
+1
-1
core/src/main/java/hudson/model/EnvironmentContributor.java
core/src/main/java/hudson/model/EnvironmentContributor.java
+1
-1
core/src/main/java/hudson/model/FingerprintCleanupThread.java
.../src/main/java/hudson/model/FingerprintCleanupThread.java
+2
-1
core/src/main/java/hudson/model/LabelFinder.java
core/src/main/java/hudson/model/LabelFinder.java
+1
-1
core/src/main/java/hudson/model/ManagementLink.java
core/src/main/java/hudson/model/ManagementLink.java
+1
-1
core/src/main/java/hudson/model/PeriodicWork.java
core/src/main/java/hudson/model/PeriodicWork.java
+1
-1
core/src/main/java/hudson/model/Queue.java
core/src/main/java/hudson/model/Queue.java
+1
-1
core/src/main/java/hudson/model/RestartListener.java
core/src/main/java/hudson/model/RestartListener.java
+1
-1
core/src/main/java/hudson/model/Run.java
core/src/main/java/hudson/model/Run.java
+4
-7
core/src/main/java/hudson/model/TransientBuildActionFactory.java
...c/main/java/hudson/model/TransientBuildActionFactory.java
+1
-1
core/src/main/java/hudson/model/TransientComputerActionFactory.java
...ain/java/hudson/model/TransientComputerActionFactory.java
+1
-1
core/src/main/java/hudson/model/TransientProjectActionFactory.java
...main/java/hudson/model/TransientProjectActionFactory.java
+1
-1
core/src/main/java/hudson/model/TransientUserActionFactory.java
...rc/main/java/hudson/model/TransientUserActionFactory.java
+1
-1
core/src/main/java/hudson/model/TransientViewActionFactory.java
...rc/main/java/hudson/model/TransientViewActionFactory.java
+1
-1
core/src/main/java/hudson/model/User.java
core/src/main/java/hudson/model/User.java
+1
-1
core/src/main/java/hudson/model/WorkspaceCleanupThread.java
core/src/main/java/hudson/model/WorkspaceCleanupThread.java
+2
-1
core/src/main/java/hudson/model/WorkspaceListener.java
core/src/main/java/hudson/model/WorkspaceListener.java
+1
-1
core/src/main/java/hudson/model/listeners/ItemListener.java
core/src/main/java/hudson/model/listeners/ItemListener.java
+1
-1
core/src/main/java/hudson/model/listeners/RunListener.java
core/src/main/java/hudson/model/listeners/RunListener.java
+1
-1
core/src/main/java/hudson/model/listeners/SCMPollListener.java
...src/main/java/hudson/model/listeners/SCMPollListener.java
+1
-1
core/src/main/java/hudson/model/queue/LoadPredictor.java
core/src/main/java/hudson/model/queue/LoadPredictor.java
+1
-1
core/src/main/java/hudson/model/queue/QueueListener.java
core/src/main/java/hudson/model/queue/QueueListener.java
+1
-1
core/src/main/java/hudson/model/queue/QueueSorter.java
core/src/main/java/hudson/model/queue/QueueSorter.java
+1
-1
core/src/main/java/hudson/model/queue/QueueTaskDispatcher.java
...src/main/java/hudson/model/queue/QueueTaskDispatcher.java
+1
-1
core/src/main/java/hudson/model/queue/SubTaskContributor.java
.../src/main/java/hudson/model/queue/SubTaskContributor.java
+1
-1
core/src/main/java/hudson/scm/ChangeLogAnnotator.java
core/src/main/java/hudson/scm/ChangeLogAnnotator.java
+1
-1
core/src/main/java/hudson/search/SearchFactory.java
core/src/main/java/hudson/search/SearchFactory.java
+1
-1
core/src/main/java/hudson/security/FederatedLoginService.java
.../src/main/java/hudson/security/FederatedLoginService.java
+1
-1
core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java
...main/java/hudson/security/HudsonPrivateSecurityRealm.java
+2
-1
core/src/main/java/hudson/security/csrf/CrumbExclusion.java
core/src/main/java/hudson/security/csrf/CrumbExclusion.java
+1
-1
core/src/main/java/hudson/slaves/CloudProvisioningListener.java
...rc/main/java/hudson/slaves/CloudProvisioningListener.java
+1
-1
core/src/main/java/hudson/slaves/ComputerListener.java
core/src/main/java/hudson/slaves/ComputerListener.java
+1
-1
core/src/main/java/hudson/tasks/UserAvatarResolver.java
core/src/main/java/hudson/tasks/UserAvatarResolver.java
+1
-1
core/src/main/java/hudson/tasks/UserNameResolver.java
core/src/main/java/hudson/tasks/UserNameResolver.java
+1
-1
core/src/main/java/hudson/tasks/junit/TestNameTransformer.java
...src/main/java/hudson/tasks/junit/TestNameTransformer.java
+1
-1
core/src/main/java/hudson/tasks/test/TestResultParser.java
core/src/main/java/hudson/tasks/test/TestResultParser.java
+1
-1
core/src/main/java/hudson/tools/ToolLocationTranslator.java
core/src/main/java/hudson/tools/ToolLocationTranslator.java
+1
-1
core/src/main/java/hudson/util/AlternativeUiTextProvider.java
.../src/main/java/hudson/util/AlternativeUiTextProvider.java
+1
-1
core/src/main/java/hudson/util/ProcessKiller.java
core/src/main/java/hudson/util/ProcessKiller.java
+1
-1
core/src/main/java/hudson/util/io/ParserConfigurator.java
core/src/main/java/hudson/util/io/ParserConfigurator.java
+1
-1
core/src/main/java/jenkins/AgentProtocol.java
core/src/main/java/jenkins/AgentProtocol.java
+1
-1
core/src/main/java/jenkins/ExtensionFilter.java
core/src/main/java/jenkins/ExtensionFilter.java
+1
-1
core/src/main/java/jenkins/model/GlobalConfigurationCategory.java
.../main/java/jenkins/model/GlobalConfigurationCategory.java
+1
-1
core/src/main/java/jenkins/model/TransientFingerprintFacetFactory.java
.../java/jenkins/model/TransientFingerprintFacetFactory.java
+1
-1
core/src/main/java/jenkins/model/Uptime.java
core/src/main/java/jenkins/model/Uptime.java
+2
-1
core/src/main/java/jenkins/model/lazy/BuildReference.java
core/src/main/java/jenkins/model/lazy/BuildReference.java
+6
-9
core/src/main/java/jenkins/security/BasicHeaderAuthenticator.java
.../main/java/jenkins/security/BasicHeaderAuthenticator.java
+1
-1
core/src/main/java/jenkins/security/SecurityListener.java
core/src/main/java/jenkins/security/SecurityListener.java
+2
-1
core/src/main/java/jenkins/slaves/JnlpAgentReceiver.java
core/src/main/java/jenkins/slaves/JnlpAgentReceiver.java
+1
-1
core/src/main/java/jenkins/slaves/WorkspaceLocator.java
core/src/main/java/jenkins/slaves/WorkspaceLocator.java
+1
-1
core/src/main/java/jenkins/slaves/restarter/SlaveRestarter.java
...rc/main/java/jenkins/slaves/restarter/SlaveRestarter.java
+1
-1
core/src/main/java/jenkins/slaves/systemInfo/SlaveSystemInfo.java
.../main/java/jenkins/slaves/systemInfo/SlaveSystemInfo.java
+1
-1
core/src/main/resources/META-INF/upgrade/ExtensionList.hint
core/src/main/resources/META-INF/upgrade/ExtensionList.hint
+1
-0
未找到文件。
core/src/main/java/hudson/FilePath.java
浏览文件 @
4a98beaf
...
...
@@ -900,14 +900,9 @@ public final class FilePath implements Serializable {
// run this on a remote system
try
{
DelegatingCallable
<
T
,
IOException
>
wrapper
=
new
FileCallableWrapper
<
T
>(
callable
,
cl
);
Jenkins
instance
=
Jenkins
.
getInstance
();
if
(
instance
!=
null
)
{
// this happens during unit tests
ExtensionList
<
FileCallableWrapperFactory
>
factories
=
instance
.
getExtensionList
(
FileCallableWrapperFactory
.
class
);
for
(
FileCallableWrapperFactory
factory
:
factories
)
{
wrapper
=
factory
.
wrap
(
wrapper
);
}
for
(
FileCallableWrapperFactory
factory
:
ExtensionList
.
lookup
(
FileCallableWrapperFactory
.
class
))
{
wrapper
=
factory
.
wrap
(
wrapper
);
}
return
channel
.
call
(
wrapper
);
}
catch
(
TunneledInterruptedException
e
)
{
throw
(
InterruptedException
)
new
InterruptedException
(
e
.
getMessage
()).
initCause
(
e
);
...
...
@@ -985,14 +980,9 @@ public final class FilePath implements Serializable {
public
<
T
>
Future
<
T
>
actAsync
(
final
FileCallable
<
T
>
callable
)
throws
IOException
,
InterruptedException
{
try
{
DelegatingCallable
<
T
,
IOException
>
wrapper
=
new
FileCallableWrapper
<
T
>(
callable
);
Jenkins
instance
=
Jenkins
.
getInstance
();
if
(
instance
!=
null
)
{
// this happens during unit tests
ExtensionList
<
FileCallableWrapperFactory
>
factories
=
instance
.
getExtensionList
(
FileCallableWrapperFactory
.
class
);
for
(
FileCallableWrapperFactory
factory
:
factories
)
{
wrapper
=
factory
.
wrap
(
wrapper
);
}
for
(
FileCallableWrapperFactory
factory
:
ExtensionList
.
lookup
(
FileCallableWrapperFactory
.
class
))
{
wrapper
=
factory
.
wrap
(
wrapper
);
}
return
(
channel
!=
null
?
channel
:
localChannel
)
.
callAsync
(
wrapper
);
}
catch
(
IOException
e
)
{
...
...
core/src/main/java/hudson/Functions.java
浏览文件 @
4a98beaf
...
...
@@ -913,7 +913,7 @@ public class Functions {
* @since 1.494
*/
public
static
Collection
<
Descriptor
>
getSortedDescriptorsForGlobalConfig
(
Predicate
<
GlobalConfigurationCategory
>
predicate
)
{
ExtensionList
<
Descriptor
>
exts
=
Jenkins
.
getInstance
().
getExtensionList
(
Descriptor
.
class
);
ExtensionList
<
Descriptor
>
exts
=
ExtensionList
.
lookup
(
Descriptor
.
class
);
List
<
Tag
>
r
=
new
ArrayList
<
Tag
>(
exts
.
size
());
for
(
ExtensionComponent
<
Descriptor
>
c
:
exts
.
getComponents
())
{
...
...
core/src/main/java/hudson/LauncherDecorator.java
浏览文件 @
4a98beaf
...
...
@@ -45,6 +45,6 @@ public abstract class LauncherDecorator implements ExtensionPoint {
* Returns all the registered {@link LauncherDecorator}s.
*/
public
static
ExtensionList
<
LauncherDecorator
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
LauncherDecorator
.
class
);
return
ExtensionList
.
lookup
(
LauncherDecorator
.
class
);
}
}
core/src/main/java/hudson/PluginManager.java
浏览文件 @
4a98beaf
...
...
@@ -1170,7 +1170,7 @@ public abstract class PluginManager extends AbstractModelObject implements OnMas
* @return this monitor.
*/
public
static
final
PluginUpdateMonitor
getInstance
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
PluginUpdateMonitor
.
class
).
get
(
0
);
return
ExtensionList
.
lookup
(
PluginUpdateMonitor
.
class
).
get
(
0
);
}
/**
...
...
core/src/main/java/hudson/UDPBroadcastFragment.java
浏览文件 @
4a98beaf
...
...
@@ -54,6 +54,6 @@ public abstract class UDPBroadcastFragment implements ExtensionPoint {
* Returns all the registered {@link UDPBroadcastFragment}s.
*/
public
static
ExtensionList
<
UDPBroadcastFragment
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
UDPBroadcastFragment
.
class
);
return
ExtensionList
.
lookup
(
UDPBroadcastFragment
.
class
);
}
}
core/src/main/java/hudson/URLConnectionDecorator.java
浏览文件 @
4a98beaf
...
...
@@ -46,6 +46,6 @@ public abstract class URLConnectionDecorator implements ExtensionPoint {
* Returns all the registered {@link URLConnectionDecorator}s.
*/
public
static
ExtensionList
<
URLConnectionDecorator
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
URLConnectionDecorator
.
class
);
return
ExtensionList
.
lookup
(
URLConnectionDecorator
.
class
);
}
}
core/src/main/java/hudson/cli/CLICommand.java
浏览文件 @
4a98beaf
...
...
@@ -489,7 +489,7 @@ public abstract class CLICommand implements ExtensionPoint, Cloneable {
* Returns all the registered {@link CLICommand}s.
*/
public
static
ExtensionList
<
CLICommand
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
CLICommand
.
class
);
return
ExtensionList
.
lookup
(
CLICommand
.
class
);
}
/**
...
...
core/src/main/java/hudson/cli/CliTransportAuthenticator.java
浏览文件 @
4a98beaf
...
...
@@ -49,6 +49,6 @@ public abstract class CliTransportAuthenticator implements ExtensionPoint {
public
abstract
void
authenticate
(
String
protocol
,
Channel
channel
,
Connection
con
);
public
static
ExtensionList
<
CliTransportAuthenticator
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
CliTransportAuthenticator
.
class
);
return
ExtensionList
.
lookup
(
CliTransportAuthenticator
.
class
);
}
}
core/src/main/java/hudson/console/ConsoleAnnotatorFactory.java
浏览文件 @
4a98beaf
...
...
@@ -127,6 +127,6 @@ public abstract class ConsoleAnnotatorFactory<T> implements ExtensionPoint {
* All the registered instances.
*/
public
static
ExtensionList
<
ConsoleAnnotatorFactory
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
ConsoleAnnotatorFactory
.
class
);
return
ExtensionList
.
lookup
(
ConsoleAnnotatorFactory
.
class
);
}
}
core/src/main/java/hudson/console/ConsoleLogFilter.java
浏览文件 @
4a98beaf
...
...
@@ -55,6 +55,6 @@ public abstract class ConsoleLogFilter implements ExtensionPoint {
* All the registered {@link ConsoleLogFilter}s.
*/
public
static
ExtensionList
<
ConsoleLogFilter
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
ConsoleLogFilter
.
class
);
return
ExtensionList
.
lookup
(
ConsoleLogFilter
.
class
);
}
}
core/src/main/java/hudson/diagnosis/HudsonHomeDiskUsageMonitor.java
浏览文件 @
4a98beaf
...
...
@@ -134,7 +134,7 @@ public final class HudsonHomeDiskUsageMonitor extends AdministrativeMonitor {
* All registered {@link Solution}s.
*/
public
static
ExtensionList
<
Solution
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
Solution
.
class
);
return
ExtensionList
.
lookup
(
Solution
.
class
);
}
}
}
core/src/main/java/hudson/model/AbstractProject.java
浏览文件 @
4a98beaf
...
...
@@ -32,6 +32,7 @@ import com.infradna.tool.bridge_method_injector.WithBridgeMethods;
import
hudson.AbortException
;
import
hudson.CopyOnWrite
;
import
hudson.EnvVars
;
import
hudson.ExtensionList
;
import
hudson.ExtensionPoint
;
import
hudson.FeedAdapter
;
import
hudson.FilePath
;
...
...
@@ -547,7 +548,7 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
public
final
@CheckForNull
FilePath
getSomeWorkspace
()
{
R
b
=
getSomeBuildWithWorkspace
();
if
(
b
!=
null
)
return
b
.
getWorkspace
();
for
(
WorkspaceBrowser
browser
:
Jenkins
.
getInstance
().
getExtensionList
(
WorkspaceBrowser
.
class
))
{
for
(
WorkspaceBrowser
browser
:
ExtensionList
.
lookup
(
WorkspaceBrowser
.
class
))
{
FilePath
f
=
browser
.
getWorkspace
(
this
);
if
(
f
!=
null
)
return
f
;
}
...
...
@@ -1369,7 +1370,7 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
WorkspaceOfflineReason
workspaceOfflineReason
=
workspaceOffline
(
b
);
if
(
workspaceOfflineReason
!=
null
)
{
// workspace offline
for
(
WorkspaceBrowser
browser
:
Jenkins
.
getInstance
().
getExtensionList
(
WorkspaceBrowser
.
class
))
{
for
(
WorkspaceBrowser
browser
:
ExtensionList
.
lookup
(
WorkspaceBrowser
.
class
))
{
ws
=
browser
.
getWorkspace
(
this
);
if
(
ws
!=
null
)
{
return
pollWithWorkspace
(
listener
,
scm
,
b
,
ws
,
browser
.
getWorkspaceList
());
...
...
@@ -2039,6 +2040,9 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
Messages
.
AbstractProject_AssignedLabelString_InvalidBooleanExpression
(
e
.
getMessage
()));
}
Jenkins
j
=
Jenkins
.
getInstance
();
if
(
j
==
null
)
{
return
FormValidation
.
ok
();
// ?
}
Label
l
=
j
.
getLabel
(
value
);
if
(
l
.
isEmpty
())
{
for
(
LabelAtom
a
:
l
.
listAtoms
())
{
...
...
core/src/main/java/hudson/model/Actionable.java
浏览文件 @
4a98beaf
...
...
@@ -23,13 +23,13 @@
*/
package
hudson.model
;
import
hudson.ExtensionList
;
import
hudson.Util
;
import
java.util.ArrayList
;
import
java.util.Collection
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.concurrent.CopyOnWriteArrayList
;
import
jenkins.model.Jenkins
;
import
jenkins.model.ModelObjectWithContextMenu
;
import
jenkins.model.TransientActionFactory
;
import
org.kohsuke.stapler.StaplerRequest
;
...
...
@@ -89,12 +89,9 @@ public abstract class Actionable extends AbstractModelObject implements ModelObj
@Exported
(
name
=
"actions"
)
public
final
List
<?
extends
Action
>
getAllActions
()
{
List
<
Action
>
_actions
=
new
ArrayList
<
Action
>(
getActions
());
Jenkins
jenkins
=
Jenkins
.
getInstance
();
if
(
jenkins
!=
null
)
{
for
(
TransientActionFactory
<?>
taf
:
jenkins
.
getExtensionList
(
TransientActionFactory
.
class
))
{
if
(
taf
.
type
().
isInstance
(
this
))
{
_actions
.
addAll
(
createFor
(
taf
));
}
for
(
TransientActionFactory
<?>
taf
:
ExtensionList
.
lookup
(
TransientActionFactory
.
class
))
{
if
(
taf
.
type
().
isInstance
(
this
))
{
_actions
.
addAll
(
createFor
(
taf
));
}
}
return
Collections
.
unmodifiableList
(
_actions
);
...
...
core/src/main/java/hudson/model/AdministrativeMonitor.java
浏览文件 @
4a98beaf
...
...
@@ -153,6 +153,6 @@ public abstract class AdministrativeMonitor extends AbstractModelObject implemen
* All registered {@link AdministrativeMonitor} instances.
*/
public
static
ExtensionList
<
AdministrativeMonitor
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
AdministrativeMonitor
.
class
);
return
ExtensionList
.
lookup
(
AdministrativeMonitor
.
class
);
}
}
core/src/main/java/hudson/model/AperiodicWork.java
浏览文件 @
4a98beaf
...
...
@@ -105,7 +105,7 @@ public abstract class AperiodicWork extends SafeTimerTask implements ExtensionPo
* Returns all the registered {@link AperiodicWork}s.
*/
public
static
ExtensionList
<
AperiodicWork
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
AperiodicWork
.
class
);
return
ExtensionList
.
lookup
(
AperiodicWork
.
class
);
}
private
static
final
Random
RANDOM
=
new
Random
();
...
...
core/src/main/java/hudson/model/Api.java
浏览文件 @
4a98beaf
...
...
@@ -23,6 +23,7 @@
*/
package
hudson.model
;
import
hudson.ExtensionList
;
import
jenkins.model.Jenkins
;
import
jenkins.security.SecureRequester
;
...
...
@@ -216,7 +217,7 @@ public class Api extends AbstractModelObject {
}
private
boolean
permit
(
StaplerRequest
req
)
{
for
(
SecureRequester
r
:
Jenkins
.
getInstance
().
getExtensionList
(
SecureRequester
.
class
))
{
for
(
SecureRequester
r
:
ExtensionList
.
lookup
(
SecureRequester
.
class
))
{
if
(
r
.
permit
(
req
,
bean
))
{
return
true
;
}
...
...
core/src/main/java/hudson/model/BuildStepListener.java
浏览文件 @
4a98beaf
...
...
@@ -27,6 +27,6 @@ public abstract class BuildStepListener implements ExtensionPoint {
*/
public
static
ExtensionList
<
BuildStepListener
>
all
()
{
// TODO should have a null-safe version when Jenkins.getInstance() is null; would require changes in ExtensionList
return
Jenkins
.
getInstance
().
getExtensionList
(
BuildStepListener
.
class
);
return
ExtensionList
.
lookup
(
BuildStepListener
.
class
);
}
}
core/src/main/java/hudson/model/BuildVariableContributor.java
浏览文件 @
4a98beaf
...
...
@@ -70,6 +70,6 @@ public abstract class BuildVariableContributor implements ExtensionPoint {
* Returns all the registered {@link BuildVariableContributor}s.
*/
public
static
ExtensionList
<
BuildVariableContributor
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
BuildVariableContributor
.
class
);
return
ExtensionList
.
lookup
(
BuildVariableContributor
.
class
);
}
}
core/src/main/java/hudson/model/ComputerPanelBox.java
浏览文件 @
4a98beaf
package
hudson.model
;
import
hudson.ExtensionList
;
import
hudson.ExtensionPoint
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -38,7 +39,7 @@ public abstract class ComputerPanelBox implements ExtensionPoint{
*/
public
static
List
<
ComputerPanelBox
>
all
(
Computer
computer
)
{
List
<
ComputerPanelBox
>
boxs
=
new
ArrayList
<
ComputerPanelBox
>();
for
(
ComputerPanelBox
box:
Jenkins
.
getInstance
().
getExtensionList
(
ComputerPanelBox
.
class
)){
for
(
ComputerPanelBox
box:
ExtensionList
.
lookup
(
ComputerPanelBox
.
class
)){
box
.
setComputer
(
computer
);
boxs
.
add
(
box
);
}
...
...
core/src/main/java/hudson/model/ComputerPinger.java
浏览文件 @
4a98beaf
...
...
@@ -27,7 +27,7 @@ public abstract class ComputerPinger implements ExtensionPoint {
* Get all registered instances.
*/
public
static
ExtensionList
<
ComputerPinger
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
ComputerPinger
.
class
);
return
ExtensionList
.
lookup
(
ComputerPinger
.
class
);
}
/**
...
...
core/src/main/java/hudson/model/Descriptor.java
浏览文件 @
4a98beaf
...
...
@@ -28,6 +28,7 @@ import hudson.PluginWrapper;
import
hudson.RelativePath
;
import
hudson.XmlFile
;
import
hudson.BulkChange
;
import
hudson.ExtensionList
;
import
hudson.Util
;
import
hudson.model.listeners.SaveableListener
;
import
hudson.util.FormApply
;
...
...
@@ -937,7 +938,7 @@ public abstract class Descriptor<T extends Describable<T>> implements Saveable {
}
public
static
@CheckForNull
Descriptor
find
(
String
className
)
{
return
find
(
Jenkins
.
getInstance
().
getExtensionList
(
Descriptor
.
class
),
className
);
return
find
(
ExtensionList
.
lookup
(
Descriptor
.
class
),
className
);
}
public
static
final
class
FormException
extends
Exception
implements
HttpResponse
{
...
...
core/src/main/java/hudson/model/DescriptorVisibilityFilter.java
浏览文件 @
4a98beaf
...
...
@@ -42,7 +42,7 @@ public abstract class DescriptorVisibilityFilter implements ExtensionPoint {
public
abstract
boolean
filter
(
Object
context
,
Descriptor
descriptor
);
public
static
ExtensionList
<
DescriptorVisibilityFilter
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
DescriptorVisibilityFilter
.
class
);
return
ExtensionList
.
lookup
(
DescriptorVisibilityFilter
.
class
);
}
public
static
<
T
extends
Descriptor
>
List
<
T
>
apply
(
Object
context
,
Iterable
<
T
>
source
)
{
...
...
core/src/main/java/hudson/model/DownloadService.java
浏览文件 @
4a98beaf
...
...
@@ -324,7 +324,7 @@ public class DownloadService extends PageDecorator {
* Returns all the registered {@link Downloadable}s.
*/
public
static
ExtensionList
<
Downloadable
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
Downloadable
.
class
);
return
ExtensionList
.
lookup
(
Downloadable
.
class
);
}
/**
...
...
core/src/main/java/hudson/model/EnvironmentContributor.java
浏览文件 @
4a98beaf
...
...
@@ -115,7 +115,7 @@ public abstract class EnvironmentContributor implements ExtensionPoint {
* Returns all the registered {@link EnvironmentContributor}s.
*/
public
static
ExtensionList
<
EnvironmentContributor
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
EnvironmentContributor
.
class
);
return
ExtensionList
.
lookup
(
EnvironmentContributor
.
class
);
}
/**
...
...
core/src/main/java/hudson/model/FingerprintCleanupThread.java
浏览文件 @
4a98beaf
...
...
@@ -24,6 +24,7 @@
package
hudson.model
;
import
hudson.Extension
;
import
hudson.ExtensionList
;
import
jenkins.model.Jenkins
;
import
java.io.File
;
...
...
@@ -57,7 +58,7 @@ public final class FingerprintCleanupThread extends AsyncPeriodicWork {
}
private
static
FingerprintCleanupThread
getInstance
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
AsyncPeriodicWork
.
class
).
get
(
FingerprintCleanupThread
.
class
);
return
ExtensionList
.
lookup
(
AsyncPeriodicWork
.
class
).
get
(
FingerprintCleanupThread
.
class
);
}
public
void
execute
(
TaskListener
listener
)
{
...
...
core/src/main/java/hudson/model/LabelFinder.java
浏览文件 @
4a98beaf
...
...
@@ -47,7 +47,7 @@ public abstract class LabelFinder implements ExtensionPoint {
* Returns all the registered {@link LabelFinder}s.
*/
public
static
ExtensionList
<
LabelFinder
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
LabelFinder
.
class
);
return
ExtensionList
.
lookup
(
LabelFinder
.
class
);
}
/**
...
...
core/src/main/java/hudson/model/ManagementLink.java
浏览文件 @
4a98beaf
...
...
@@ -103,7 +103,7 @@ public abstract class ManagementLink implements ExtensionPoint, Action {
* All regsitered instances.
*/
public
static
ExtensionList
<
ManagementLink
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
ManagementLink
.
class
);
return
ExtensionList
.
lookup
(
ManagementLink
.
class
);
}
/**
...
...
core/src/main/java/hudson/model/PeriodicWork.java
浏览文件 @
4a98beaf
...
...
@@ -93,7 +93,7 @@ public abstract class PeriodicWork extends SafeTimerTask implements ExtensionPoi
* Returns all the registered {@link PeriodicWork}s.
*/
public
static
ExtensionList
<
PeriodicWork
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
PeriodicWork
.
class
);
return
ExtensionList
.
lookup
(
PeriodicWork
.
class
);
}
@Initializer
(
after
=
JOB_LOADED
)
...
...
core/src/main/java/hudson/model/Queue.java
浏览文件 @
4a98beaf
...
...
@@ -1600,7 +1600,7 @@ public class Queue extends ResourceController implements Saveable {
* All registered {@link QueueDecisionHandler}s
*/
public
static
ExtensionList
<
QueueDecisionHandler
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
QueueDecisionHandler
.
class
);
return
ExtensionList
.
lookup
(
QueueDecisionHandler
.
class
);
}
}
...
...
core/src/main/java/hudson/model/RestartListener.java
浏览文件 @
4a98beaf
...
...
@@ -30,7 +30,7 @@ public abstract class RestartListener implements ExtensionPoint {
* Returns all the registered {@link LabelFinder}s.
*/
public
static
ExtensionList
<
RestartListener
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
RestartListener
.
class
);
return
ExtensionList
.
lookup
(
RestartListener
.
class
);
}
/**
...
...
core/src/main/java/hudson/model/Run.java
浏览文件 @
4a98beaf
...
...
@@ -2015,13 +2015,10 @@ public abstract class Run <JobT extends Job<JobT,RunT>,RunT extends Run<JobT,Run
ResultTrend
trend
=
ResultTrend
.
getResultTrend
(
this
);
Jenkins
j
=
Jenkins
.
getInstance
();
if
(
j
!=
null
)
{
for
(
StatusSummarizer
summarizer
:
j
.
getExtensionList
(
StatusSummarizer
.
class
))
{
Summary
summary
=
summarizer
.
summarize
(
this
,
trend
);
if
(
summary
!=
null
)
{
return
summary
;
}
for
(
StatusSummarizer
summarizer
:
ExtensionList
.
lookup
(
StatusSummarizer
.
class
))
{
Summary
summary
=
summarizer
.
summarize
(
this
,
trend
);
if
(
summary
!=
null
)
{
return
summary
;
}
}
...
...
core/src/main/java/hudson/model/TransientBuildActionFactory.java
浏览文件 @
4a98beaf
...
...
@@ -45,6 +45,6 @@ public abstract class TransientBuildActionFactory implements ExtensionPoint {
* Returns all the registered {@link TransientBuildActionFactory}s.
*/
public
static
ExtensionList
<
TransientBuildActionFactory
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
TransientBuildActionFactory
.
class
);
return
ExtensionList
.
lookup
(
TransientBuildActionFactory
.
class
);
}
}
\ No newline at end of file
core/src/main/java/hudson/model/TransientComputerActionFactory.java
浏览文件 @
4a98beaf
...
...
@@ -57,7 +57,7 @@ public abstract class TransientComputerActionFactory implements ExtensionPoint {
* Returns all the registered {@link TransientComputerActionFactory}s.
*/
public
static
ExtensionList
<
TransientComputerActionFactory
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
TransientComputerActionFactory
.
class
);
return
ExtensionList
.
lookup
(
TransientComputerActionFactory
.
class
);
}
...
...
core/src/main/java/hudson/model/TransientProjectActionFactory.java
浏览文件 @
4a98beaf
...
...
@@ -68,6 +68,6 @@ public abstract class TransientProjectActionFactory implements ExtensionPoint {
* Returns all the registered {@link TransientProjectActionFactory}s.
*/
public
static
ExtensionList
<
TransientProjectActionFactory
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
TransientProjectActionFactory
.
class
);
return
ExtensionList
.
lookup
(
TransientProjectActionFactory
.
class
);
}
}
core/src/main/java/hudson/model/TransientUserActionFactory.java
浏览文件 @
4a98beaf
...
...
@@ -55,6 +55,6 @@ public abstract class TransientUserActionFactory implements ExtensionPoint {
* Returns all the registered {@link TransientUserActionFactory}s.
*/
public
static
ExtensionList
<
TransientUserActionFactory
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
TransientUserActionFactory
.
class
);
return
ExtensionList
.
lookup
(
TransientUserActionFactory
.
class
);
}
}
\ No newline at end of file
core/src/main/java/hudson/model/TransientViewActionFactory.java
浏览文件 @
4a98beaf
...
...
@@ -25,7 +25,7 @@ public abstract class TransientViewActionFactory implements ExtensionPoint {
* Returns all the registered {@link TransientViewActionFactory}s.
*/
public
static
ExtensionList
<
TransientViewActionFactory
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
TransientViewActionFactory
.
class
);
return
ExtensionList
.
lookup
(
TransientViewActionFactory
.
class
);
}
/**
...
...
core/src/main/java/hudson/model/User.java
浏览文件 @
4a98beaf
...
...
@@ -350,7 +350,7 @@ public class User extends AbstractModelObject implements AccessControlled, Descr
return
null
;
// sort resolvers by priority
List
<
CanonicalIdResolver
>
resolvers
=
new
ArrayList
<
CanonicalIdResolver
>(
Jenkins
.
getInstance
().
getExtensionList
(
CanonicalIdResolver
.
class
));
List
<
CanonicalIdResolver
>
resolvers
=
new
ArrayList
<
CanonicalIdResolver
>(
ExtensionList
.
lookup
(
CanonicalIdResolver
.
class
));
Collections
.
sort
(
resolvers
);
String
id
=
null
;
...
...
core/src/main/java/hudson/model/WorkspaceCleanupThread.java
浏览文件 @
4a98beaf
...
...
@@ -24,6 +24,7 @@
package
hudson.model
;
import
hudson.Extension
;
import
hudson.ExtensionList
;
import
hudson.FilePath
;
import
hudson.Util
;
import
java.io.IOException
;
...
...
@@ -52,7 +53,7 @@ public class WorkspaceCleanupThread extends AsyncPeriodicWork {
}
public
static
void
invoke
()
{
Jenkins
.
getInstance
().
getExtensionList
(
AsyncPeriodicWork
.
class
).
get
(
WorkspaceCleanupThread
.
class
).
run
();
ExtensionList
.
lookup
(
AsyncPeriodicWork
.
class
).
get
(
WorkspaceCleanupThread
.
class
).
run
();
}
@Override
protected
void
execute
(
TaskListener
listener
)
throws
InterruptedException
,
IOException
{
...
...
core/src/main/java/hudson/model/WorkspaceListener.java
浏览文件 @
4a98beaf
...
...
@@ -29,7 +29,7 @@ public abstract class WorkspaceListener implements ExtensionPoint {
* All registered {@link WorkspaceListener}s.
*/
public
static
ExtensionList
<
WorkspaceListener
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
WorkspaceListener
.
class
);
return
ExtensionList
.
lookup
(
WorkspaceListener
.
class
);
}
}
core/src/main/java/hudson/model/listeners/ItemListener.java
浏览文件 @
4a98beaf
...
...
@@ -148,7 +148,7 @@ public class ItemListener implements ExtensionPoint {
* All the registered {@link ItemListener}s.
*/
public
static
ExtensionList
<
ItemListener
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
ItemListener
.
class
);
return
ExtensionList
.
lookup
(
ItemListener
.
class
);
}
public
static
void
fireOnCopied
(
Item
src
,
Item
result
)
{
...
...
core/src/main/java/hudson/model/listeners/RunListener.java
浏览文件 @
4a98beaf
...
...
@@ -252,7 +252,7 @@ public abstract class RunListener<R extends Run> implements ExtensionPoint {
* Returns all the registered {@link RunListener}s.
*/
public
static
ExtensionList
<
RunListener
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
RunListener
.
class
);
return
ExtensionList
.
lookup
(
RunListener
.
class
);
}
private
static
void
report
(
Throwable
e
)
{
...
...
core/src/main/java/hudson/model/listeners/SCMPollListener.java
浏览文件 @
4a98beaf
...
...
@@ -102,6 +102,6 @@ public abstract class SCMPollListener implements ExtensionPoint {
* Returns all the registered {@link SCMPollListener}s.
*/
public
static
ExtensionList
<
SCMPollListener
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
SCMPollListener
.
class
);
return
ExtensionList
.
lookup
(
SCMPollListener
.
class
);
}
}
core/src/main/java/hudson/model/queue/LoadPredictor.java
浏览文件 @
4a98beaf
...
...
@@ -81,7 +81,7 @@ public abstract class LoadPredictor implements ExtensionPoint {
* All the registered instances.
*/
public
static
ExtensionList
<
LoadPredictor
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
LoadPredictor
.
class
);
return
ExtensionList
.
lookup
(
LoadPredictor
.
class
);
}
/**
...
...
core/src/main/java/hudson/model/queue/QueueListener.java
浏览文件 @
4a98beaf
...
...
@@ -80,6 +80,6 @@ public abstract class QueueListener implements ExtensionPoint {
* Returns all the registered {@link QueueListener}s.
*/
public
static
ExtensionList
<
QueueListener
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
QueueListener
.
class
);
return
ExtensionList
.
lookup
(
QueueListener
.
class
);
}
}
core/src/main/java/hudson/model/queue/QueueSorter.java
浏览文件 @
4a98beaf
...
...
@@ -33,7 +33,7 @@ public abstract class QueueSorter implements ExtensionPoint {
* unless explicitly overridden by {@link Queue#setSorter(QueueSorter)}.
*/
public
static
ExtensionList
<
QueueSorter
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
QueueSorter
.
class
);
return
ExtensionList
.
lookup
(
QueueSorter
.
class
);
}
/**
...
...
core/src/main/java/hudson/model/queue/QueueTaskDispatcher.java
浏览文件 @
4a98beaf
...
...
@@ -137,6 +137,6 @@ public abstract class QueueTaskDispatcher implements ExtensionPoint {
* All registered {@link QueueTaskDispatcher}s.
*/
public
static
ExtensionList
<
QueueTaskDispatcher
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
QueueTaskDispatcher
.
class
);
return
ExtensionList
.
lookup
(
QueueTaskDispatcher
.
class
);
}
}
\ No newline at end of file
core/src/main/java/hudson/model/queue/SubTaskContributor.java
浏览文件 @
4a98beaf
...
...
@@ -50,6 +50,6 @@ public abstract class SubTaskContributor implements ExtensionPoint {
* All registered {@link SubTaskContributor} instances.
*/
public
static
ExtensionList
<
SubTaskContributor
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
SubTaskContributor
.
class
);
return
ExtensionList
.
lookup
(
SubTaskContributor
.
class
);
}
}
core/src/main/java/hudson/scm/ChangeLogAnnotator.java
浏览文件 @
4a98beaf
...
...
@@ -121,6 +121,6 @@ public abstract class ChangeLogAnnotator implements ExtensionPoint {
* Returns all the registered {@link ChangeLogAnnotator} descriptors.
*/
public
static
ExtensionList
<
ChangeLogAnnotator
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
ChangeLogAnnotator
.
class
);
return
ExtensionList
.
lookup
(
ChangeLogAnnotator
.
class
);
}
}
core/src/main/java/hudson/search/SearchFactory.java
浏览文件 @
4a98beaf
...
...
@@ -40,6 +40,6 @@ public abstract class SearchFactory implements ExtensionPoint {
* Returns all the registered {@link SearchFactory} instances.
*/
public
static
ExtensionList
<
SearchFactory
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
SearchFactory
.
class
);
return
ExtensionList
.
lookup
(
SearchFactory
.
class
);
}
}
core/src/main/java/hudson/security/FederatedLoginService.java
浏览文件 @
4a98beaf
...
...
@@ -253,6 +253,6 @@ public abstract class FederatedLoginService implements ExtensionPoint {
}
public
static
ExtensionList
<
FederatedLoginService
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
FederatedLoginService
.
class
);
return
ExtensionList
.
lookup
(
FederatedLoginService
.
class
);
}
}
core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java
浏览文件 @
4a98beaf
...
...
@@ -25,6 +25,7 @@ package hudson.security;
import
com.thoughtworks.xstream.converters.UnmarshallingContext
;
import
hudson.Extension
;
import
hudson.ExtensionList
;
import
hudson.Util
;
import
hudson.diagnosis.OldDataMonitor
;
import
hudson.model.Descriptor
;
...
...
@@ -287,7 +288,7 @@ public class HudsonPrivateSecurityRealm extends AbstractPasswordBasedSecurityRea
*/
private
void
tryToMakeAdmin
(
User
u
)
{
AuthorizationStrategy
as
=
Jenkins
.
getInstance
().
getAuthorizationStrategy
();
for
(
PermissionAdder
adder
:
Jenkins
.
getInstance
().
getExtensionList
(
PermissionAdder
.
class
))
{
for
(
PermissionAdder
adder
:
ExtensionList
.
lookup
(
PermissionAdder
.
class
))
{
if
(
adder
.
add
(
as
,
u
,
Jenkins
.
ADMINISTER
))
{
return
;
}
...
...
core/src/main/java/hudson/security/csrf/CrumbExclusion.java
浏览文件 @
4a98beaf
...
...
@@ -32,6 +32,6 @@ public abstract class CrumbExclusion implements ExtensionPoint {
public
abstract
boolean
process
(
HttpServletRequest
request
,
HttpServletResponse
response
,
FilterChain
chain
)
throws
IOException
,
ServletException
;
public
static
ExtensionList
<
CrumbExclusion
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
CrumbExclusion
.
class
);
return
ExtensionList
.
lookup
(
CrumbExclusion
.
class
);
}
}
core/src/main/java/hudson/slaves/CloudProvisioningListener.java
浏览文件 @
4a98beaf
...
...
@@ -76,7 +76,7 @@ public abstract class CloudProvisioningListener implements ExtensionPoint {
* All the registered {@link CloudProvisioningListener}s.
*/
public
static
ExtensionList
<
CloudProvisioningListener
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
CloudProvisioningListener
.
class
);
return
ExtensionList
.
lookup
(
CloudProvisioningListener
.
class
);
}
}
core/src/main/java/hudson/slaves/ComputerListener.java
浏览文件 @
4a98beaf
...
...
@@ -229,6 +229,6 @@ public abstract class ComputerListener implements ExtensionPoint {
* All the registered {@link ComputerListener}s.
*/
public
static
ExtensionList
<
ComputerListener
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
ComputerListener
.
class
);
return
ExtensionList
.
lookup
(
ComputerListener
.
class
);
}
}
core/src/main/java/hudson/tasks/UserAvatarResolver.java
浏览文件 @
4a98beaf
...
...
@@ -114,7 +114,7 @@ public abstract class UserAvatarResolver implements ExtensionPoint {
* Returns all the registered {@link UserAvatarResolver} descriptors.
*/
public
static
ExtensionList
<
UserAvatarResolver
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
UserAvatarResolver
.
class
);
return
ExtensionList
.
lookup
(
UserAvatarResolver
.
class
);
}
private
static
final
Logger
LOGGER
=
Logger
.
getLogger
(
UserAvatarResolver
.
class
.
getName
());
...
...
core/src/main/java/hudson/tasks/UserNameResolver.java
浏览文件 @
4a98beaf
...
...
@@ -83,7 +83,7 @@ public abstract class UserNameResolver implements ExtensionPoint {
* Returns all the registered {@link UserNameResolver} descriptors.
*/
public
static
ExtensionList
<
UserNameResolver
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
UserNameResolver
.
class
);
return
ExtensionList
.
lookup
(
UserNameResolver
.
class
);
}
/**
...
...
core/src/main/java/hudson/tasks/junit/TestNameTransformer.java
浏览文件 @
4a98beaf
...
...
@@ -37,6 +37,6 @@ public abstract class TestNameTransformer implements ExtensionPoint {
}
public
static
ExtensionList
<
TestNameTransformer
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
TestNameTransformer
.
class
);
return
ExtensionList
.
lookup
(
TestNameTransformer
.
class
);
}
}
core/src/main/java/hudson/tasks/test/TestResultParser.java
浏览文件 @
4a98beaf
...
...
@@ -74,7 +74,7 @@ public abstract class TestResultParser implements ExtensionPoint {
* All registered {@link TestResultParser}s
*/
public
static
ExtensionList
<
TestResultParser
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
TestResultParser
.
class
);
return
ExtensionList
.
lookup
(
TestResultParser
.
class
);
}
/**
...
...
core/src/main/java/hudson/tools/ToolLocationTranslator.java
浏览文件 @
4a98beaf
...
...
@@ -70,6 +70,6 @@ public abstract class ToolLocationTranslator implements ExtensionPoint {
* Returns all the registered {@link ToolLocationTranslator}s.
*/
public
static
ExtensionList
<
ToolLocationTranslator
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
ToolLocationTranslator
.
class
);
return
ExtensionList
.
lookup
(
ToolLocationTranslator
.
class
);
}
}
core/src/main/java/hudson/util/AlternativeUiTextProvider.java
浏览文件 @
4a98beaf
...
...
@@ -70,7 +70,7 @@ public abstract class AlternativeUiTextProvider implements ExtensionPoint {
* All the registered extension point instances.
*/
public
static
ExtensionList
<
AlternativeUiTextProvider
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
AlternativeUiTextProvider
.
class
);
return
ExtensionList
.
lookup
(
AlternativeUiTextProvider
.
class
);
}
public
static
<
T
>
String
get
(
Message
<
T
>
text
,
T
context
,
String
defaultValue
)
{
...
...
core/src/main/java/hudson/util/ProcessKiller.java
浏览文件 @
4a98beaf
...
...
@@ -62,7 +62,7 @@ public abstract class ProcessKiller implements ExtensionPoint, Serializable {
* Returns all the registered {@link ProcessKiller} descriptors.
*/
public
static
ExtensionList
<
ProcessKiller
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
ProcessKiller
.
class
);
return
ExtensionList
.
lookup
(
ProcessKiller
.
class
);
}
/**
...
...
core/src/main/java/hudson/util/io/ParserConfigurator.java
浏览文件 @
4a98beaf
...
...
@@ -69,7 +69,7 @@ public abstract class ParserConfigurator implements ExtensionPoint, Serializable
* Returns all the registered {@link ParserConfigurator}s.
*/
public
static
ExtensionList
<
ParserConfigurator
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
ParserConfigurator
.
class
);
return
ExtensionList
.
lookup
(
ParserConfigurator
.
class
);
}
public
static
void
applyConfiguration
(
SAXReader
reader
,
Object
context
)
throws
IOException
,
InterruptedException
{
...
...
core/src/main/java/jenkins/AgentProtocol.java
浏览文件 @
4a98beaf
...
...
@@ -43,7 +43,7 @@ public abstract class AgentProtocol implements ExtensionPoint {
* Returns all the registered {@link AperiodicWork}s.
*/
public
static
ExtensionList
<
AgentProtocol
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
AgentProtocol
.
class
);
return
ExtensionList
.
lookup
(
AgentProtocol
.
class
);
}
public
static
AgentProtocol
of
(
String
protocolName
)
{
...
...
core/src/main/java/jenkins/ExtensionFilter.java
浏览文件 @
4a98beaf
...
...
@@ -86,6 +86,6 @@ public abstract class ExtensionFilter implements ExtensionPoint {
* All registered {@link ExtensionFilter} instances.
*/
public
static
ExtensionList
<
ExtensionFilter
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
ExtensionFilter
.
class
);
return
ExtensionList
.
lookup
(
ExtensionFilter
.
class
);
}
}
core/src/main/java/jenkins/model/GlobalConfigurationCategory.java
浏览文件 @
4a98beaf
...
...
@@ -37,7 +37,7 @@ public abstract class GlobalConfigurationCategory implements ExtensionPoint, Mod
* Returns all the registered {@link GlobalConfiguration} descriptors.
*/
public
static
ExtensionList
<
GlobalConfigurationCategory
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
GlobalConfigurationCategory
.
class
);
return
ExtensionList
.
lookup
(
GlobalConfigurationCategory
.
class
);
}
public
static
<
T
extends
GlobalConfigurationCategory
>
T
get
(
Class
<
T
>
type
)
{
...
...
core/src/main/java/jenkins/model/TransientFingerprintFacetFactory.java
浏览文件 @
4a98beaf
...
...
@@ -48,6 +48,6 @@ public abstract class TransientFingerprintFacetFactory implements ExtensionPoint
* Returns all the registered {@link TransientFingerprintFacetFactory}s.
*/
public
static
ExtensionList
<
TransientFingerprintFacetFactory
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
TransientFingerprintFacetFactory
.
class
);
return
ExtensionList
.
lookup
(
TransientFingerprintFacetFactory
.
class
);
}
}
core/src/main/java/jenkins/model/Uptime.java
浏览文件 @
4a98beaf
package
jenkins.model
;
import
hudson.Extension
;
import
hudson.ExtensionList
;
import
hudson.init.InitMilestone
;
import
hudson.init.Initializer
;
...
...
@@ -27,6 +28,6 @@ public class Uptime {
@Initializer
(
after
=
InitMilestone
.
JOB_LOADED
)
public
static
void
init
()
{
Jenkins
.
getInstance
().
getExtensionList
(
Uptime
.
class
).
get
(
0
).
startTime
=
System
.
currentTimeMillis
();
ExtensionList
.
lookup
(
Uptime
.
class
).
get
(
0
).
startTime
=
System
.
currentTimeMillis
();
}
}
core/src/main/java/jenkins/model/lazy/BuildReference.java
浏览文件 @
4a98beaf
package
jenkins.model.lazy
;
import
hudson.Extension
;
import
hudson.ExtensionList
;
import
hudson.ExtensionPoint
;
import
hudson.model.Run
;
import
java.lang.ref.Reference
;
...
...
@@ -10,7 +11,6 @@ import java.util.logging.Level;
import
java.util.logging.Logger
;
import
javax.annotation.CheckForNull
;
import
javax.annotation.Nonnull
;
import
jenkins.model.Jenkins
;
import
jenkins.model.lazy.LazyBuildMixIn.RunMixIn
;
import
org.kohsuke.accmod.Restricted
;
import
org.kohsuke.accmod.restrictions.NoExternalUse
;
...
...
@@ -111,14 +111,11 @@ public final class BuildReference<R> {
// AbstractBuild.NONE
return
new
DefaultHolderFactory
.
NoHolder
<
R
>();
}
Jenkins
j
=
Jenkins
.
getInstance
();
if
(
j
!=
null
)
{
for
(
HolderFactory
f
:
j
.
getExtensionList
(
HolderFactory
.
class
))
{
Holder
<
R
>
h
=
f
.
make
(
referent
);
if
(
h
!=
null
)
{
LOGGER
.
log
(
Level
.
FINE
,
"created build reference for {0} using {1}"
,
new
Object
[]
{
referent
,
f
});
return
h
;
}
for
(
HolderFactory
f
:
ExtensionList
.
lookup
(
HolderFactory
.
class
))
{
Holder
<
R
>
h
=
f
.
make
(
referent
);
if
(
h
!=
null
)
{
LOGGER
.
log
(
Level
.
FINE
,
"created build reference for {0} using {1}"
,
new
Object
[]
{
referent
,
f
});
return
h
;
}
}
return
new
DefaultHolderFactory
().
make
(
referent
);
...
...
core/src/main/java/jenkins/security/BasicHeaderAuthenticator.java
浏览文件 @
4a98beaf
...
...
@@ -39,6 +39,6 @@ public abstract class BasicHeaderAuthenticator implements ExtensionPoint {
public
abstract
Authentication
authenticate
(
HttpServletRequest
req
,
HttpServletResponse
rsp
,
String
username
,
String
password
)
throws
IOException
,
ServletException
;
public
static
ExtensionList
<
BasicHeaderAuthenticator
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
BasicHeaderAuthenticator
.
class
);
return
ExtensionList
.
lookup
(
BasicHeaderAuthenticator
.
class
);
}
}
core/src/main/java/jenkins/security/SecurityListener.java
浏览文件 @
4a98beaf
...
...
@@ -24,6 +24,7 @@
package
jenkins.security
;
import
hudson.ExtensionList
;
import
hudson.ExtensionPoint
;
import
hudson.security.AbstractPasswordBasedSecurityRealm
;
import
hudson.security.SecurityRealm
;
...
...
@@ -134,7 +135,7 @@ public abstract class SecurityListener implements ExtensionPoint {
}
private
static
List
<
SecurityListener
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
SecurityListener
.
class
);
return
ExtensionList
.
lookup
(
SecurityListener
.
class
);
}
}
core/src/main/java/jenkins/slaves/JnlpAgentReceiver.java
浏览文件 @
4a98beaf
...
...
@@ -59,6 +59,6 @@ public abstract class JnlpAgentReceiver implements ExtensionPoint {
public
abstract
boolean
handle
(
String
name
,
JnlpSlaveHandshake
handshake
)
throws
IOException
,
InterruptedException
;
public
static
ExtensionList
<
JnlpAgentReceiver
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
JnlpAgentReceiver
.
class
);
return
ExtensionList
.
lookup
(
JnlpAgentReceiver
.
class
);
}
}
core/src/main/java/jenkins/slaves/WorkspaceLocator.java
浏览文件 @
4a98beaf
...
...
@@ -33,6 +33,6 @@ public abstract class WorkspaceLocator implements ExtensionPoint {
* All registered {@link WorkspaceLocator}s.
*/
public
static
ExtensionList
<
WorkspaceLocator
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
WorkspaceLocator
.
class
);
return
ExtensionList
.
lookup
(
WorkspaceLocator
.
class
);
}
}
core/src/main/java/jenkins/slaves/restarter/SlaveRestarter.java
浏览文件 @
4a98beaf
...
...
@@ -40,7 +40,7 @@ public abstract class SlaveRestarter implements ExtensionPoint, Serializable {
public
abstract
void
restart
()
throws
Exception
;
public
static
ExtensionList
<
SlaveRestarter
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
SlaveRestarter
.
class
);
return
ExtensionList
.
lookup
(
SlaveRestarter
.
class
);
}
private
static
final
Logger
LOGGER
=
Logger
.
getLogger
(
SlaveRestarter
.
class
.
getName
());
...
...
core/src/main/java/jenkins/slaves/systemInfo/SlaveSystemInfo.java
浏览文件 @
4a98beaf
...
...
@@ -23,6 +23,6 @@ public abstract class SlaveSystemInfo implements ExtensionPoint {
public
abstract
String
getDisplayName
();
public
static
ExtensionList
<
SlaveSystemInfo
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
SlaveSystemInfo
.
class
);
return
ExtensionList
.
lookup
(
SlaveSystemInfo
.
class
);
}
}
core/src/main/resources/META-INF/upgrade/ExtensionList.hint
0 → 100644
浏览文件 @
4a98beaf
jenkins.model.Jenkins.getInstance().getExtensionList($c) :: $c instanceof java.lang.Class => hudson.ExtensionList.lookup($c);;
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录