This is an automated email from the ASF dual-hosted git repository. rombert pushed a commit to annotated tag org.apache.sling.commons.osgi-2.0.6 in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-osgi.git
commit 629278b8169dd52b3aa4a326c5bcdb1e579d3ca1 Author: Carsten Ziegeler <[email protected]> AuthorDate: Fri Sep 25 15:19:57 2009 +0000 Use generics. git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/commons/osgi@818879 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/java/org/apache/sling/commons/osgi/OsgiUtil.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/apache/sling/commons/osgi/OsgiUtil.java b/src/main/java/org/apache/sling/commons/osgi/OsgiUtil.java index 7c02c03..8a912d3 100644 --- a/src/main/java/org/apache/sling/commons/osgi/OsgiUtil.java +++ b/src/main/java/org/apache/sling/commons/osgi/OsgiUtil.java @@ -110,20 +110,20 @@ public class OsgiUtil { * <code>defaultValue</code> if no such reference property exists or if * the property is not an <code>Double</code> and cannot be converted to * an <code>Double</code> from the property's string value. - * + * * @deprecated since 2.0.4, use {@link #toDouble(Object, double)} instead */ @Deprecated public static double getProperty(Object propValue, double defaultValue) { return toDouble(propValue, defaultValue); } - + /** * Returns the named service reference property as a double or the * <code>defaultValue</code> if no such reference property exists or if * the property is not an <code>Double</code> and cannot be converted to * an <code>Double</code> from the property's string value. - * + * * @since 2.0.4 */ public static double toDouble(Object propValue, double defaultValue) { @@ -155,7 +155,7 @@ public class OsgiUtil { } else if (propValue.getClass().isArray()) { Object[] prop = (Object[]) propValue; return prop.length > 0 ? prop[0] : null; - } else if (propValue instanceof Collection) { + } else if (propValue instanceof Collection<?>) { Collection<?> prop = (Collection<?>) propValue; return prop.isEmpty() ? null : prop.iterator().next(); } else { @@ -210,7 +210,7 @@ public class OsgiUtil { } return values.toArray(new String[values.size()]); - } else if (propValue instanceof Collection) { + } else if (propValue instanceof Collection<?>) { // collection Collection<?> valueCollection = (Collection<?>) propValue; List<String> valueList = new ArrayList<String>(valueCollection.size()); -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
