Permalink
Browse files

removing dead code and cleaning some warnings

  • Loading branch information...
1 parent 6d8cc89 commit d07ec635edf7544b37d24cfedfceaf4a90465cda @csokol csokol committed Jan 28, 2013
@@ -2,8 +2,6 @@
import java.util.List;
-import org.apache.log4j.Logger;
-
import br.com.caelum.tubaina.parser.SimpleIndentator;
import br.com.caelum.tubaina.parser.Tag;
import br.com.caelum.tubaina.parser.html.desktop.SyntaxHighlighter;
@@ -14,7 +12,6 @@
public static final String BEGIN_END = ">";
public static final String END = "</pre>";
private SyntaxHighlighter htmlCodeHighlighter;
- private static final Logger LOG = Logger.getLogger(HtmlAndKindleCodeTag.class);
private CodeTagOptionsParser codeTagOptionsParser;
public HtmlAndKindleCodeTag(SyntaxHighlighter htmlCodeHighlighter) {
@@ -45,6 +45,7 @@ public String parseImage(String text, String options) {
return new ImageTag().parse(text, options);
}
+ @Deprecated
public String parseJava(String text, String options) {
String string = new JavaTag(new SimpleIndentator(4))
.parse(text, options);
@@ -70,6 +71,7 @@ public String parseList(String text, String options) {
return new ListTag().parse(text, options);
}
+ @Deprecated
public String parseXml(String text, String options) {
text = this.sanitizer.sanitize(text);
String string = new XmlTag(new SimpleIndentator(4)).parse(text, options);
@@ -129,6 +131,7 @@ public String parseCenteredParagraph(String content) {
return new CenteredParagraphTag().parse(content, null);
}
+ @Deprecated
public String parseRuby(String content, String options) {
return new RubyTag(new SimpleIndentator(4)).parse(content, options);
}
@@ -61,6 +61,7 @@ public String parseImage(String text, String options) {
return new ImageTag().parse(text, options);
}
+ @Deprecated
public String parseJava(String text, String options) {
String string = new JavaTag(new SimpleIndentator(4))
.parse(text, options);
@@ -93,6 +94,7 @@ public String parseList(String text, String options) {
return string;
}
+ @Deprecated
public String parseXml(String text, String options) {
return new XmlTag(new SimpleIndentator(4)).parse(text, options)
+ VSPACE;
@@ -147,6 +149,7 @@ public String parseCenteredParagraph(String content) {
return new CenteredParagraphTag().parse(content, null);
}
+ @Deprecated
public String parseRuby(String content, String options) {
String result = new RubyTag(new SimpleIndentator(4)).parse(content,
options);
@@ -37,7 +37,8 @@ public void testReplacesCorrectList() {
Assert.assertEquals(ListChunk.class, chunks.get(0).getClass());
}
- @Test
+ @SuppressWarnings("unchecked")
+ @Test
public void testCreateSublistsProperly() throws Exception {
String list = "[list number]\n" + " * primeiro item number\n" + " [list roman]\n"
+ " *primeiro item roman\n" + " [list letter]\n" + " *primeiro item letter\n"
@@ -78,13 +78,6 @@ public void testGenerateBookWithSections() {
Assert.assertEquals(1, countOccurrences(toc, "href=\"unico/index.html#1-2-duas\""));
}
- private Book createBook(final String bookText) {
- BookBuilder builder = new BookBuilder("Title");
- builder.addReaderFromString(bookText);
- Book b = builder.build();
- return b;
- }
-
private int countOccurrences(final String text, final String substring) {
String[] tokens = text.split(substring);
return tokens.length - 1;
@@ -36,7 +36,6 @@ public void gistedCodeIsRetrievedAndUsed() throws Exception {
@Test
public void gistedCodeIsParsedWithLineNumbers() throws Exception {
- String gistedCode = "GivenCode";
String options = "417835 #";
long gistId = 417835;
@@ -174,7 +174,6 @@ public void testGeneratorForStudentTextbook() throws IOException {
containsText(texFile, "uma nota para o instrutor"));
}
- @SuppressWarnings("unchecked")
private boolean containsText(File texFile, String text) throws IOException {
List<String> lines = FileUtils.readLines(texFile);
boolean containsText = false;

0 comments on commit d07ec63

Please sign in to comment.