File: 0005_commonj.diff

package info (click to toggle)
libspring-java 3.0.6.RELEASE-17
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 50,744 kB
  • ctags: 58,990
  • sloc: java: 325,579; xml: 67,955; sql: 176; makefile: 40; ruby: 33; sh: 6
file content (52 lines) | stat: -rw-r--r-- 1,852 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
Description: Compatibility with CommonJ API provided by Geronimo project
 The references to the Work related exceptions are disabled because the
 build fails and the compiler emit messages like this:
 "Unreachable catch block for WorkException. This exception is never thrown
 from the try statement body".
Author: Miguel Landaeta <miguel@miguel.cc>
Last-Update: 2010-07-04
Forwarded: no

--- a/projects/org.springframework.context.support/src/main/java/org/springframework/scheduling/commonj/WorkManagerTaskExecutor.java
+++ b/projects/org.springframework.context.support/src/main/java/org/springframework/scheduling/commonj/WorkManagerTaskExecutor.java
@@ -146,20 +146,22 @@
 	public void execute(Runnable task) {
 		Assert.state(this.workManager != null, "No WorkManager specified");
 		Work work = new DelegatingWork(task);
-		try {
+		//try {
 			if (this.workListener != null) {
 				this.workManager.schedule(work, this.workListener);
 			}
 			else {
 				this.workManager.schedule(work);
 			}
-		}
+		//}
+		/*
 		catch (WorkRejectedException ex) {
 			throw new TaskRejectedException("CommonJ WorkManager did not accept task: " + task, ex);
 		}
 		catch (WorkException ex) {
 			throw new SchedulingException("Could not schedule task on CommonJ WorkManager", ex);
 		}
+		*/
 	}
 
 	public void execute(Runnable task, long startTimeout) {
@@ -191,13 +193,13 @@
 	//-------------------------------------------------------------------------
 
 	public WorkItem schedule(Work work)
-			throws WorkException, IllegalArgumentException {
+			throws IllegalArgumentException {
 
 		return this.workManager.schedule(work);
 	}
 
 	public WorkItem schedule(Work work, WorkListener workListener)
-			throws WorkException, IllegalArgumentException {
+			throws IllegalArgumentException {
 
 		return this.workManager.schedule(work, workListener);
 	}