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>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.5</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>

View file

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

View file

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