Commit a11e3034 authored by Liang Ding's avatar Liang Ding

🎨 Cleanup code

parent cd234ef1
......@@ -414,7 +414,7 @@ public class ArticleProcessor {
final int currentPageNum = getTagArticlesPagedCurrentPageNum(request.getRequestURI());
Stopwatchs.start("Get Tag-Articles Paged[tagTitle=" + tagTitle + ", pageNum=" + currentPageNum + ']');
Stopwatchs.start("Get Tag-Articles Paged [tagTitle=" + tagTitle + ", pageNum=" + currentPageNum + ']');
try {
jsonObject.put(Keys.STATUS_CODE, true);
......
......@@ -55,7 +55,7 @@ import java.net.URLEncoder;
* Sitemap processor.
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.0.2.3, Sep 20, 2018
* @version 1.0.2.4, Sep 26, 2018
* @since 0.3.1
*/
@RequestProcessor
......@@ -122,7 +122,7 @@ public class SitemapProcessor {
LOGGER.log(Level.INFO, "Generated sitemap");
renderer.setContent(content);
} catch (final Exception e) {
LOGGER.log(Level.ERROR, "Get blog article feed error", e);
LOGGER.log(Level.ERROR, "Generates sitemap failed", e);
context.getResponse().sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE);
}
......
......@@ -164,10 +164,10 @@ public class TagProcessor {
final int tagArticleCount = tag.getInt(Tag.TAG_PUBLISHED_REFERENCE_COUNT);
final int pageCount = (int) Math.ceil((double) tagArticleCount / (double) pageSize);
LOGGER.log(Level.TRACE, "Paginate tag-articles[currentPageNum={0}, pageSize={1}, pageCount={2}, windowSize={3}]",
LOGGER.log(Level.TRACE, "Paginate tag-articles [currentPageNum={0}, pageSize={1}, pageCount={2}, windowSize={3}]",
currentPageNum, pageSize, pageCount, windowSize);
final List<Integer> pageNums = Paginator.paginate(currentPageNum, pageSize, pageCount, windowSize);
LOGGER.log(Level.TRACE, "tag-articles[pageNums={0}]", pageNums);
LOGGER.log(Level.TRACE, "tag-articles [pageNums={0}]", pageNums);
fillPagination(dataModel, pageCount, currentPageNum, articles, pageNums);
dataModel.put(Common.PATH, "/tags/" + URLEncoder.encode(tagTitle, "UTF-8"));
dataModel.put(Keys.OBJECT_ID, tagId);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment