From d4b34a05cd30466dfb77b01646606ff46bb5f2af Mon Sep 17 00:00:00 2001 From: Patrick Gotthard Date: Sun, 13 Apr 2014 19:31:05 +0200 Subject: [PATCH] Removed type parameter from CopyFrom interface --- .../com/sun/syndication/feed/CopyFrom.java | 6 +++--- .../syndication/feed/impl/CopyFromHelper.java | 20 +++++++++---------- .../syndication/feed/module/DCModuleImpl.java | 4 ++-- .../syndication/feed/module/DCSubject.java | 2 +- .../feed/module/DCSubjectImpl.java | 4 ++-- .../sun/syndication/feed/module/Module.java | 2 +- .../syndication/feed/module/SyModuleImpl.java | 4 ++-- .../syndication/feed/synd/SyndCategory.java | 2 +- .../feed/synd/SyndCategoryImpl.java | 6 +++--- .../syndication/feed/synd/SyndContent.java | 2 +- .../feed/synd/SyndContentImpl.java | 4 ++-- .../syndication/feed/synd/SyndEnclosure.java | 2 +- .../feed/synd/SyndEnclosureImpl.java | 4 ++-- .../sun/syndication/feed/synd/SyndEntry.java | 2 +- .../syndication/feed/synd/SyndEntryImpl.java | 4 ++-- .../sun/syndication/feed/synd/SyndFeed.java | 2 +- .../syndication/feed/synd/SyndFeedImpl.java | 4 ++-- .../sun/syndication/feed/synd/SyndImage.java | 2 +- .../syndication/feed/synd/SyndImageImpl.java | 4 ++-- 19 files changed, 40 insertions(+), 40 deletions(-) diff --git a/src/main/java/com/sun/syndication/feed/CopyFrom.java b/src/main/java/com/sun/syndication/feed/CopyFrom.java index 177424f..efdc15a 100644 --- a/src/main/java/com/sun/syndication/feed/CopyFrom.java +++ b/src/main/java/com/sun/syndication/feed/CopyFrom.java @@ -20,7 +20,7 @@ package com.sun.syndication.feed; /** * @author Alejandro Abdelnur */ -public interface CopyFrom { +public interface CopyFrom { /** * Returns the interface the copyFrom works on. @@ -31,7 +31,7 @@ public interface CopyFrom { * * @return the interface the copyFrom works on. */ - public Class> getInterface(); + public Class getInterface(); /** * Copies all the properties of the given bean into this one. @@ -45,6 +45,6 @@ public interface CopyFrom { * @param obj the instance to copy properties from. * */ - public void copyFrom(CopyFrom obj); + public void copyFrom(CopyFrom obj); } diff --git a/src/main/java/com/sun/syndication/feed/impl/CopyFromHelper.java b/src/main/java/com/sun/syndication/feed/impl/CopyFromHelper.java index 668cde0..4c697af 100644 --- a/src/main/java/com/sun/syndication/feed/impl/CopyFromHelper.java +++ b/src/main/java/com/sun/syndication/feed/impl/CopyFromHelper.java @@ -46,9 +46,9 @@ public class CopyFromHelper { private static final Set> BASIC_TYPES = new HashSet>(); private static final Object[] NO_PARAMS = new Object[0]; - private final Class> beanInterfaceClass; + private final Class beanInterfaceClass; private final Map> baseInterfaceMap; // ENTRIES(propertyName,interface.class) - private final Map>, Class> baseImplMap; // ENTRIES(interface.class,implementation.class) + private final Map, Class> baseImplMap; // ENTRIES(interface.class,implementation.class) static { BASIC_TYPES.add(Boolean.class); @@ -63,8 +63,8 @@ public class CopyFromHelper { BASIC_TYPES.add(Date.class); } - public CopyFromHelper(final Class> beanInterfaceClass, final Map> basePropInterfaceMap, - final Map>, Class> basePropClassImplMap) { + public CopyFromHelper(final Class beanInterfaceClass, final Map> basePropInterfaceMap, + final Map, Class> basePropClassImplMap) { this.beanInterfaceClass = beanInterfaceClass; baseInterfaceMap = basePropInterfaceMap; baseImplMap = basePropClassImplMap; @@ -104,11 +104,11 @@ public class CopyFromHelper { } - private CopyFrom createInstance(final Class> interfaceClass) throws Exception { + private CopyFrom createInstance(final Class interfaceClass) throws Exception { if (baseImplMap.get(interfaceClass) == null) { return null; } else { - return (CopyFrom) baseImplMap.get(interfaceClass).newInstance(); + return (CopyFrom) baseImplMap.get(interfaceClass).newInstance(); } } @@ -128,11 +128,11 @@ public class CopyFromHelper { value = (T) ((Date) value).clone(); } } else { // it goes CopyFrom - if (value instanceof CopyFrom) { - final CopyFrom source = (CopyFrom) value; - CopyFrom target = (CopyFrom) createInstance(source.getInterface()); + if (value instanceof CopyFrom) { + final CopyFrom source = (CopyFrom) value; + CopyFrom target = (CopyFrom) createInstance(source.getInterface()); if (target == null) { - target = (CopyFrom) value.getClass().newInstance(); + target = (CopyFrom) value.getClass().newInstance(); } target.copyFrom(source); value = (T) target; diff --git a/src/main/java/com/sun/syndication/feed/module/DCModuleImpl.java b/src/main/java/com/sun/syndication/feed/module/DCModuleImpl.java index 6cb1966..e4de7de 100644 --- a/src/main/java/com/sun/syndication/feed/module/DCModuleImpl.java +++ b/src/main/java/com/sun/syndication/feed/module/DCModuleImpl.java @@ -1031,7 +1031,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { } @Override - public final void copyFrom(final CopyFrom obj) { + public final void copyFrom(final CopyFrom obj) { COPY_FROM_HELPER.copy(this, obj); } @@ -1055,7 +1055,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { basePropInterfaceMap.put("coverages", String.class); basePropInterfaceMap.put("rightsList", String.class); - final Map>, Class> basePropClassImplMap = new HashMap>, Class>(); + final Map, Class> basePropClassImplMap = new HashMap, Class>(); basePropClassImplMap.put(DCSubject.class, DCSubjectImpl.class); COPY_FROM_HELPER = new CopyFromHelper(DCModule.class, basePropInterfaceMap, basePropClassImplMap); diff --git a/src/main/java/com/sun/syndication/feed/module/DCSubject.java b/src/main/java/com/sun/syndication/feed/module/DCSubject.java index bd9154b..530c470 100644 --- a/src/main/java/com/sun/syndication/feed/module/DCSubject.java +++ b/src/main/java/com/sun/syndication/feed/module/DCSubject.java @@ -26,7 +26,7 @@ import com.sun.syndication.feed.CopyFrom; * @author Alejandro Abdelnur * */ -public interface DCSubject extends Cloneable, CopyFrom { +public interface DCSubject extends Cloneable, CopyFrom { /** * Returns the DublinCore subject taxonomy URI. *

diff --git a/src/main/java/com/sun/syndication/feed/module/DCSubjectImpl.java b/src/main/java/com/sun/syndication/feed/module/DCSubjectImpl.java index 31af102..5244c52 100644 --- a/src/main/java/com/sun/syndication/feed/module/DCSubjectImpl.java +++ b/src/main/java/com/sun/syndication/feed/module/DCSubjectImpl.java @@ -158,7 +158,7 @@ public class DCSubjectImpl implements Cloneable, Serializable, DCSubject { } @Override - public void copyFrom(final CopyFrom obj) { + public void copyFrom(final CopyFrom obj) { COPY_FROM_HELPER.copy(this, obj); } @@ -169,7 +169,7 @@ public class DCSubjectImpl implements Cloneable, Serializable, DCSubject { basePropInterfaceMap.put("taxonomyUri", String.class); basePropInterfaceMap.put("value", String.class); - final Map>, Class> basePropClassImplMap = Collections.>, Class> emptyMap(); + final Map, Class> basePropClassImplMap = Collections., Class> emptyMap(); COPY_FROM_HELPER = new CopyFromHelper(DCSubject.class, basePropInterfaceMap, basePropClassImplMap); } diff --git a/src/main/java/com/sun/syndication/feed/module/Module.java b/src/main/java/com/sun/syndication/feed/module/Module.java index f822d39..068f91f 100644 --- a/src/main/java/com/sun/syndication/feed/module/Module.java +++ b/src/main/java/com/sun/syndication/feed/module/Module.java @@ -28,7 +28,7 @@ import com.sun.syndication.feed.CopyFrom; * @author Alejandro Abdelnur * */ -public interface Module extends Cloneable, CopyFrom, Serializable { +public interface Module extends Cloneable, CopyFrom, Serializable { /** * Returns the URI of the module. diff --git a/src/main/java/com/sun/syndication/feed/module/SyModuleImpl.java b/src/main/java/com/sun/syndication/feed/module/SyModuleImpl.java index c260fd5..8c54e47 100644 --- a/src/main/java/com/sun/syndication/feed/module/SyModuleImpl.java +++ b/src/main/java/com/sun/syndication/feed/module/SyModuleImpl.java @@ -140,7 +140,7 @@ public class SyModuleImpl extends ModuleImpl implements SyModule { } @Override - public void copyFrom(final CopyFrom obj) { + public void copyFrom(final CopyFrom obj) { COPY_FROM_HELPER.copy(this, obj); } @@ -152,7 +152,7 @@ public class SyModuleImpl extends ModuleImpl implements SyModule { basePropInterfaceMap.put("updateFrequency", Integer.TYPE); basePropInterfaceMap.put("updateBase", Date.class); - final Map>, Class> basePropClassImplMap = Collections.>, Class> emptyMap(); + final Map, Class> basePropClassImplMap = Collections., Class> emptyMap(); COPY_FROM_HELPER = new CopyFromHelper(SyModule.class, basePropInterfaceMap, basePropClassImplMap); } diff --git a/src/main/java/com/sun/syndication/feed/synd/SyndCategory.java b/src/main/java/com/sun/syndication/feed/synd/SyndCategory.java index 9a7b23e..4d9bd33 100644 --- a/src/main/java/com/sun/syndication/feed/synd/SyndCategory.java +++ b/src/main/java/com/sun/syndication/feed/synd/SyndCategory.java @@ -26,7 +26,7 @@ import com.sun.syndication.feed.CopyFrom; * @author Alejandro Abdelnur * */ -public interface SyndCategory extends Cloneable, CopyFrom { +public interface SyndCategory extends Cloneable, CopyFrom { /** * Returns the category name. *

diff --git a/src/main/java/com/sun/syndication/feed/synd/SyndCategoryImpl.java b/src/main/java/com/sun/syndication/feed/synd/SyndCategoryImpl.java index 07a1cd2..58944d1 100644 --- a/src/main/java/com/sun/syndication/feed/synd/SyndCategoryImpl.java +++ b/src/main/java/com/sun/syndication/feed/synd/SyndCategoryImpl.java @@ -180,12 +180,12 @@ public class SyndCategoryImpl implements Serializable, SyndCategory { } @Override - public Class> getInterface() { + public Class getInterface() { return SyndCategory.class; } @Override - public void copyFrom(final CopyFrom obj) { + public void copyFrom(final CopyFrom obj) { COPY_FROM_HELPER.copy(this, obj); } @@ -195,7 +195,7 @@ public class SyndCategoryImpl implements Serializable, SyndCategory { final Map> basePropInterfaceMap = new HashMap>(); basePropInterfaceMap.put("name", String.class); basePropInterfaceMap.put("taxonomyUri", String.class); - final Map>, Class> basePropClassImplMap = Collections.emptyMap(); + final Map, Class> basePropClassImplMap = Collections.emptyMap(); COPY_FROM_HELPER = new CopyFromHelper(SyndCategory.class, basePropInterfaceMap, basePropClassImplMap); } diff --git a/src/main/java/com/sun/syndication/feed/synd/SyndContent.java b/src/main/java/com/sun/syndication/feed/synd/SyndContent.java index 8b9b97b..13a8fbc 100644 --- a/src/main/java/com/sun/syndication/feed/synd/SyndContent.java +++ b/src/main/java/com/sun/syndication/feed/synd/SyndContent.java @@ -25,7 +25,7 @@ import com.sun.syndication.feed.CopyFrom; * @author Alejandro Abdelnur * */ -public interface SyndContent extends Cloneable, CopyFrom { +public interface SyndContent extends Cloneable, CopyFrom { /** * Returns the content type. *

diff --git a/src/main/java/com/sun/syndication/feed/synd/SyndContentImpl.java b/src/main/java/com/sun/syndication/feed/synd/SyndContentImpl.java index d1be4cf..6393f5d 100644 --- a/src/main/java/com/sun/syndication/feed/synd/SyndContentImpl.java +++ b/src/main/java/com/sun/syndication/feed/synd/SyndContentImpl.java @@ -181,7 +181,7 @@ public class SyndContentImpl implements Serializable, SyndContent { } @Override - public void copyFrom(final CopyFrom obj) { + public void copyFrom(final CopyFrom obj) { COPY_FROM_HELPER.copy(this, obj); } @@ -192,7 +192,7 @@ public class SyndContentImpl implements Serializable, SyndContent { basePropInterfaceMap.put("type", String.class); basePropInterfaceMap.put("value", String.class); - final Map>, Class> basePropClassImplMap = Collections.>, Class> emptyMap(); + final Map, Class> basePropClassImplMap = Collections., Class> emptyMap(); COPY_FROM_HELPER = new CopyFromHelper(SyndContent.class, basePropInterfaceMap, basePropClassImplMap); } diff --git a/src/main/java/com/sun/syndication/feed/synd/SyndEnclosure.java b/src/main/java/com/sun/syndication/feed/synd/SyndEnclosure.java index 7ff822a..3cbefa7 100644 --- a/src/main/java/com/sun/syndication/feed/synd/SyndEnclosure.java +++ b/src/main/java/com/sun/syndication/feed/synd/SyndEnclosure.java @@ -5,7 +5,7 @@ import com.sun.syndication.feed.CopyFrom; /** * @author Alejandro Abdelnur */ -public interface SyndEnclosure extends Cloneable, CopyFrom { +public interface SyndEnclosure extends Cloneable, CopyFrom { /** * Returns the enclosure URL. *

diff --git a/src/main/java/com/sun/syndication/feed/synd/SyndEnclosureImpl.java b/src/main/java/com/sun/syndication/feed/synd/SyndEnclosureImpl.java index 3834f9b..78cf425 100644 --- a/src/main/java/com/sun/syndication/feed/synd/SyndEnclosureImpl.java +++ b/src/main/java/com/sun/syndication/feed/synd/SyndEnclosureImpl.java @@ -153,7 +153,7 @@ public class SyndEnclosureImpl implements Serializable, SyndEnclosure { } @Override - public void copyFrom(final CopyFrom obj) { + public void copyFrom(final CopyFrom obj) { COPY_FROM_HELPER.copy(this, obj); } @@ -165,7 +165,7 @@ public class SyndEnclosureImpl implements Serializable, SyndEnclosure { basePropInterfaceMap.put("type", String.class); basePropInterfaceMap.put("length", Long.TYPE); - final Map>, Class> basePropClassImplMap = Collections.>, Class> emptyMap(); + final Map, Class> basePropClassImplMap = Collections., Class> emptyMap(); COPY_FROM_HELPER = new CopyFromHelper(SyndEnclosure.class, basePropInterfaceMap, basePropClassImplMap); } diff --git a/src/main/java/com/sun/syndication/feed/synd/SyndEntry.java b/src/main/java/com/sun/syndication/feed/synd/SyndEntry.java index 05e3cfd..f93c04e 100644 --- a/src/main/java/com/sun/syndication/feed/synd/SyndEntry.java +++ b/src/main/java/com/sun/syndication/feed/synd/SyndEntry.java @@ -32,7 +32,7 @@ import com.sun.syndication.feed.module.Module; * @author Alejandro Abdelnur * */ -public interface SyndEntry extends Cloneable, CopyFrom, Extendable { +public interface SyndEntry extends Cloneable, CopyFrom, Extendable { /** * Returns the entry URI. diff --git a/src/main/java/com/sun/syndication/feed/synd/SyndEntryImpl.java b/src/main/java/com/sun/syndication/feed/synd/SyndEntryImpl.java index 6980992..3789fe6 100644 --- a/src/main/java/com/sun/syndication/feed/synd/SyndEntryImpl.java +++ b/src/main/java/com/sun/syndication/feed/synd/SyndEntryImpl.java @@ -483,7 +483,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry { } @Override - public void copyFrom(final CopyFrom obj) { + public void copyFrom(final CopyFrom obj) { COPY_FROM_HELPER.copy(this, obj); } @@ -501,7 +501,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry { basePropInterfaceMap.put("modules", Module.class); basePropInterfaceMap.put("categories", SyndCategory.class); - final Map>, Class> basePropClassImplMap = new HashMap>, Class>(); + final Map, Class> basePropClassImplMap = new HashMap, Class>(); basePropClassImplMap.put(SyndContent.class, SyndContentImpl.class); basePropClassImplMap.put(SyndEnclosure.class, SyndEnclosureImpl.class); basePropClassImplMap.put(SyndCategory.class, SyndCategoryImpl.class); diff --git a/src/main/java/com/sun/syndication/feed/synd/SyndFeed.java b/src/main/java/com/sun/syndication/feed/synd/SyndFeed.java index 16f722b..1a31606 100644 --- a/src/main/java/com/sun/syndication/feed/synd/SyndFeed.java +++ b/src/main/java/com/sun/syndication/feed/synd/SyndFeed.java @@ -35,7 +35,7 @@ import com.sun.syndication.feed.module.Module; * @author Alejandro Abdelnur * */ -public interface SyndFeed extends Cloneable, CopyFrom, Extendable { +public interface SyndFeed extends Cloneable, CopyFrom, Extendable { /** * Returns the real feed types the SyndFeedImpl supports when converting from and to. diff --git a/src/main/java/com/sun/syndication/feed/synd/SyndFeedImpl.java b/src/main/java/com/sun/syndication/feed/synd/SyndFeedImpl.java index b0cff2e..4bbcf35 100644 --- a/src/main/java/com/sun/syndication/feed/synd/SyndFeedImpl.java +++ b/src/main/java/com/sun/syndication/feed/synd/SyndFeedImpl.java @@ -762,7 +762,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed { } @Override - public void copyFrom(final CopyFrom obj) { + public void copyFrom(final CopyFrom obj) { COPY_FROM_HELPER.copy(this, obj); } @@ -783,7 +783,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed { basePropInterfaceMap.put("modules", Module.class); basePropInterfaceMap.put("categories", SyndCategory.class); - final Map>, Class> basePropClassImplMap = new HashMap>, Class>(); + final Map, Class> basePropClassImplMap = new HashMap, Class>(); basePropClassImplMap.put(SyndEntry.class, SyndEntryImpl.class); basePropClassImplMap.put(SyndImage.class, SyndImageImpl.class); basePropClassImplMap.put(SyndCategory.class, SyndCategoryImpl.class); diff --git a/src/main/java/com/sun/syndication/feed/synd/SyndImage.java b/src/main/java/com/sun/syndication/feed/synd/SyndImage.java index 38c2932..386c5ff 100644 --- a/src/main/java/com/sun/syndication/feed/synd/SyndImage.java +++ b/src/main/java/com/sun/syndication/feed/synd/SyndImage.java @@ -26,7 +26,7 @@ import com.sun.syndication.feed.CopyFrom; * @author Alejandro Abdelnur * */ -public interface SyndImage extends Cloneable, CopyFrom { +public interface SyndImage extends Cloneable, CopyFrom { /** * Returns the image title. *

diff --git a/src/main/java/com/sun/syndication/feed/synd/SyndImageImpl.java b/src/main/java/com/sun/syndication/feed/synd/SyndImageImpl.java index 9f823ce..c283fbe 100644 --- a/src/main/java/com/sun/syndication/feed/synd/SyndImageImpl.java +++ b/src/main/java/com/sun/syndication/feed/synd/SyndImageImpl.java @@ -204,7 +204,7 @@ public class SyndImageImpl implements Serializable, SyndImage { } @Override - public void copyFrom(final CopyFrom syndImage) { + public void copyFrom(final CopyFrom syndImage) { COPY_FROM_HELPER.copy(this, syndImage); } @@ -217,7 +217,7 @@ public class SyndImageImpl implements Serializable, SyndImage { basePropInterfaceMap.put("link", String.class); basePropInterfaceMap.put("description", String.class); - final Map>, Class> basePropClassImplMap = Collections.>, Class> emptyMap(); + final Map, Class> basePropClassImplMap = Collections., Class> emptyMap(); COPY_FROM_HELPER = new CopyFromHelper(SyndImage.class, basePropInterfaceMap, basePropClassImplMap); }