Skip to content

Commit c219d6a

Browse files
committed
Misconfigured Discovery Service Provider openjdk#160
1 parent 14608ea commit c219d6a

File tree

58 files changed

+349
-293
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+349
-293
lines changed

JGDMS/groovy-config/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@
4646
<artifactId>jgdms-jeri</artifactId>
4747
<version>${project.version}</version>
4848
</dependency>
49-
<dependency>
50-
<groupId>biz.aQute.bnd</groupId>
51-
<artifactId>biz.aQute.bnd.annotation</artifactId>
52-
<version>${bnd.annotation.version}</version>
49+
<dependency>
50+
<groupId>org.osgi</groupId>
51+
<artifactId>osgi.annotation</artifactId>
52+
<version>${osgi.annotation.version}</version>
5353
<scope>compile</scope>
5454
</dependency>
5555
</dependencies>

JGDMS/groovy-config/src/main/groovy/net/jini/config/groovy/GroovyConfigServiceFactory.groovy

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,21 @@
1616

1717
package net.jini.config.groovy
1818

19-
import aQute.bnd.annotation.headers.ProvideCapability
20-
import aQute.bnd.annotation.headers.RequireCapability
19+
20+
import org.osgi.annotation.bundle.Capability
21+
import org.osgi.annotation.bundle.Requirement
2122
import net.jini.config.Configuration
2223
import net.jini.config.ConfigurationException
2324

2425
/**
2526
*
2627
* @author Peter Firmstone.
2728
*/
28-
@RequireCapability(
29-
ns="osgi.extender",
29+
@Requirement(
30+
namespace="osgi.extender",
3031
filter="(osgi.extender=osgi.serviceloader.registrar)")
31-
@ProvideCapability(
32-
ns="osgi.serviceloader",
32+
@Capability(
33+
namespace="osgi.serviceloader",
3334
name="net.jini.config.ConfigurationServiceFactory")
3435
class GroovyConfigService implements net.jini.config.ConfigurationServiceFactory {
3536

JGDMS/jgdms-discovery-providers/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@
6969
<scope>test</scope>
7070
</dependency>
7171
<dependency>
72-
<groupId>biz.aQute.bnd</groupId>
73-
<artifactId>biz.aQute.bnd.annotation</artifactId>
74-
<version>${bnd.annotation.version}</version>
72+
<groupId>org.osgi</groupId>
73+
<artifactId>osgi.annotation</artifactId>
74+
<version>${osgi.annotation.version}</version>
7575
<scope>compile</scope>
7676
</dependency>
7777
</dependencies>

JGDMS/jgdms-discovery-providers/src/main/java/org/apache/river/discovery/https/Client.java

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,20 @@
3535
import org.apache.river.jeri.internal.EndpointInternals;
3636
import org.apache.river.jeri.internal.HttpsEndpointInternalsAccess;
3737
import org.apache.river.discovery.internal.UnicastClient;
38-
import aQute.bnd.annotation.headers.RequireCapability;
39-
import aQute.bnd.annotation.headers.ProvideCapability;
38+
import org.osgi.annotation.bundle.Capability;
39+
import org.osgi.annotation.bundle.Requirement;
4040
import org.apache.river.discovery.Plaintext;
4141

4242
/**
4343
* Implements the client side of the <code>net.jini.discovery.https</code>
4444
* unicast discovery format.
4545
*
4646
*/
47-
@RequireCapability(
48-
ns="osgi.extender",
47+
@Requirement(
48+
namespace="osgi.extender",
4949
filter="(osgi.extender=osgi.serviceloader.registrar)")
50-
@ProvideCapability(
51-
ns="osgi.serviceloader",
50+
@Capability(
51+
namespace="osgi.serviceloader",
5252
name="org.apache.river.discovery.DiscoveryFormatProvider")
5353
class Client extends UnicastClient {
5454

@@ -58,8 +58,9 @@ public Client() {
5858

5959
private static final class ClientImpl extends EndpointBasedClient {
6060

61-
private static EndpointInternals epi =
61+
private static final EndpointInternals epi =
6262
AccessController.doPrivilegedWithCombiner(new PrivilegedAction<EndpointInternals>() {
63+
@Override
6364
public EndpointInternals run() {
6465
return HttpsEndpointInternalsAccess.get();
6566
}
@@ -73,6 +74,7 @@ public EndpointInternals run() {
7374
}
7475

7576
// documentation inherited from EndpointBasedClient
77+
@Override
7678
protected Endpoint getEndpoint(SocketFactory factory,
7779
InvocationConstraints constraints)
7880
throws UnsupportedConstraintException

JGDMS/jgdms-discovery-providers/src/main/java/org/apache/river/discovery/https/DiscoveryUnicastHTTPS.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
import org.apache.river.discovery.UnicastResponse;
3232
import org.apache.river.discovery.internal.UnicastClient;
3333
import org.apache.river.discovery.internal.UnicastServer;
34-
import aQute.bnd.annotation.headers.RequireCapability;
35-
import aQute.bnd.annotation.headers.ProvideCapability;
34+
import org.osgi.annotation.bundle.Capability;
35+
import org.osgi.annotation.bundle.Requirement;
3636

3737
/**
3838
* This exists as a separate https protocol because the jini discovery protocol
@@ -50,11 +50,11 @@
5050
*
5151
* @author Peter Firmstone
5252
*/
53-
@RequireCapability(
54-
ns="osgi.extender",
53+
@Requirement(
54+
namespace="osgi.extender",
5555
filter="(osgi.extender=osgi.serviceloader.registrar)")
56-
@ProvideCapability(
57-
ns="osgi.serviceloader",
56+
@Capability(
57+
namespace="osgi.serviceloader",
5858
name="org.apache.river.discovery.Discovery")
5959
public class DiscoveryUnicastHTTPS extends Discovery {
6060

JGDMS/jgdms-discovery-providers/src/main/java/org/apache/river/discovery/https/Server.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,20 @@
3434
import org.apache.river.jeri.internal.EndpointInternals;
3535
import org.apache.river.jeri.internal.HttpsEndpointInternalsAccess;
3636
import org.apache.river.discovery.internal.UnicastServer;
37-
import aQute.bnd.annotation.headers.RequireCapability;
38-
import aQute.bnd.annotation.headers.ProvideCapability;
37+
import org.osgi.annotation.bundle.Capability;
38+
import org.osgi.annotation.bundle.Requirement;
3939
import org.apache.river.discovery.Plaintext;
4040

4141
/**
4242
* Implements the server side of the <code>net.jini.discovery.https</code>
4343
* unicast discovery format.
4444
*
4545
*/
46-
@RequireCapability(
47-
ns="osgi.extender",
46+
@Requirement(
47+
namespace="osgi.extender",
4848
filter="(osgi.extender=osgi.serviceloader.registrar)")
49-
@ProvideCapability(
50-
ns="osgi.serviceloader",
49+
@Capability(
50+
namespace="osgi.serviceloader",
5151
name="org.apache.river.discovery.DiscoveryFormatProvider")
5252
class Server extends UnicastServer {
5353

JGDMS/jgdms-discovery-providers/src/main/java/org/apache/river/discovery/kerberos/Client.java

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
import org.apache.river.jeri.internal.EndpointInternals;
3838
import org.apache.river.jeri.internal.KerberosEndpointInternalsAccess;
3939
import org.apache.river.discovery.internal.UnicastClient;
40-
import aQute.bnd.annotation.headers.RequireCapability;
41-
import aQute.bnd.annotation.headers.ProvideCapability;
40+
import org.osgi.annotation.bundle.Capability;
41+
import org.osgi.annotation.bundle.Requirement;
4242

4343
/**
4444
* Implements the client side of the <code>net.jini.discovery.kerberos</code>
@@ -47,11 +47,11 @@
4747
* @author Sun Microsystems, Inc.
4848
* @since 2.0
4949
*/
50-
@RequireCapability(
51-
ns="osgi.extender",
50+
@Requirement(
51+
namespace="osgi.extender",
5252
filter="(osgi.extender=osgi.serviceloader.registrar)")
53-
@ProvideCapability(
54-
ns="osgi.serviceloader",
53+
@Capability(
54+
namespace="osgi.serviceloader",
5555
name="org.apache.river.discovery.DiscoveryFormatProvider")
5656
public class Client extends UnicastClient {
5757

@@ -63,8 +63,9 @@ public Client() {
6363
}
6464

6565
private static final class ClientImpl extends EndpointBasedClient {
66-
private static EndpointInternals epi =
66+
private static final EndpointInternals epi =
6767
AccessController.doPrivileged(new PrivilegedAction<EndpointInternals>() {
68+
@Override
6869
public EndpointInternals run() {
6970
return KerberosEndpointInternalsAccess.get();
7071
}
@@ -75,6 +76,7 @@ public EndpointInternals run() {
7576
}
7677

7778
// documentation inherited from EndpointBasedClient
79+
@Override
7880
protected Endpoint getEndpoint(SocketFactory factory,
7981
InvocationConstraints constraints)
8082
throws UnsupportedConstraintException

JGDMS/jgdms-discovery-providers/src/main/java/org/apache/river/discovery/kerberos/Server.java

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
import org.apache.river.jeri.internal.EndpointInternals;
3131
import org.apache.river.jeri.internal.KerberosEndpointInternalsAccess;
3232
import org.apache.river.discovery.internal.UnicastServer;
33-
import aQute.bnd.annotation.headers.RequireCapability;
34-
import aQute.bnd.annotation.headers.ProvideCapability;
33+
import org.osgi.annotation.bundle.Capability;
34+
import org.osgi.annotation.bundle.Requirement;
3535

3636
/**
3737
* Implements the server side of the <code>net.jini.discovery.kerberos</code>
@@ -40,11 +40,11 @@
4040
* @author Sun Microsystems, Inc.
4141
* @since 2.0
4242
*/
43-
@RequireCapability(
44-
ns="osgi.extender",
43+
@Requirement(
44+
namespace="osgi.extender",
4545
filter="(osgi.extender=osgi.serviceloader.registrar)")
46-
@ProvideCapability(
47-
ns="osgi.serviceloader",
46+
@Capability(
47+
namespace="osgi.serviceloader",
4848
name="org.apache.river.discovery.DiscoveryFormatProvider")
4949
public class Server extends UnicastServer {
5050

@@ -57,8 +57,9 @@ public Server() {
5757

5858
private static final class ServerImpl extends EndpointBasedServer {
5959

60-
private static EndpointInternals epi =
60+
private static final EndpointInternals epi =
6161
AccessController.doPrivileged(new PrivilegedAction<EndpointInternals>() {
62+
@Override
6263
public EndpointInternals run() {
6364
return KerberosEndpointInternalsAccess.get();
6465
}
@@ -69,6 +70,7 @@ public EndpointInternals run() {
6970
}
7071

7172
// documentation inherited from EndpointBasedServer
73+
@Override
7274
protected ServerEndpoint getServerEndpoint(ServerSocketFactory factory)
7375
throws UnsupportedConstraintException
7476
{

JGDMS/jgdms-discovery-providers/src/main/java/org/apache/river/discovery/plaintext/Client.java

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
import java.util.Collection;
3434
import net.jini.core.constraint.InvocationConstraints;
3535
import net.jini.io.UnsupportedConstraintException;
36-
import aQute.bnd.annotation.headers.RequireCapability;
37-
import aQute.bnd.annotation.headers.ProvideCapability;
36+
import org.osgi.annotation.bundle.Capability;
37+
import org.osgi.annotation.bundle.Requirement;
3838

3939
/**
4040
* Implements the client side of the <code>net.jini.discovery.plaintext</code>
@@ -43,11 +43,11 @@
4343
* @author Sun Microsystems, Inc.
4444
* @since 2.0
4545
*/
46-
@RequireCapability(
47-
ns="osgi.extender",
46+
@Requirement(
47+
namespace="osgi.extender",
4848
filter="(osgi.extender=osgi.serviceloader.registrar)")
49-
@ProvideCapability(
50-
ns="osgi.serviceloader",
49+
@Capability(
50+
namespace="osgi.serviceloader",
5151
name="org.apache.river.discovery.DiscoveryFormatProvider")
5252
public class Client
5353
implements MulticastRequestEncoder,
@@ -61,11 +61,13 @@ public Client() {
6161
}
6262

6363
// documentation inherited from DiscoveryFormatProvider
64+
@Override
6465
public String getFormatName() {
6566
return "net.jini.discovery.plaintext";
6667
}
6768

6869
// documentation inherited from MulticastRequestEncoder
70+
@Override
6971
public void encodeMulticastRequest(MulticastRequest request,
7072
DatagramBufferFactory bufs,
7173
InvocationConstraints constraints)
@@ -76,6 +78,7 @@ public void encodeMulticastRequest(MulticastRequest request,
7678
}
7779

7880
// documentation inherited from MulticastAnnouncementDecoder
81+
@Override
7982
public MulticastAnnouncement decodeMulticastAnnouncement(
8083
ByteBuffer buf,
8184
InvocationConstraints constraints)
@@ -86,6 +89,7 @@ public MulticastAnnouncement decodeMulticastAnnouncement(
8689
}
8790

8891
// documentation inherited from UnicastDiscoveryClient
92+
@Override
8993
public void checkUnicastDiscoveryConstraints(
9094
InvocationConstraints constraints)
9195
throws UnsupportedConstraintException
@@ -94,6 +98,7 @@ public void checkUnicastDiscoveryConstraints(
9498
}
9599

96100
// documentation inherited from UnicastDiscoveryClient
101+
@Override
97102
public UnicastResponse doUnicastDiscovery(
98103
Socket socket,
99104
InvocationConstraints constraints,

JGDMS/jgdms-discovery-providers/src/main/java/org/apache/river/discovery/plaintext/Server.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
import java.util.Collection;
3636
import net.jini.core.constraint.InvocationConstraints;
3737
import net.jini.io.UnsupportedConstraintException;
38-
import aQute.bnd.annotation.headers.RequireCapability;
39-
import aQute.bnd.annotation.headers.ProvideCapability;
38+
import org.osgi.annotation.bundle.Capability;
39+
import org.osgi.annotation.bundle.Requirement;
4040

4141
/**
4242
* Implements the server side of the <code>net.jini.discovery.plaintext</code>
@@ -45,11 +45,11 @@
4545
* @author Sun Microsystems, Inc.
4646
* @since 2.0
4747
*/
48-
@RequireCapability(
49-
ns="osgi.extender",
48+
@Requirement(
49+
namespace="osgi.extender",
5050
filter="(osgi.extender=osgi.serviceloader.registrar)")
51-
@ProvideCapability(
52-
ns="osgi.serviceloader",
51+
@Capability(
52+
namespace="osgi.serviceloader",
5353
name="org.apache.river.discovery.DiscoveryFormatProvider")
5454
public class Server
5555
implements MulticastRequestDecoder,

0 commit comments

Comments
 (0)