summaryrefslogtreecommitdiffstats
path: root/jdisc_core_test
diff options
context:
space:
mode:
authorArne H Juul <arnej@yahoo-inc.com>2017-04-27 11:57:02 +0200
committerArne H Juul <arnej@yahoo-inc.com>2017-04-27 11:57:02 +0200
commitd5e1c475954a855c458cfe469c1335027d445e1c (patch)
treea7c9b8d4dda6725d993d5404a682cdda188bff2c /jdisc_core_test
parent2c69a5846580c161befcfc6e01d02d41099a52ea (diff)
avoid warnings
Diffstat (limited to 'jdisc_core_test')
-rw-r--r--jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/application/BundleActivatorIntegrationTest.java8
-rw-r--r--jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/client/ClientDriverIntegrationTest.java2
-rw-r--r--jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/core/FelixFrameworkIntegrationTest.java2
-rw-r--r--jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/core/OsgiLogServiceIntegrationTest.java2
-rw-r--r--jdisc_core_test/test_bundles/cert-k-pkgs/src/main/java/com/yahoo/jdisc/bundle/k/CertificateK.java19
-rw-r--r--jdisc_core_test/test_bundles/cert-ml/src/main/java/com/yahoo/jdisc/bundle/m/CertificateM.java2
-rw-r--r--jdisc_core_test/test_bundles/cert-s-act/src/main/java/com/yahoo/jdisc/bundle/s/MyBundleActivator.java4
-rw-r--r--jdisc_core_test/test_bundles/my-bundle-activator/src/main/java/com/yahoo/jdisc/bundle/MyBundleActivator.java4
8 files changed, 23 insertions, 20 deletions
diff --git a/jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/application/BundleActivatorIntegrationTest.java b/jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/application/BundleActivatorIntegrationTest.java
index 7fe517fdd80..ce25f40dc65 100644
--- a/jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/application/BundleActivatorIntegrationTest.java
+++ b/jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/application/BundleActivatorIntegrationTest.java
@@ -22,10 +22,10 @@ public class BundleActivatorIntegrationTest {
OsgiFramework osgi = driver.osgiFramework();
BundleInstaller installer = new BundleInstaller(driver.osgiFramework());
Bundle bundle = installer.installAndStart("my-bundle-activator.jar").get(0);
- Class serviceClass = bundle.loadClass("com.yahoo.jdisc.bundle.MyService");
+ Class<?> serviceClass = bundle.loadClass("com.yahoo.jdisc.bundle.MyService");
assertNotNull(serviceClass);
BundleContext ctx = osgi.bundleContext();
- ServiceReference serviceRef = ctx.getServiceReference(serviceClass.getName());
+ ServiceReference<?> serviceRef = ctx.getServiceReference(serviceClass.getName());
assertNotNull(serviceRef);
Object service = ctx.getService(serviceRef);
assertNotNull(service);
@@ -37,10 +37,10 @@ public class BundleActivatorIntegrationTest {
public void requireThatApplicationBundleActivatorHasAccessToCurrentContainer() throws Exception {
TestDriver driver = TestDriver.newApplicationBundleInstance("app-g-act.jar", false);
OsgiFramework osgi = driver.osgiFramework();
- Class serviceClass = osgi.bundles().get(1).loadClass("com.yahoo.jdisc.bundle.MyService");
+ Class<?> serviceClass = osgi.bundles().get(1).loadClass("com.yahoo.jdisc.bundle.MyService");
assertNotNull(serviceClass);
BundleContext ctx = osgi.bundleContext();
- ServiceReference serviceRef = ctx.getServiceReference(serviceClass.getName());
+ ServiceReference<?> serviceRef = ctx.getServiceReference(serviceClass.getName());
assertNotNull(serviceRef);
Object service = ctx.getService(serviceRef);
assertNotNull(service);
diff --git a/jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/client/ClientDriverIntegrationTest.java b/jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/client/ClientDriverIntegrationTest.java
index bcb4a0b4fd7..85a80d0ffeb 100644
--- a/jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/client/ClientDriverIntegrationTest.java
+++ b/jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/client/ClientDriverIntegrationTest.java
@@ -55,7 +55,7 @@ public class ClientDriverIntegrationTest {
}
try {
List<Bundle> bundles = installer.installAndStart("cert-a.jar");
- Class classObj = bundles.get(0).loadClass("com.yahoo.jdisc.bundle.a.CertificateA");
+ Class<?> classObj = bundles.get(0).loadClass("com.yahoo.jdisc.bundle.a.CertificateA");
log.info("Loaded '" + classObj.getName() + "'.");
} catch (Exception e) {
throw new AssertionError(e);
diff --git a/jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/core/FelixFrameworkIntegrationTest.java b/jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/core/FelixFrameworkIntegrationTest.java
index d6a77a88625..9836f2879cd 100644
--- a/jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/core/FelixFrameworkIntegrationTest.java
+++ b/jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/core/FelixFrameworkIntegrationTest.java
@@ -194,7 +194,7 @@ public class FelixFrameworkIntegrationTest {
@SuppressWarnings({ "unchecked" })
private static int callClass(Bundle bundle, String className) throws Exception {
- Class certClass = bundle.loadClass(className);
+ Class<?> certClass = bundle.loadClass(className);
assertNotNull(certClass);
Callable<Integer> cert = (Callable<Integer>)certClass.newInstance();
assertNotNull(cert);
diff --git a/jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/core/OsgiLogServiceIntegrationTest.java b/jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/core/OsgiLogServiceIntegrationTest.java
index 89420464f6f..3ec05295750 100644
--- a/jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/core/OsgiLogServiceIntegrationTest.java
+++ b/jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/core/OsgiLogServiceIntegrationTest.java
@@ -33,7 +33,7 @@ public class OsgiLogServiceIntegrationTest {
long now = System.currentTimeMillis();
TestDriver driver = TestDriver.newApplicationBundleInstance("app-h-log.jar", false);
BundleContext ctx = driver.osgiFramework().bundleContext();
- ServiceReference ref = ctx.getServiceReference(LogReaderService.class.getName());
+ ServiceReference<?> ref = ctx.getServiceReference(LogReaderService.class.getName());
LogReaderService reader = (LogReaderService)ctx.getService(ref);
Enumeration<LogEntry> log = (Enumeration<LogEntry>)reader.getLog();
diff --git a/jdisc_core_test/test_bundles/cert-k-pkgs/src/main/java/com/yahoo/jdisc/bundle/k/CertificateK.java b/jdisc_core_test/test_bundles/cert-k-pkgs/src/main/java/com/yahoo/jdisc/bundle/k/CertificateK.java
index 547f2a2d312..6597a6f8c84 100644
--- a/jdisc_core_test/test_bundles/cert-k-pkgs/src/main/java/com/yahoo/jdisc/bundle/k/CertificateK.java
+++ b/jdisc_core_test/test_bundles/cert-k-pkgs/src/main/java/com/yahoo/jdisc/bundle/k/CertificateK.java
@@ -32,8 +32,8 @@ public class CertificateK {
private final com.yahoo.jdisc.application.AbstractApplication application = null;
private final com.yahoo.jdisc.handler.AbstractRequestHandler handler = null;
private final com.yahoo.jdisc.service.AbstractClientProvider client = null;
- private final com.yahoo.yolean.chain.Chain chain = null;
- private final com.yahoo.yolean.concurrent.ThreadRobustList robustList = null;
+ private final com.yahoo.yolean.chain.Chain<?> chain = null;
+ private final com.yahoo.yolean.concurrent.ThreadRobustList<?> robustList = null;
private final com.yahoo.yolean.trace.TraceNode traceNode = null;
private final com.sun.security.auth.LdapPrincipal principal = null;
private final com.sun.security.auth.module.JndiLoginModule jndiLoginModule = null;
@@ -57,7 +57,7 @@ public class CertificateK {
private final javax.lang.model.SourceVersion sourceVersion = null;
private final javax.lang.model.element.AnnotationMirror annotationMirror = null;
private final javax.lang.model.type.ArrayType arrayType = null;
- private final javax.lang.model.util.AbstractAnnotationValueVisitor6 abstractAnnotationValueVisitor6 = null;
+ private final javax.lang.model.util.AbstractAnnotationValueVisitor6<?,?> abstractAnnotationValueVisitor6 = null;
private final javax.management.Attribute attribute = null;
private final javax.management.loading.ClassLoaderRepository classLoaderRepository = null;
private final javax.management.modelmbean.DescriptorSupport descriptorSupport = null;
@@ -120,7 +120,7 @@ public class CertificateK {
private final javax.transaction.xa.XAException xaException = null;
private final javax.xml.XMLConstants xmlConstants = null;
private final javax.xml.bind.DataBindingException dataBindingException = null;
- private final javax.xml.bind.annotation.DomHandler domHandler = null;
+ private final javax.xml.bind.annotation.DomHandler<?,?> domHandler = null;
private final javax.xml.bind.annotation.adapters.CollapsedStringAdapter collapsedStringAdapter = null;
private final javax.xml.bind.attachment.AttachmentMarshaller attachmentMarshaller = null;
private final javax.xml.bind.helpers.AbstractMarshallerImpl abstractMarshaller = null;
@@ -198,7 +198,7 @@ public class CertificateK {
private final org.osgi.service.packageadmin.ExportedPackage pkg = null;
private final org.osgi.service.startlevel.StartLevel level = null;
private final org.osgi.service.url.URLConstants constants = null;
- private final org.osgi.util.tracker.BundleTracker tracker = null;
+ private final org.osgi.util.tracker.BundleTracker<?> tracker = null;
private final org.slf4j.ILoggerFactory loggerFactory = null;
private final org.slf4j.spi.LocationAwareLogger locationAwareLogger = null;
private final org.slf4j.helpers.BasicMarker basicMarker = null;
@@ -216,7 +216,10 @@ public class CertificateK {
private final org.xml.sax.ContentHandler contentHandler = null;
private final org.xml.sax.ext.Attributes2Impl attributes2 = null;
private final org.xml.sax.helpers.AttributesImpl attributes = null;
- private final sun.misc.ASCIICaseInsensitiveComparator comparator = null;
- private final sun.net.util.IPAddressUtil ipaddressutil = null;
- private final sun.security.krb5.Checksum checksum = null;
+
+ // We should only access these old sun-internal classes if we
+ // really, really have to
+ // private final sun.misc.ASCIICaseInsensitiveComparator comparator = null;
+ // private final sun.net.util.IPAddressUtil ipaddressutil = null;
+ // private final sun.security.krb5.Checksum checksum = null;
}
diff --git a/jdisc_core_test/test_bundles/cert-ml/src/main/java/com/yahoo/jdisc/bundle/m/CertificateM.java b/jdisc_core_test/test_bundles/cert-ml/src/main/java/com/yahoo/jdisc/bundle/m/CertificateM.java
index a921059c47a..af6959926f1 100644
--- a/jdisc_core_test/test_bundles/cert-ml/src/main/java/com/yahoo/jdisc/bundle/m/CertificateM.java
+++ b/jdisc_core_test/test_bundles/cert-ml/src/main/java/com/yahoo/jdisc/bundle/m/CertificateM.java
@@ -11,7 +11,7 @@ public class CertificateM implements Callable<Integer> {
@Override
@SuppressWarnings({ "unchecked" })
public Integer call() throws Exception {
- Class certClass = Class.forName("com.yahoo.jdisc.bundle.l.CertificateL");
+ Class<?> certClass = Class.forName("com.yahoo.jdisc.bundle.l.CertificateL");
Callable<Integer> cert = (Callable<Integer>)certClass.newInstance();
return cert.call();
}
diff --git a/jdisc_core_test/test_bundles/cert-s-act/src/main/java/com/yahoo/jdisc/bundle/s/MyBundleActivator.java b/jdisc_core_test/test_bundles/cert-s-act/src/main/java/com/yahoo/jdisc/bundle/s/MyBundleActivator.java
index f12381acf24..74dc64cbbd8 100644
--- a/jdisc_core_test/test_bundles/cert-s-act/src/main/java/com/yahoo/jdisc/bundle/s/MyBundleActivator.java
+++ b/jdisc_core_test/test_bundles/cert-s-act/src/main/java/com/yahoo/jdisc/bundle/s/MyBundleActivator.java
@@ -12,7 +12,7 @@ public class MyBundleActivator implements BundleActivator {
@Override
public void start(BundleContext ctx) throws Exception {
- ServiceReference ref = ctx.getServiceReference(RuntimeException.class);
+ ServiceReference<?> ref = ctx.getServiceReference(RuntimeException.class);
if (ref != null) {
throw (RuntimeException)ctx.getService(ref);
}
@@ -20,7 +20,7 @@ public class MyBundleActivator implements BundleActivator {
@Override
public void stop(BundleContext ctx) throws Exception {
- ServiceReference ref = ctx.getServiceReference(RuntimeException.class);
+ ServiceReference<?> ref = ctx.getServiceReference(RuntimeException.class);
if (ref != null) {
throw (RuntimeException)ctx.getService(ref);
}
diff --git a/jdisc_core_test/test_bundles/my-bundle-activator/src/main/java/com/yahoo/jdisc/bundle/MyBundleActivator.java b/jdisc_core_test/test_bundles/my-bundle-activator/src/main/java/com/yahoo/jdisc/bundle/MyBundleActivator.java
index a7e4984a367..955efdab9ff 100644
--- a/jdisc_core_test/test_bundles/my-bundle-activator/src/main/java/com/yahoo/jdisc/bundle/MyBundleActivator.java
+++ b/jdisc_core_test/test_bundles/my-bundle-activator/src/main/java/com/yahoo/jdisc/bundle/MyBundleActivator.java
@@ -12,11 +12,11 @@ import org.osgi.framework.ServiceRegistration;
*/
public class MyBundleActivator implements BundleActivator {
- private ServiceRegistration registration;
+ private ServiceRegistration<?> registration;
@Override
public void start(BundleContext ctx) throws Exception {
- ServiceReference seviceRef = ctx.getServiceReference(CurrentContainer.class.getName());
+ ServiceReference<?> seviceRef = ctx.getServiceReference(CurrentContainer.class.getName());
if (seviceRef == null) {
throw new IllegalStateException("Service reference '" + CurrentContainer.class.getName() + "' not found.");
}