107
107
import java .nio .BufferOverflowException ;
108
108
import java .nio .charset .StandardCharsets ;
109
109
110
+ import java .security .AccessController ;
111
+ import java .security .PrivilegedAction ;
112
+
110
113
import java .sql .Date ;
111
114
import java .sql .Time ;
112
115
import java .sql .Timestamp ;
@@ -2683,9 +2686,9 @@ public static void writeExternalizableLite(DataOutput out, ExternalizableLite o)
2683
2686
{
2684
2687
try
2685
2688
{
2686
- type .serializer ().newInstance ().serialize (out , o );
2689
+ type .serializer ().getDeclaredConstructor (). newInstance ().serialize (out , o );
2687
2690
}
2688
- catch (InstantiationException | IllegalAccessException e )
2691
+ catch (InstantiationException | InvocationTargetException | NoSuchMethodException | IllegalAccessException e )
2689
2692
{
2690
2693
throw new IOException (e );
2691
2694
}
@@ -7465,9 +7468,9 @@ else if (method.getName().equals("streamBytes"))
7465
7468
7466
7469
try
7467
7470
{
7468
- XmlDocument xml = new Callable <XmlDocument >()
7471
+ XmlDocument xml = AccessController . doPrivileged ( new PrivilegedAction <XmlDocument >()
7469
7472
{
7470
- public XmlDocument call ()
7473
+ public XmlDocument run ()
7471
7474
{
7472
7475
String sConfig = Config .getProperty (PROPERTY_CONFIG );
7473
7476
XmlDocument xml = null ;
@@ -7505,13 +7508,14 @@ public XmlDocument call()
7505
7508
XmlHelper .replaceSystemProperties (xml , "system-property" );
7506
7509
return xml ;
7507
7510
}
7508
- }.call ();
7511
+ });
7512
+
7509
7513
7510
7514
final XmlElement xmlFactory = xml .getSafeElement ("object-stream-factory" );
7511
7515
7512
- factory = new Callable <ObjectStreamFactory >()
7516
+ factory = AccessController . doPrivileged ( new PrivilegedAction <ObjectStreamFactory >()
7513
7517
{
7514
- public ObjectStreamFactory call ()
7518
+ public ObjectStreamFactory run ()
7515
7519
{
7516
7520
try
7517
7521
{
@@ -7528,7 +7532,7 @@ public ObjectStreamFactory call()
7528
7532
}
7529
7533
return new DefaultObjectStreamFactory ();
7530
7534
}
7531
- }. call ( );
7535
+ });
7532
7536
7533
7537
fResolve = xml .getSafeElement ("force-classloader-resolving" ).getBoolean (fResolve );
7534
7538
fCache = xml .getSafeElement ("enable-xmlbean-class-cache" ).getBoolean (fCache );
0 commit comments