Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

buglabs-osgi: remove redundant Arrays.asList().

  • Loading branch information...
commit 9706e7541ab4dd2422518b0d98693d19c414b10a 1 parent 5d507c3
@kgilmer kgilmer authored
View
6 com.buglabs.common/com/buglabs/util/osgi/FilterUtil.java
@@ -64,7 +64,7 @@ public static String generateServiceFilter(String clazz) {
* @return A LDAP filter string that can be used to construct a Filter. If null passed in, null is returned to caller.
*/
public static String generateServiceFilter(String ... services) {
- return generateServiceFilter(Arrays.asList(services));
+ return generateServiceFilter(services);
}
/**
@@ -98,9 +98,7 @@ public static String generateServiceFilter(List<String> services) {
* @throws InvalidSyntaxException thrown if a syntax error is found in the generated Filter.
*/
public static Filter generateServiceFilter(BundleContext context, String[] services) throws InvalidSyntaxException {
- String filterString = generateServiceFilter(Arrays.asList(services));
-
- return context.createFilter(filterString);
+ return context.createFilter(generateServiceFilter(services));
}
/**
View
2  com.buglabs.common/com/buglabs/util/osgi/ServiceTrackerUtil.java
@@ -159,7 +159,7 @@ public void run() {
Dictionary<String, Object> dict = new Hashtable<String, Object>();
if (arg0.getPropertyKeys() != null) {
- for (String key : Arrays.asList(arg0.getPropertyKeys())) {
+ for (String key : arg0.getPropertyKeys()) {
dict.put(key, arg0.getProperty(key));
}
}
View
2  com.buglabs.osgi.sewing/com/buglabs/osgi/sewing/pub/SewingController.java
@@ -187,7 +187,7 @@ protected final void redirectTo(String url) {
* @return true if all keys are present, false otherwise
*/
protected final String getMissingParameter(RequestParameters params, String ... requiredKeys) {
- for (String key: Arrays.asList(requiredKeys))
+ for (String key: requiredKeys)
if (params.get(key) == null)
return key;
View
4 com.buglabs.osgi.tester/com/buglabs/osgi/tester/BundleTestRunnerThread.java
@@ -55,7 +55,7 @@ public void run() {
if (srefs != null && srefs.length > 0) {
- for (ServiceReference sr : Arrays.asList(srefs)) {
+ for (ServiceReference sr : srefs) {
TestSuite ts = (TestSuite) context.getService(sr);
if (ts != null)
@@ -80,7 +80,7 @@ public void run() {
}
//Shutdown all the bundles
- for (Bundle bundle : Arrays.asList(context.getBundles())) {
+ for (Bundle bundle : context.getBundles()) {
if (bundle.getBundleId() != 0) {
try {
bundle.stop();

1 comment on commit 9706e75

@jconnolly

@kgilmer I had to revert this locally. Davis discovered that the result of this code is the following: https://gist.github.com/b2112bf64775b940f9b5

I reverted it and everything worked as expected.

Please sign in to comment.
Something went wrong with that request. Please try again.