Skip to content

Commit

Permalink
clean-up warnings in javadoc and code (many changes are enabled by no…
Browse files Browse the repository at this point in the history
… longer supporting java 1.5)
  • Loading branch information
jhouse committed May 9, 2013
1 parent 20cb083 commit a6aa5b8
Show file tree
Hide file tree
Showing 24 changed files with 92 additions and 211 deletions.
1 change: 0 additions & 1 deletion quartz-core/src/main/java/org/quartz/Scheduler.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@
* @see JobBuilder
* @see Trigger
* @see TriggerBuilder
* @see
* @see JobListener
* @see TriggerListener
* @see SchedulerListener
Expand Down
12 changes: 0 additions & 12 deletions quartz-core/src/main/java/org/quartz/SchedulerMetaData.java
Original file line number Diff line number Diff line change
Expand Up @@ -203,18 +203,6 @@ public boolean isShutdown() {
public Class<?> getJobStoreClass() {
return jsClass;
}

/**
* <p>
* Returns whether or not the <code>Scheduler</code>'s<code>JobStore</code>
* instance supports persistence.
* </p>
* @deprecated s
* @see #isJobStoreSupportsPersistence()
*/
public boolean jobStoreSupportsPersistence() {
return isJobStoreSupportsPersistence();
}

/**
* <p>
Expand Down
4 changes: 2 additions & 2 deletions quartz-core/src/main/java/org/quartz/Trigger.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public interface Trigger extends Serializable, Cloneable, Comparable<Trigger> {

public static final long serialVersionUID = -3904243490805975570L;

public enum TriggerState { NONE, NORMAL, PAUSED, COMPLETE, ERROR, BLOCKED };
public enum TriggerState { NONE, NORMAL, PAUSED, COMPLETE, ERROR, BLOCKED }

/**
* <p><code>NOOP</code> Instructs the <code>{@link Scheduler}</code> that the
Expand Down Expand Up @@ -88,7 +88,7 @@ public enum TriggerState { NONE, NORMAL, PAUSED, COMPLETE, ERROR, BLOCKED };
* the <code>Trigger</code> should be put in the <code>ERROR</code> state.</p>
*/
public enum CompletedExecutionInstruction { NOOP, RE_EXECUTE_JOB, SET_TRIGGER_COMPLETE, DELETE_TRIGGER,
SET_ALL_JOB_TRIGGERS_COMPLETE, SET_TRIGGER_ERROR, SET_ALL_JOB_TRIGGERS_ERROR };
SET_ALL_JOB_TRIGGERS_COMPLETE, SET_TRIGGER_ERROR, SET_ALL_JOB_TRIGGERS_ERROR }

/**
* Instructs the <code>{@link Scheduler}</code> that upon a mis-fire
Expand Down
6 changes: 0 additions & 6 deletions quartz-core/src/main/java/org/quartz/core/JobRunShell.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,9 @@ public class JobRunShell extends SchedulerListenerSupport implements Runnable {
* Create a JobRunShell instance with the given settings.
* </p>
*
* @param jobRunShellFactory
* A handle to the <code>JobRunShellFactory</code> that produced
* this <code>JobRunShell</code>.
* @param scheduler
* The <code>Scheduler</code> instance that should be made
* available within the <code>JobExecutionContext</code>.
* @param schdCtxt
* the <code>SchedulingContext</code> that should be used by the
* <code>JobRunShell</code> when making updates to the <code>JobStore</code>.
*/
public JobRunShell(Scheduler scheduler, TriggerFiredBundle bndle) {
this.scheduler = scheduler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1605,8 +1605,8 @@ public void clear() throws SchedulerException {
* <p>
* Get the current state of the identified <code>{@link Trigger}</code>.
* </p>
*
* @see Trigger.TriggerState
J *
* @see TriggerState
*/
public TriggerState getTriggerState(TriggerKey triggerKey) throws SchedulerException {
validateState();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -517,17 +517,13 @@ public void setJMXObjectName(String jmxObjectName) {

/**
* Get the ThreadExecutor which runs the QuartzSchedulerThread
*
* @return
*/
public ThreadExecutor getThreadExecutor() {
return threadExecutor;
}

/**
* Set the ThreadExecutor which runs the QuartzSchedulerThread
*
* @param threadExecutor
*/
public void setThreadExecutor(ThreadExecutor threadExecutor) {
this.threadExecutor = threadExecutor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public static JobDetail newJobDetail(CompositeData cData)
}

/**
* @param Map<String, Object>
* @param attrMap the attributes that define the job
* @return JobDetail
*/
public static JobDetail newJobDetail(Map<String, Object> attrMap)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import static javax.management.openmbean.SimpleType.STRING;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import javax.management.openmbean.CompositeData;
Expand Down Expand Up @@ -74,11 +73,11 @@ public static CompositeData toCompositeData(JobExecutionContext jec)
JobDataMapSupport.toTabularData(jec
.getMergedJobDataMap()),
determineCalendarName(jec),
Boolean.valueOf(jec.isRecovering()),
Integer.valueOf(jec.getRefireCount()),
jec.isRecovering(),
jec.getRefireCount(),
jec.getFireTime(), jec.getScheduledFireTime(),
jec.getPreviousFireTime(), jec.getNextFireTime(),
Long.valueOf(jec.getJobRunTime()),
jec.getJobRunTime(),
jec.getFireInstanceId() });
} catch (OpenDataException e) {
throw new RuntimeException(e);
Expand All @@ -103,16 +102,14 @@ private static String determineCalendarName(JobExecutionContext jec) {
}

/**
* @param tabularData
* @return array of region statistics
*/
public static TabularData toTabularData(
final List<JobExecutionContext> executingJobs)
throws SchedulerException {
List<CompositeData> list = new ArrayList<CompositeData>();
for (final Iterator<JobExecutionContext> iter = executingJobs
.iterator(); iter.hasNext();) {
list.add(toCompositeData(iter.next()));
for (JobExecutionContext executingJob : executingJobs) {
list.add(toCompositeData(executingJob));
}
TabularData td = new TabularDataSupport(TABULAR_TYPE);
td.putAll(list.toArray(new CompositeData[list.size()]));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ boolean deleteJob(String jobName, String jobGroupName)
* Integer, Double, Float, String, Boolean, Date, Character, Map<String, Object>.
* Maps are limited to containing values from the same set of types, less Map itself.
*
* @param jobDetailMap
* @param replace
* @param abstractJobInfo map of attributes defining job
* @param replace whether or not to replace a pre-existing job with the same key
* @throws Exception
*/
void addJob(Map<String, Object> abstractJobInfo, boolean replace)
Expand All @@ -193,45 +193,37 @@ void addJob(Map<String, Object> abstractJobInfo, boolean replace)

/**
* Pause all jobs whose group starts with jobGroupPrefix
* @param jobGroupPrefix
* @throws Exception
*/
void pauseJobsStartingWith(String jobGroupPrefix) throws Exception;

/**
* Pause all jobs whose group ends with jobGroupSuffix
* @param jobGroupSuffix
* @throws Exception
*/
void pauseJobsEndingWith(String jobGroupSuffix) throws Exception;

/**
* Pause all jobs whose group contains jobGroupToken
* @param jobGroupToken
* @throws Exception
*/
void pauseJobsContaining(String jobGroupToken) throws Exception;


/**
* Resume all jobs in the given group
*/
void resumeJobGroup(String jobGroup) throws Exception;

/**
* Resume all jobs whose group starts with jobGroupPrefix
* @param jobGroupPrefix
* @throws Exception
*/
void resumeJobsStartingWith(String jobGroupPrefix) throws Exception;

/**
* Resume all jobs whose group ends with jobGroupSuffix
* @param jobGroupSuffix
* @throws Exception
*/
void resumeJobsEndingWith(String jobGroupSuffix) throws Exception;

/**
* Resume all jobs whose group contains jobGroupToken
* @param jobGroupToken
* @throws Exception
*/
void resumeJobsContaining(String jobGroupToken) throws Exception;

Expand Down Expand Up @@ -263,45 +255,33 @@ void addJob(Map<String, Object> abstractJobInfo, boolean replace)

/**
* Pause all triggers whose group starts with triggerGroupPrefix
* @param triggerGroupPrefix
* @throws Exception
*/
void pauseTriggersStartingWith(String triggerGroupPrefix) throws Exception;

/**
* Pause all triggers whose group ends with triggerGroupSuffix
* @param triggerGroupSuffix
* @throws Exception
*/
void pauseTriggersEndingWith(String suffix) throws Exception;

/**
* Pause all triggers whose group contains triggerGroupToken
* @param triggerGroupToken
* @throws Exception
*/
void pauseTriggersContaining(String triggerGroupToken) throws Exception;

void resumeTriggerGroup(String triggerGroup) throws Exception;

/**
* Resume all triggers whose group starts with triggerGroupPrefix
* @param triggerGroupPrefix
* @throws Exception
*/
void resumeTriggersStartingWith(String triggerGroupPrefix) throws Exception;

/**
* Resume all triggers whose group ends with triggerGroupSuffix
* @param triggerGroupSuffix
* @throws Exception
*/
void resumeTriggersEndingWith(String triggerGroupSuffix) throws Exception;

/**
* Resume all triggers whose group contains triggerGroupToken
* @param triggerGroupToken
* @throws Exception
*/
void resumeTriggersContaining(String triggerGroupToken) throws Exception;

Expand Down
2 changes: 0 additions & 2 deletions quartz-core/src/main/java/org/quartz/impl/JobDetailImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,6 @@ public JobDetailImpl() {
* and the default settings of all the other properties.
* </p>
*
* @param group if <code>null</code>, Scheduler.DEFAULT_GROUP will be used.
*
* @exception IllegalArgumentException
* if name is null or empty, or the group is an empty string.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,9 @@
* <p>
* A user must create a subclass to implement the actual connection to the remote
* MBeanServer using their application specific connector.
* For example <code>{@link org.quartz.ee.jmx.jboss.JBoss4RMIRemoteMBeanScheduler}</code>.
* </p>
* @see org.quartz.Scheduler
* @see org.quartz.core.QuartzScheduler
* @see org.quartz.core.SchedulingContext
*/
public abstract class RemoteMBeanScheduler implements Scheduler {

Expand Down Expand Up @@ -256,7 +254,7 @@ public void start() throws SchedulerException {
* </p>
*/
public void startDelayed(int seconds) throws SchedulerException {
invoke("startDelayed", new Object[] {Integer.valueOf(seconds)}, new String[] {int.class.getName()});
invoke("startDelayed", new Object[] {seconds}, new String[] {int.class.getName()});
}

/**
Expand Down
3 changes: 1 addition & 2 deletions quartz-core/src/main/java/org/quartz/impl/StdScheduler.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@
*
* @see org.quartz.Scheduler
* @see org.quartz.core.QuartzScheduler
* @see org.quartz.core.SchedulingContext
*
*
* @author James House
*/
public class StdScheduler implements Scheduler {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,7 @@ public void setDayExcluded(java.util.Calendar day, boolean exclude) {
/**
* Remove the given day from the list of excluded days
*
* @param day
* @return
* @param day the day to exclude
*/
public void removeExcludedDay(java.util.Calendar day) {
removeExcludedDay(day, false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ public DailyCalendar(org.quartz.Calendar baseCalendar,
* <b>Note:</b> This <CODE>DailyCalendar</CODE> will use the
* <code>{@link TimeZone#getDefault()}</code> time zone unless an explicit
* time zone is set via <code>{@link BaseCalendar#setTimeZone(TimeZone)}</code>.
* You should use <code>{@link #DailyCalendar(String, TimeZone, long, long)}</code>
* You should use <code>{@link #DailyCalendar(org.quartz.Calendar, java.util.TimeZone, long, long)}</code>
* if you don't want the given <code>rangeStartingTimeInMillis</code> and
* <code>rangeEndingTimeInMillis</code> to be evaluated in the default
* time zone.
Expand Down Expand Up @@ -358,7 +358,7 @@ public DailyCalendar(long rangeStartingTimeInMillis,
* <b>Note:</b> This <CODE>DailyCalendar</CODE> will use the
* <code>{@link TimeZone#getDefault()}</code> time zone unless an explicit
* time zone is set via <code>{@link BaseCalendar#setTimeZone(TimeZone)}</code>.
* You should use <code>{@link #DailyCalendar(String, Calendar, TimeZone, long, long)}</code>
* You should use <code>{@link #DailyCalendar(org.quartz.Calendar, java.util.TimeZone, long, long)} </code>
* if you don't want the given <code>rangeStartingTimeInMillis</code> and
* <code>rangeEndingTimeInMillis</code> to be evaluated in the default
* time zone.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
* Persist a DailyTimeIntervalTrigger by converting internal fields to and from
* SimplePropertiesTriggerProperties.
*
* @see DailyTimeIntervalScheduleBuilder, {@link DailyTimeIntervalTrigger}
* @see DailyTimeIntervalScheduleBuilder
* @see DailyTimeIntervalTrigger
*
* @since 2.1.0
*
Expand Down Expand Up @@ -126,7 +127,7 @@ protected TriggerPropertyBundle getTriggerPropertyBundle(SimplePropertiesTrigger

if (timeOfDayStr != null) {
String[] nums = timeOfDayStr.split(",");
TimeOfDay startTimeOfDay = null;
TimeOfDay startTimeOfDay;
if (nums.length >= 3) {
int hour = Integer.parseInt(nums[0]);
int min = Integer.parseInt(nums[1]);
Expand All @@ -137,7 +138,7 @@ protected TriggerPropertyBundle getTriggerPropertyBundle(SimplePropertiesTrigger
}
scheduleBuilder.startingDailyAt(startTimeOfDay);

TimeOfDay endTimeOfDay = null;
TimeOfDay endTimeOfDay;
if (nums.length >= 6) {
int hour = Integer.parseInt(nums[3]);
int min = Integer.parseInt(nums[4]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,15 @@ public interface Semaphore {
/**
* Release the lock on the identified resource if it is held by the calling
* thread.
* @param conn Database connection used to establish lock. Can be null if
* <code>{@link #requiresConnection()}</code> returns false.
*/
void releaseLock(String lockName) throws LockException;

/**
* Whether this Semaphore implementation requires a database connection for
* its lock management operations.
*
* @see #isLockOwner(Connection, String)
* @see #obtainLock(Connection, String)
* @see #releaseLock(Connection, String)
* @see #releaseLock(String)
*/
boolean requiresConnection();
}
Loading

0 comments on commit a6aa5b8

Please sign in to comment.