Skip to content

Commit e9db785

Browse files
committed
Polishing
1 parent aa576e7 commit e9db785

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

spring-context/src/main/java/org/springframework/scheduling/support/CronTrigger.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 the original author or authors.
2+
* Copyright 2002-2013 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -16,12 +16,12 @@
1616

1717
package org.springframework.scheduling.support;
1818

19-
import java.util.Date;
20-
import java.util.TimeZone;
21-
2219
import org.springframework.scheduling.Trigger;
2320
import org.springframework.scheduling.TriggerContext;
2421

22+
import java.util.Date;
23+
import java.util.TimeZone;
24+
2525
/**
2626
* {@link Trigger} implementation for cron expressions.
2727
* Wraps a {@link CronSequenceGenerator}.
@@ -41,7 +41,7 @@ public class CronTrigger implements Trigger {
4141
* following cron expression conventions
4242
*/
4343
public CronTrigger(String cronExpression) {
44-
this(cronExpression, TimeZone.getDefault());
44+
this.sequenceGenerator = new CronSequenceGenerator(cronExpression);
4545
}
4646

4747
/**
@@ -89,7 +89,7 @@ public int hashCode() {
8989

9090
@Override
9191
public String toString() {
92-
return sequenceGenerator.toString();
92+
return this.sequenceGenerator.toString();
9393
}
9494

9595
}

spring-core/src/main/java/org/springframework/core/GenericTypeResolver.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,8 +369,7 @@ static Type getRawType(Type genericType, Map<TypeVariable, Type> typeVariableMap
369369
* all super types, enclosing types and interfaces.
370370
*/
371371
public static Map<TypeVariable, Type> getTypeVariableMap(Class clazz) {
372-
Map<TypeVariable, Type> ref = typeVariableCache.get(clazz);
373-
Map<TypeVariable, Type> typeVariableMap = (ref != null ? ref : null);
372+
Map<TypeVariable, Type> typeVariableMap = typeVariableCache.get(clazz);
374373

375374
if (typeVariableMap == null) {
376375
typeVariableMap = new HashMap<TypeVariable, Type>();

0 commit comments

Comments
 (0)