Added SLF4J to ROME

This commit is contained in:
Patrick Gotthard 2013-11-15 18:48:01 +01:00
parent c3288555ab
commit 02bc40d398
3 changed files with 21 additions and 6 deletions

View file

@ -198,6 +198,11 @@
<artifactId>jdom</artifactId> <artifactId>jdom</artifactId>
<version>2.0.2</version> <version>2.0.2</version>
</dependency> </dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.5</version>
</dependency>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>

View file

@ -30,6 +30,9 @@ import java.util.Map;
import java.util.Map.Entry; import java.util.Map.Entry;
import java.util.Set; import java.util.Set;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/** /**
* Provides deep <b>Bean</b> clonning support. * Provides deep <b>Bean</b> clonning support.
* <p> * <p>
@ -42,7 +45,10 @@ import java.util.Set;
* *
*/ */
public class CloneableBean implements Serializable, Cloneable { public class CloneableBean implements Serializable, Cloneable {
private static final long serialVersionUID = -6520053043831187823L; private static final long serialVersionUID = -6520053043831187823L;
private static final Logger LOG = LoggerFactory.getLogger(CloneableBean.class);
private static final Class<?>[] NO_PARAMS_DEF = new Class[0]; private static final Class<?>[] NO_PARAMS_DEF = new Class[0];
private static final Object[] NO_PARAMS = new Object[0]; private static final Object[] NO_PARAMS = new Object[0];
@ -186,11 +192,11 @@ public class CloneableBean implements Serializable, Cloneable {
} }
} }
} }
} catch (final CloneNotSupportedException cnsEx) { } catch (final CloneNotSupportedException e) {
throw cnsEx; LOG.error("Error while cloning bean", e);
} catch (final Exception ex) { throw e;
System.out.println(ex); } catch (final Exception e) {
ex.printStackTrace(System.out); LOG.error("Error while cloning bean", e);
throw new CloneNotSupportedException("Cannot clone a " + obj.getClass() + " object"); throw new CloneNotSupportedException("Cannot clone a " + obj.getClass() + " object");
} }
return clonedBean; return clonedBean;

View file

@ -23,6 +23,8 @@ import java.util.Locale;
import org.jdom2.Content; import org.jdom2.Content;
import org.jdom2.Element; import org.jdom2.Element;
import org.jdom2.output.XMLOutputter; import org.jdom2.output.XMLOutputter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.sun.syndication.feed.WireFeed; import com.sun.syndication.feed.WireFeed;
import com.sun.syndication.feed.rss.Category; import com.sun.syndication.feed.rss.Category;
@ -36,6 +38,8 @@ import com.sun.syndication.feed.rss.Source;
/** /**
*/ */
public class RSS092Parser extends RSS091UserlandParser { public class RSS092Parser extends RSS091UserlandParser {
private static final Logger LOG = LoggerFactory.getLogger(RSS092Parser.class);
public RSS092Parser() { public RSS092Parser() {
this("rss_0.92"); this("rss_0.92");
@ -179,7 +183,7 @@ public class RSS092Parser extends RSS091UserlandParser {
sb.append(c.getValue()); sb.append(c.getValue());
break; break;
case EntityRef: case EntityRef:
System.out.println("entity: " + c.getValue()); LOG.debug("Entity: {}", c.getValue());
sb.append(c.getValue()); sb.append(c.getValue());
break; break;
case Element: case Element: