[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] [FYI/JDWP] Making PacketProccessor a PriviledgedAction
From: |
Aaron Luchko |
Subject: |
[cp-patches] [FYI/JDWP] Making PacketProccessor a PriviledgedAction |
Date: |
Wed, 27 Jul 2005 15:04:48 -0400 |
As discussed on IRC this patch simply makes PacketProccessor a
PriviledgedAction. This way we can use AccessController.doPriviledged to
execute PacketProcessor so we won't have to worry about
SecurityExceptions.
ChangeLog
2005-07-26 Aaron Luchko <address@hidden>
* gnu/classpath/jdwp/util/PacketProcessor.java: Implement
PrivilegedAction to allow privilaged operations.
Index: PacketProcessor.java
===================================================================
RCS
file:
/cvsroot/classpath/classpath/gnu/classpath/jdwp/processor/PacketProcessor.java,v
retrieving revision 1.4
diff -u -r1.4 PacketProcessor.java
--- PacketProcessor.java 12 Jul 2005 19:29:46 -0000 1.4
+++ PacketProcessor.java 27 Jul 2005 19:00:28 -0000
@@ -52,6 +52,7 @@
import java.io.DataOutputStream;
import java.io.IOException;
import java.nio.ByteBuffer;
+import java.security.PrivilegedAction;
/**
* This class is responsible for processing packets from the
@@ -62,7 +63,7 @@
* @author Keith Seitz (address@hidden)
*/
public class PacketProcessor
- extends Thread
+ implements PrivilegedAction
{
// The connection to the debugger
private JdwpConnection _connection;
@@ -134,7 +135,7 @@
* Main run routine for this thread. Will loop getting packets
* from the connection and processing them.
*/
- public void run ()
+ public Object run ()
{
try
{
@@ -149,6 +150,7 @@
}
// Time to shutdown, tell Jdwp to shutdown
Jdwp.getDefault().shutdown();
+ return null;
}
/**
@@ -157,7 +159,6 @@
public void shutdown ()
{
_shutdown = true;
- interrupt ();
}
// Helper function which actually does all the work of waiting
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [cp-patches] [FYI/JDWP] Making PacketProccessor a PriviledgedAction,
Aaron Luchko <=