From a7dc1cbb1889085f8537934a14dee8b0999cd707 Mon Sep 17 00:00:00 2001 From: Matthew Buckett Date: Mon, 13 Jan 2014 22:34:45 +0000 Subject: [PATCH] Use the least specific type. HashMap -> Map so we can switch implementations. --- .../java/org/rometools/feed/module/cc/types/License.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/rometools/feed/module/cc/types/License.java b/src/main/java/org/rometools/feed/module/cc/types/License.java index 60dcf0f..83e1f80 100644 --- a/src/main/java/org/rometools/feed/module/cc/types/License.java +++ b/src/main/java/org/rometools/feed/module/cc/types/License.java @@ -41,6 +41,7 @@ package org.rometools.feed.module.cc.types; import java.util.HashMap; import java.util.Iterator; +import java.util.Map; import java.util.StringTokenizer; import com.sun.syndication.feed.impl.EqualsBean; @@ -52,7 +53,7 @@ import com.sun.syndication.feed.impl.ToStringBean; */ public class License { private static final String CC_START = "http://creativecommons.org/licenses/"; - private static final HashMap lookupLicense = new HashMap(); + private static final Map lookupLicense = new HashMap(); public static final License NO_DERIVS = new License("http://creativecommons.org/licenses/nd/1.0/", new Behaviour[0], new Behaviour[] { Behaviour.DISTRIBUTION, Behaviour.REPRODUCTION }); public static final License NO_DERIVS_NONCOMMERCIAL = new License("http://creativecommons.org/licenses/nd-nc/1.0/", @@ -167,7 +168,7 @@ public class License { } public static class Behaviour { - private static final HashMap lookup = new HashMap(); + private static final Map lookup = new HashMap(); public static final Behaviour REPRODUCTION = new Behaviour("http://web.resource.org/cc/Reproduction"); public static final Behaviour DISTRIBUTION = new Behaviour("http://web.resource.org/cc/Distribution"); public static final Behaviour DERIVATIVE = new Behaviour("http://web.resource.org/cc/DerivativeWorks");