You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2017/11/29 13:30:28 UTC
[myfaces-tobago] 05/07: TOBAGO-1782: Clean up * imports * unneeded
null check
This is an automated email from the ASF dual-hosted git repository.
lofwyr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git
commit 032da88b5b67a05a462dfeae9be4865323d26e1a
Author: Udo Schnurpfeil <lo...@apache.org>
AuthorDate: Wed Nov 29 10:13:14 2017 +0100
TOBAGO-1782: Clean up
* imports
* unneeded null check
---
.../apache/myfaces/tobago/internal/context/DateTimeI18n.java | 2 +-
.../apache/myfaces/tobago/apt/processor/TaglibGenerator.java | 12 ++++++------
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/DateTimeI18n.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/DateTimeI18n.java
index 10f33af..3ae814d 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/DateTimeI18n.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/DateTimeI18n.java
@@ -53,7 +53,7 @@ public class DateTimeI18n {
for (int i = 0; i < monthNames.length; i++) {
monthNames[i] = dateFormatMMMMM.format(calendar.getTime());
monthNamesShort[i] = dateFormatMMM.format(calendar.getTime());
- calendar.add(java.util.Calendar.MONTH, 1);
+ calendar.add(Calendar.MONTH, 1);
}
final SimpleDateFormat dateFormatEEEEE = new SimpleDateFormat("EEEEE", locale);
diff --git a/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/processor/TaglibGenerator.java b/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/processor/TaglibGenerator.java
index 7303e6d..ef1cd12 100644
--- a/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/processor/TaglibGenerator.java
+++ b/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/processor/TaglibGenerator.java
@@ -284,7 +284,7 @@ public class TaglibGenerator extends AbstractGenerator {
}
final UIComponentTagAttribute attributeTag = typeElement.getAnnotation(UIComponentTagAttribute.class);
if (attributeTag != null) {
- if (null != attributeTag.type() && attributeTag.type().length > 0) {
+ if (attributeTag.type().length > 0) {
description.append("<br />Type: <code>")
.append(attributeTag.type().length == 1 ? attributeTag.type()[0] : Arrays.toString(attributeTag.type()))
.append("</code>");
@@ -440,21 +440,21 @@ public class TaglibGenerator extends AbstractGenerator {
}
}
- protected void addComment(final String text, final org.w3c.dom.Element parent, final Document document) {
+ protected void addComment(final String text, final Element parent, final Document document) {
final Comment comment = document.createComment(text);
parent.appendChild(comment);
}
protected void addLeafTextElement(
- final String text, final String node, final org.w3c.dom.Element parent, final Document document) {
- final org.w3c.dom.Element element = document.createElement(node);
+ final String text, final String node, final Element parent, final Document document) {
+ final Element element = document.createElement(node);
element.appendChild(document.createTextNode(text));
parent.appendChild(element);
}
protected void addLeafCDATAElement(
- final String text, final String node, final org.w3c.dom.Element parent, final Document document) {
- final org.w3c.dom.Element element = document.createElement(node);
+ final String text, final String node, final Element parent, final Document document) {
+ final Element element = document.createElement(node);
element.appendChild(document.createCDATASection(text));
parent.appendChild(element);
}
--
To stop receiving notification emails like this one, please contact
"commits@myfaces.apache.org" <co...@myfaces.apache.org>.