Skip to content

Commit 376cde3

Browse files
author
Peter Firmstone
committed
Remove deprecated classes that use reflection to access Java implementation classes openjdk#96
move ActivationGroupID from internal class to package private class.
1 parent 9868ad3 commit 376cde3

File tree

3 files changed

+39
-26
lines changed

3 files changed

+39
-26
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*
2+
* Copyright 2019 The Apache Software Foundation.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
package org.apache.river.api.io;
17+
18+
import java.io.ObjectStreamField;
19+
import java.io.Serializable;
20+
21+
/**
22+
* Had to place this here due to readResolve method of Serializer.
23+
*/
24+
final class ActivationGroupID implements Serializable {
25+
26+
private static final long serialVersionUID = -1648432278909740833L;
27+
private static final ObjectStreamField[] serialPersistentFields = {new ObjectStreamField("system", java.rmi.activation.ActivationSystem.class), new ObjectStreamField("uid", java.rmi.server.UID.class)};
28+
java.rmi.activation.ActivationSystem system;
29+
java.rmi.server.UID uid;
30+
31+
ActivationGroupID() {
32+
}
33+
34+
ActivationGroupID(java.rmi.activation.ActivationSystem system, java.rmi.server.UID uid) {
35+
this.system = system;
36+
this.uid = uid;
37+
}
38+
39+
}

JGDMS/jgdms-platform/src/main/java/org/apache/river/api/io/ActivationGroupIDSerializer.java

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -174,30 +174,5 @@ protected Class resolveClass(ObjectStreamClass desc)
174174
}
175175
}
176176

177-
/**
178-
* Had to place this here due to readResolve method of Serializer.
179-
*/
180-
static final class ActivationGroupID implements Serializable {
181-
private static final long serialVersionUID = -1648432278909740833L;
182-
183-
private static final ObjectStreamField[] serialPersistentFields =
184-
{
185-
new ObjectStreamField("system", java.rmi.activation.ActivationSystem.class),
186-
new ObjectStreamField("uid", java.rmi.server.UID.class)
187-
};
188-
189-
java.rmi.activation.ActivationSystem system;
190-
191-
java.rmi.server.UID uid;
192-
193-
ActivationGroupID(){}
194-
195-
ActivationGroupID(java.rmi.activation.ActivationSystem system,
196-
java.rmi.server.UID uid )
197-
{
198-
this.system = system;
199-
this.uid = uid;
200-
}
201-
}
202177

203178
}

JGDMS/jgdms-platform/src/main/java/org/apache/river/api/io/AtomicMarshalOutputStream.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import java.io.OutputStream;
2525
import java.lang.reflect.Constructor;
2626
import java.lang.reflect.InvocationTargetException;
27-
import java.lang.reflect.Proxy;
2827
import java.net.URI;
2928
import java.net.URL;
3029
import java.rmi.MarshalledObject;

0 commit comments

Comments
 (0)