You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by ri...@apache.org on 2010/05/11 22:07:54 UTC
svn commit: r943262 - in
/felix/trunk/framework/src/main/java/org/apache/felix/framework:
ServiceRegistrationImpl.java resolver/ResolverImpl.java util/Util.java
Author: rickhall
Date: Tue May 11 20:07:53 2010
New Revision: 943262
URL: http://svn.apache.org/viewvc?rev=943262&view=rev
Log:
Stick to Java 1.4 methods or earlier.
Modified:
felix/trunk/framework/src/main/java/org/apache/felix/framework/ServiceRegistrationImpl.java
felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/ResolverImpl.java
felix/trunk/framework/src/main/java/org/apache/felix/framework/util/Util.java
Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/ServiceRegistrationImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/ServiceRegistrationImpl.java?rev=943262&r1=943261&r2=943262&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/ServiceRegistrationImpl.java (original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/ServiceRegistrationImpl.java Tue May 11 20:07:53 2010
@@ -412,7 +412,7 @@ class ServiceRegistrationImpl implements
public List<Directive> getDirectives()
{
- return Collections.emptyList();
+ return Util.m_emptyList;
}
public Attribute getAttribute(String name)
@@ -423,12 +423,12 @@ class ServiceRegistrationImpl implements
public List<Attribute> getAttributes()
{
- return Collections.emptyList();
+ return Util.m_emptyList;
}
public List<String> getUses()
{
- return Collections.emptyList();
+ return Util.m_emptyList;
}
public Object getProperty(String s)
Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/ResolverImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/ResolverImpl.java?rev=943262&r1=943261&r2=943262&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/ResolverImpl.java (original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/ResolverImpl.java Tue May 11 20:07:53 2010
@@ -35,6 +35,7 @@ import org.apache.felix.framework.capabi
import org.apache.felix.framework.capabilityset.CapabilitySet;
import org.apache.felix.framework.capabilityset.Directive;
import org.apache.felix.framework.capabilityset.Requirement;
+import org.apache.felix.framework.util.Util;
import org.apache.felix.framework.util.manifestparser.RequirementImpl;
import org.osgi.framework.Constants;
@@ -47,7 +48,7 @@ public class ResolverImpl implements Res
private static boolean m_isInvokeCount = false;
// Reusable empty array.
- private static final List<Wire> m_emptyWires = Collections.emptyList();
+ private static final List<Wire> m_emptyWires = Util.m_emptyList;
// Holds candidate permutations based on permutating "uses" chains.
// These permutations are given higher priority.
@@ -1317,7 +1318,7 @@ System.out.println("RE: Candidate not re
return sources;
}
- return Collections.emptyList();
+ return Util.m_emptyList;
}
private static List<Capability> getPackageSourcesInternal(
Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/util/Util.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/util/Util.java?rev=943262&r1=943261&r2=943262&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/util/Util.java (original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/util/Util.java Tue May 11 20:07:53 2010
@@ -21,6 +21,7 @@ package org.apache.felix.framework.util;
import java.io.*;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -37,6 +38,8 @@ import org.osgi.framework.ServiceReferen
public class Util
{
+ public static final List m_emptyList = Collections.unmodifiableList(new ArrayList());
+
/**
* Converts a module identifier to a bundle identifier. Module IDs
* are typically <tt><bundle-id>.<revision></tt>; this