db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r1883996 - in /db/derby/code/trunk: ./ java/org.apache.derby.engine/org/apache/derby/impl/services/daemon/ java/org.apache.derby.engine/org/apache/derby/impl/services/monitor/ java/org.apache.derby.tests/org/apache/derbyTesting/functionTest...
Date Tue, 01 Dec 2020 15:34:58 GMT
Author: rhillegas
Date: Tue Dec  1 15:34:57 2020
New Revision: 1883996

URL: http://svn.apache.org/viewvc?rev=1883996&view=rev
Log:
DERBY-7088: Make Derby compile cleanly with JDK build 16-ea+26-1764; commit derby-7088-02-aa-deprecatedThreadGroupMethods.diff.

Modified:
    db/derby/code/trunk/build.xml
    db/derby/code/trunk/java/org.apache.derby.engine/org/apache/derby/impl/services/daemon/BasicDaemon.java
    db/derby/code/trunk/java/org.apache.derby.engine/org/apache/derby/impl/services/monitor/FileMonitor.java
    db/derby/code/trunk/java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/harness/MultiTest.java
    db/derby/code/trunk/java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/tests/jdbcapi/SetQueryTimeoutTest.java
    db/derby/code/trunk/java/org.apache.derby.tests/org/apache/derbyTesting/system/sttest/Sttest.java

Modified: db/derby/code/trunk/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/build.xml?rev=1883996&r1=1883995&r2=1883996&view=diff
==============================================================================
--- db/derby/code/trunk/build.xml (original)
+++ db/derby/code/trunk/build.xml Tue Dec  1 15:34:57 2020
@@ -1739,7 +1739,6 @@
     	     Overview="${basedir}/published_api_overview.html"
              Windowtitle="Apache Derby ${major}.${minor} API Documentation"   
              Header="Apache Derby ${major}.${minor}"
-             Footer="${javadoc.Footer}"
              bottom="Apache Derby ${major}.${minor} API Documentation  -  <i>Copyright
© 2004,${copyright.year} The Apache Software Foundation. All Rights Reserved.</i>">
 
       <Doctitle> Apache Derby ${major}.${minor} API Documentation</Doctitle>
  
@@ -1874,7 +1873,6 @@
     	Overview="${basedir}/published_api_overview.html"
         windowtitle="Apache Derby V${major}.${minor} Internals"
         doctitle="Apache Derby V${major}.${minor} Internals"
-        Footer="${javadoc.Footer}"
         bottom="Apache Derby V${major}.${minor} Internals - &lt;i&gt;Copyright &amp;copy;
2004,${copyright.year} The Apache Software Foundation. All Rights Reserved.&lt;/i&gt;"
       >
 

Modified: db/derby/code/trunk/java/org.apache.derby.engine/org/apache/derby/impl/services/daemon/BasicDaemon.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/org.apache.derby.engine/org/apache/derby/impl/services/daemon/BasicDaemon.java?rev=1883996&r1=1883995&r2=1883996&view=diff
==============================================================================
--- db/derby/code/trunk/java/org.apache.derby.engine/org/apache/derby/impl/services/daemon/BasicDaemon.java
(original)
+++ db/derby/code/trunk/java/org.apache.derby.engine/org/apache/derby/impl/services/daemon/BasicDaemon.java
Tue Dec  1 15:34:57 2020
@@ -703,7 +703,7 @@ public class BasicDaemon implements Daem
 
 			if ((serviceCount % yieldCount) == 0) {
 
-				yield();
+				yieldNow();
 			}
 
 			if (SanityManager.DEBUG)
@@ -717,7 +717,7 @@ public class BasicDaemon implements Daem
 
 
 	/* let everybody else run first */
-	private void yield()
+	private void yieldNow()
 	{
 		Thread currentThread = Thread.currentThread();
 		int oldPriority = currentThread.getPriority();

Modified: db/derby/code/trunk/java/org.apache.derby.engine/org/apache/derby/impl/services/monitor/FileMonitor.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/org.apache.derby.engine/org/apache/derby/impl/services/monitor/FileMonitor.java?rev=1883996&r1=1883995&r2=1883996&view=diff
==============================================================================
--- db/derby/code/trunk/java/org.apache.derby.engine/org/apache/derby/impl/services/monitor/FileMonitor.java
(original)
+++ db/derby/code/trunk/java/org.apache.derby.engine/org/apache/derby/impl/services/monitor/FileMonitor.java
Tue Dec  1 15:34:57 2020
@@ -85,9 +85,13 @@ public final class FileMonitor extends B
      * members have finished (i.e., either when the driver is
      * unloaded, or when the last database is shut down).
      *
+     * Warnings are suppressed because ThreadGroup.setDaemon() was slated
+     * for removal by Open JDK build 16-ea+26-1764. See https://issues.apache.org/jira/browse/DERBY-7094
+     *
      * @return the thread group "derby.daemons" or null if we saw
      * a SecurityException
      */
+    @SuppressWarnings("removal")
     private ThreadGroup createDaemonGroup() {
         try {
             ThreadGroup group = new ThreadGroup("derby.daemons");
@@ -271,6 +275,11 @@ public final class FileMonitor extends B
         });
 	}
 
+    /**
+     * Warnings are suppressed because ThreadGroup.setDaemon() was slated
+     * for removal by Open JDK build 16-ea+26-1764. See https://issues.apache.org/jira/browse/DERBY-7094
+     */
+    @SuppressWarnings("removal")
 	public synchronized final Thread getDaemonThread(
             final Runnable task,
             final String name,

Modified: db/derby/code/trunk/java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/harness/MultiTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/harness/MultiTest.java?rev=1883996&r1=1883995&r2=1883996&view=diff
==============================================================================
--- db/derby/code/trunk/java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/harness/MultiTest.java
(original)
+++ db/derby/code/trunk/java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/harness/MultiTest.java
Tue Dec  1 15:34:57 2020
@@ -191,7 +191,10 @@ public class MultiTest
 	** there is no memory, this doesn't seem to do anything
 	** either.  Also, we grab some memory up front and release
 	** that after telling the threads to stop themselves.
+    ** Suppress deprecation warnings for ThreadGroup.isDestroyed();
+    ** see https://issues.apache.org/jira/browse/DERBY-7094
 	*/
+    @SuppressWarnings("removal")
 	private static long execTesters(mtTester[] testers)
 			throws FileNotFoundException, IOException
 	{
@@ -287,7 +290,7 @@ public class MultiTest
 	
 		/*	
 		** Now stop everyone that hasn't already stopped.
-		* First get thread dumps for jdk 15.
+		* First get thread dumps for jdk 15. 
 		*/
 		TestUtil.dumpAllStackTracesIfSupported(log);
 		for (i = 0; i < MAX_WAIT_FOR_COMPLETION && (tg.isDestroyed() == false ); i++)


Modified: db/derby/code/trunk/java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/tests/jdbcapi/SetQueryTimeoutTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/tests/jdbcapi/SetQueryTimeoutTest.java?rev=1883996&r1=1883995&r2=1883996&view=diff
==============================================================================
--- db/derby/code/trunk/java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/tests/jdbcapi/SetQueryTimeoutTest.java
(original)
+++ db/derby/code/trunk/java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/tests/jdbcapi/SetQueryTimeoutTest.java
Tue Dec  1 15:34:57 2020
@@ -345,7 +345,7 @@ public class SetQueryTimeoutTest
                     long endTime = System.currentTimeMillis();
                     setHighestRunTime(endTime - startTime);
                     while (fetchRow(resultSet)) {
-                        yield();
+                        Thread.yield();
                     }
                 } else {
                     long startTime = System.currentTimeMillis();

Modified: db/derby/code/trunk/java/org.apache.derby.tests/org/apache/derbyTesting/system/sttest/Sttest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/org.apache.derby.tests/org/apache/derbyTesting/system/sttest/Sttest.java?rev=1883996&r1=1883995&r2=1883996&view=diff
==============================================================================
--- db/derby/code/trunk/java/org.apache.derby.tests/org/apache/derbyTesting/system/sttest/Sttest.java
(original)
+++ db/derby/code/trunk/java/org.apache.derby.tests/org/apache/derbyTesting/system/sttest/Sttest.java
Tue Dec  1 15:34:57 2020
@@ -320,7 +320,7 @@ public class Sttest extends Thread {
 					MemCheck.showmem();
 				}
 				set_countlock(false);
-				yield();
+				Thread.yield();
 			} else if (mode == GROW && rowcount >= targetmax) {
 				d = new Date();
 				System.out.println("hit targetmax with " + rowcount + " " + d);
@@ -353,7 +353,7 @@ public class Sttest extends Thread {
 					}
 				}
 				set_countlock(false);
-				yield();
+				Thread.yield();
 			}
 			// don't interfere with count query
 			while (get_countlock() == true) {
@@ -380,7 +380,7 @@ public class Sttest extends Thread {
 						if (mode == INIT) {
 							inserts_to_try--;
 						}
-						yield();
+						Thread.yield();
 						changerowcount(1);
 					}
 					System.out.println(addrows + "  Rows inserted");
@@ -392,7 +392,7 @@ public class Sttest extends Thread {
 						Datatypes.update_one_row(conn, thread_id);
 						updaterow++;
 						conn.commit();
-						yield();
+						Thread.yield();
 					}
 					System.out.println(updaterow + "  rows updated");
 					break;
@@ -400,7 +400,7 @@ public class Sttest extends Thread {
 					ind2 = Math.abs(rand.nextInt() % deletesize);
 					int del_rows = 0;
 					del_rows = Datatypes.delete_some(conn, thread_id, ind2 + 1);
-					yield();
+					Thread.yield();
 					changerowcount(-1 * del_rows);
 					// commits are done inside delete_some()
 					System.out.println(del_rows + " rows deleted");



Mime
View raw message