Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
LinuxSuRen
jenkins
提交
d1c21484
J
jenkins
项目概览
LinuxSuRen
/
jenkins
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
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,发现更多精彩内容 >>
提交
d1c21484
编写于
2月 25, 2017
作者:
D
Daniel Beck
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[JENKINS-41864] More Javadoc, rephrase warning message
上级
6e5225c0
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
31 addition
and
3 deletion
+31
-3
core/src/main/java/hudson/scheduler/CronTab.java
core/src/main/java/hudson/scheduler/CronTab.java
+8
-2
core/src/main/java/hudson/scheduler/RareOrImpossibleDateException.java
.../java/hudson/scheduler/RareOrImpossibleDateException.java
+22
-0
core/src/main/resources/hudson/triggers/Messages.properties
core/src/main/resources/hudson/triggers/Messages.properties
+1
-1
未找到文件。
core/src/main/java/hudson/scheduler/CronTab.java
浏览文件 @
d1c21484
...
...
@@ -326,6 +326,9 @@ public final class CronTab {
* See {@link #ceil(long)}.
*
* This method modifies the given calendar and returns the same object.
*
* @throws RareOrImpossibleDateException if the date isn't hit in the 2 years after it indicates an impossible
* (e.g. Jun 31) date, or at least a date too rare to be useful. This addresses JENKINS-41864 and was added in TODO
*/
public
Calendar
ceil
(
Calendar
cal
)
{
Calendar
twoYearsFuture
=
(
Calendar
)
cal
.
clone
();
...
...
@@ -333,7 +336,7 @@ public final class CronTab {
OUTER:
while
(
true
)
{
if
(
cal
.
compareTo
(
twoYearsFuture
)
>
0
)
{
// we went
at least two years
into the future
// we went
too far
into the future
throw
new
RareOrImpossibleDateException
();
}
for
(
CalendarField
f
:
CalendarField
.
ADJUST_ORDER
)
{
...
...
@@ -384,6 +387,9 @@ public final class CronTab {
* See {@link #floor(long)}
*
* This method modifies the given calendar and returns the same object.
*
* @throws RareOrImpossibleDateException if the date isn't hit in the 2 years before it indicates an impossible
* (e.g. Jun 31) date, or at least a date too rare to be useful. This addresses JENKINS-41864 and was added in TODO
*/
public
Calendar
floor
(
Calendar
cal
)
{
Calendar
twoYearsAgo
=
(
Calendar
)
cal
.
clone
();
...
...
@@ -392,7 +398,7 @@ public final class CronTab {
OUTER:
while
(
true
)
{
if
(
cal
.
compareTo
(
twoYearsAgo
)
<
0
)
{
// we went
at least two years
into the past
// we went
too far
into the past
throw
new
RareOrImpossibleDateException
();
}
for
(
CalendarField
f
:
CalendarField
.
ADJUST_ORDER
)
{
...
...
core/src/main/java/hudson/scheduler/RareOrImpossibleDateException.java
浏览文件 @
d1c21484
...
...
@@ -26,6 +26,28 @@ package hudson.scheduler;
import
org.kohsuke.accmod.Restricted
;
import
org.kohsuke.accmod.restrictions.NoExternalUse
;
import
java.util.Calendar
;
/**
* This exception is thrown when trying to determine the previous or next occurrence of a given date determines
* that it's not happened, or going to happen, within some time period (e.g. within the next year).
*
* <p>This can typically have a few different reasons:</p>
*
* <ul>
* <li>The date is impossible. For example, June 31 does never happen, so <tt>0 0 31 6 *</tt> will never happen</li>
* <li>The date happens only rarely
* <ul>
* <li>February 29 being the obvious one</li>
* <li>Cron tab patterns specifying all of month, day of month, and day of week can also occur so rarely to trigger this exception</li>
* </ul>
* </li>
* </ul>
*
* @see CronTab#floor(Calendar)
* @see CronTab#ceil(Calendar)
* @since TODO
*/
@Restricted
(
NoExternalUse
.
class
)
public
class
RareOrImpossibleDateException
extends
RuntimeException
{
}
core/src/main/resources/hudson/triggers/Messages.properties
浏览文件 @
d1c21484
...
...
@@ -29,7 +29,7 @@ TimerTrigger.MissingWhitespace=You appear to be missing whitespace between * and
TimerTrigger.no_schedules_so_will_never_run
=
No schedules so will never run
TimerTrigger.TimerTriggerCause.ShortDescription
=
Started by timer
TimerTrigger.would_last_have_run_at_would_next_run_at
=
Would last have run at {0}; would next run at {1}.
TimerTrigger.the_specified_cron_tab_is_rare_or_impossible
=
This
cron tab
will match dates only rarely (e.g. February 29) or
\
TimerTrigger.the_specified_cron_tab_is_rare_or_impossible
=
This
schedule
will match dates only rarely (e.g. February 29) or
\
never (e.g. June 31), so this job may be triggered very rarely, if at all.
Trigger.init
=
Initializing timer for triggers
SCMTrigger.AdministrativeMonitorImpl.DisplayName
=
Too Many SCM Polling Threads
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录