Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ private static String getPid(Session session, CommandLine commandLine) {
* @param pid
* @return
*/
@SuppressWarnings("rawtypes")
private Set<String> getPropertyNames(String pid) {
Set<String> propertyNames = new HashSet<>();
if (pid != null) {
Expand All @@ -116,9 +115,9 @@ private Set<String> getPropertyNames(String pid) {
if (configs != null && configs.length > 0) {
Configuration configuration = configs[0];
if (configuration != null) {
Dictionary properties = configuration.getProcessedProperties(null);
Dictionary<?, ?> properties = configuration.getProcessedProperties(null);
if (properties != null) {
Enumeration keys = properties.keys();
Enumeration<?> keys = properties.keys();
while (keys.hasMoreElements()) {
propertyNames.add(String.valueOf(keys.nextElement()));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ public void testExecuteOnExistingPid() throws Exception {
props, session.get(ConfigCommandSupport.PROPERTY_CONFIG_PROPS));
}

@SuppressWarnings("rawtypes")
public void testExecuteOnNewPid() throws Exception {
Configuration config = createMock(Configuration.class);
expect(admin.getConfiguration(PID, null)).andReturn(config);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ private Configuration getConfiguration(String pid) throws IOException {
return configuration;
}

@SuppressWarnings({ "unchecked", "rawtypes" })
private TypedProperties getConfigProperties(String pid) throws IOException, InvalidSyntaxException {
return configRepo.getConfig(pid);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public static void transform(URL url, OutputStream os) throws Exception {
String text = e.getTextContent();
Properties props = new Properties();
props.load(new ByteArrayInputStream(text.trim().getBytes()));
Enumeration en = props.propertyNames();
Enumeration<?> en = props.propertyNames();
while (en.hasMoreElements()) {
String k = (String) en.nextElement();
String v = props.getProperty(k);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ public synchronized void bundleChanged(BundleEvent bundleEvent) {
List<URI> repsToAdd = new ArrayList<>();
List<String> reqsToAdd = new ArrayList<>();
if (bundleEvent.getType() == BundleEvent.RESOLVED) {
Enumeration featuresUrlEnumeration = bundle.findEntries("/META-INF/" + FEATURE_PATH + "/", "*.xml", false);
Enumeration<?> featuresUrlEnumeration = bundle.findEntries("/META-INF/" + FEATURE_PATH + "/", "*.xml", false);
while (featuresUrlEnumeration != null && featuresUrlEnumeration.hasMoreElements()) {
URL url = (URL) featuresUrlEnumeration.nextElement();
URI uri = url.toURI();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class Activator implements BundleActivator {

private List<ServiceRegistration<DumpProvider>> registrations;
private ServiceRegistration<DumpProvider> featuresProviderRegistration;
private ServiceRegistration mbeanRegistration;
private ServiceRegistration<?> mbeanRegistration;
private SingleServiceTracker<FeaturesService> featuresServiceTracker;
private ServiceTracker<DumpProvider, DumpProvider> providersTracker;

Expand Down Expand Up @@ -81,14 +81,14 @@ public void stop(BundleContext context) throws Exception {

private String[] getInterfaceNames(Object object) {
List<String> names = new ArrayList<>();
for (Class cl = object.getClass(); cl != Object.class; cl = cl.getSuperclass()) {
for (Class<?> cl = object.getClass(); cl != Object.class; cl = cl.getSuperclass()) {
addSuperInterfaces(names, cl);
}
return names.toArray(new String[names.size()]);
}

private void addSuperInterfaces(List<String> names, Class clazz) {
for (Class cl : clazz.getInterfaces()) {
private void addSuperInterfaces(List<String> names, Class<?> clazz) {
for (Class<?> cl : clazz.getInterfaces()) {
names.add(cl.getName());
addSuperInterfaces(names, cl);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ public class JdbcLoginModuleTest {
private JdbcDataSource dataSource;
private Map<String, Object> options;

@SuppressWarnings("unchecked")
@Before
public void setUp() throws Exception {
// Create datasource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public MBeanServer getServer() throws Exception {
public void init() throws Exception {
if (this.locateExistingServerIfPossible || this.agentId != null) {
try {
List servers = javax.management.MBeanServerFactory.findMBeanServer(agentId);
List<?> servers = javax.management.MBeanServerFactory.findMBeanServer(agentId);
if (servers != null && servers.size() > 0) {
this.server = (MBeanServer) servers.get(0);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public byte[] evaluateResponse(byte[] response) throws SaslException {
// parse the response
// message = [authzid] UTF8NUL authcid UTF8NUL passwd'

Deque<String> tokenList = new ArrayDeque<String>();
Deque<String> tokenList = new ArrayDeque<>();
StringBuilder messageToken = new StringBuilder();
for (byte b : response) {
if (b == 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public Object invoke(Object proxy, Method method, Object[] args) throws Throwabl


try {
return AccessController.doPrivilegedWithCombiner(new PrivilegedExceptionAction<Object>() {
return AccessController.doPrivilegedWithCombiner(new PrivilegedExceptionAction<>() {
@Override
public Object run() throws Exception {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ private void printResource(PrintStream out, Resource resource)
out.println(name);
printUnderline(out, name .length());

Map map = resource.getProperties();
Map<?, ?> map = resource.getProperties();
for (Object o : map.entrySet()) {
Map.Entry entry = (Map.Entry) o;
Map.Entry<?, ?> entry = (Map.Entry<?, ?>) o;
if (entry.getValue().getClass().isArray()) {
out.println(entry.getKey() + ":");
for (int j = 0; j < Array.getLength(entry.getValue()); j++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ private void printResource(PrintStream out, Resource resource) {
out.println(resourceId);
printUnderline(out, resourceId.length());

Map map = resource.getProperties();
Map<?, ?> map = resource.getProperties();
for (Object o : map.entrySet()) {
Map.Entry entry = (Map.Entry) o;
Map.Entry<?, ?> entry = (Map.Entry<?, ?>) o;
if (entry.getValue().getClass().isArray()) {
out.println(entry.getKey() + ":");
for (int j = 0; j < Array.getLength(entry.getValue()); j++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public StaticConfigAdminImpl(BundleContext context, List<Configuration> configs)
Objects.requireNonNull(configs, "configs");
this.context = context;
this.configurations = configs;
ServiceTracker<ManagedService, ManagedService> serviceTracker = new ServiceTracker<ManagedService, ManagedService>(context, ManagedService.class, null) {
ServiceTracker<ManagedService, ManagedService> serviceTracker = new ServiceTracker<>(context, ManagedService.class, null) {
@Override
public ManagedService addingService(ServiceReference<ManagedService> reference) {
ManagedService service = context.getService(reference);
Expand Down Expand Up @@ -79,7 +79,7 @@ public void removedService(ServiceReference<ManagedService> reference, ManagedSe
serviceTracker.open();

ServiceTracker<ManagedServiceFactory, ManagedServiceFactory> factoryTracker
= new ServiceTracker<ManagedServiceFactory, ManagedServiceFactory>(context, ManagedServiceFactory.class, null) {
= new ServiceTracker<>(context, ManagedServiceFactory.class, null) {
@Override
public ManagedServiceFactory addingService(ServiceReference<ManagedServiceFactory> reference) {
ManagedServiceFactory factory = context.getService(reference);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public AggregateServiceTracker(BundleContext bundleContext) {

public <T> void trackList(final Class<T> service, String filter) {
if (multiTrackers.get(service) == null) {
MultiServiceTracker<T> tracker = new MultiServiceTracker<T>(bundleContext, service, filter) {
MultiServiceTracker<T> tracker = new MultiServiceTracker<>(bundleContext, service, filter) {
@Override
public void updateState(List<T> services) {
updateStateMulti(service, services);
Expand All @@ -59,7 +59,7 @@ public void updateState(List<T> services) {
public <T> void trackSingle(final Class<T> service, boolean optional, String filter) {
this.optional.merge(service, optional, Boolean::logicalAnd);
if (singleTrackers.get(service) == null) {
SingleServiceTracker<T> tracker = new SingleServiceTracker<T>(bundleContext, service, filter) {
SingleServiceTracker<T> tracker = new SingleServiceTracker<>(bundleContext, service, filter) {
@Override
public void updateState(T oldSvc, T newSvc) {
updateStateSingle(service, newSvc);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class ShellUtilTest {

@Test
public void testGetValueStringWithCustomCollection() {
List<Integer> data = new AbstractList<Integer>() {
List<Integer> data = new AbstractList<>() {

int[] values = new int[15];
int size = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public class ShellCommand implements Command {

private static final Logger LOGGER = LoggerFactory.getLogger(ShellCommand.class);

private static final Class[] SECURITY_BUGFIX = {
private static final Class<?>[] SECURITY_BUGFIX = {
JaasHelper.class,
JaasHelper.OsgiSubjectDomainCombiner.class,
JaasHelper.DelegatingProtectionDomain.class,
Expand Down
Loading