You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apex.apache.org by vr...@apache.org on 2015/09/26 06:11:45 UTC
[27/34] incubator-apex-core git commit: APEX-156 #resolve #comment
using ImportOrder instead of CustomImportOrderModule
APEX-156 #resolve #comment using ImportOrder instead of CustomImportOrderModule
Project: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/commit/77aa6a2e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/tree/77aa6a2e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/diff/77aa6a2e
Branch: refs/heads/feature-module
Commit: 77aa6a2e339cf0ff16956b062040634e98ba38fe
Parents: 3d30347
Author: Chandni Singh <cs...@apache.org>
Authored: Thu Sep 24 21:53:08 2015 -0700
Committer: Chandni Singh <cs...@apache.org>
Committed: Fri Sep 25 11:11:17 2015 -0700
----------------------------------------------------------------------
apex_checks.xml | 15 +++++++++------
api/pom.xml | 2 +-
bufferserver/pom.xml | 2 +-
common/pom.xml | 2 +-
engine/pom.xml | 2 +-
.../java/org/apache/log4j/DTLoggerFactory.java | 18 ++++++++++--------
pom.xml | 7 +++++++
7 files changed, 30 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/77aa6a2e/apex_checks.xml
----------------------------------------------------------------------
diff --git a/apex_checks.xml b/apex_checks.xml
index b4b3277..24ce9df 100644
--- a/apex_checks.xml
+++ b/apex_checks.xml
@@ -135,13 +135,16 @@
<property name="caseIndent" value="2"/>
</module>
- <module name="CustomImportOrder">
- <property name="thirdPartyPackageRegExp" value=".*"/>
- <property name="specialImportsRegExp" value="com.datatorrent"/>
- <property name="sortImportsInGroupAlphabetically" value="true"/>
- <property name="customImportOrderRules"
- value="STATIC###STANDARD_JAVA_PACKAGE###THIRD_PARTY_PACKAGE###SPECIAL_IMPORTS"/>
+ <module name="ImportOrder">
+ <property name="groups" value="/^javax?\./,org,com,*,/com\.datatorrent/"/>
+ <property name="ordered" value="true"/>
+ <property name="separated" value="true"/>
+ <property name="option" value="above"/>
+ <property name="sortStaticImportsAlphabetically" value="true"/>
</module>
+
+ <module name="RedundantImport"/>
+ <module name="UnusedImports"/>
<module name="MethodParamPad"/>
</module>
http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/77aa6a2e/api/pom.xml
----------------------------------------------------------------------
diff --git a/api/pom.xml b/api/pom.xml
index 52fc5a7..067c40a 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -89,7 +89,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
- <maxAllowedViolations>46</maxAllowedViolations>
+ <maxAllowedViolations>42</maxAllowedViolations>
</configuration>
</plugin>
</plugins>
http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/77aa6a2e/bufferserver/pom.xml
----------------------------------------------------------------------
diff --git a/bufferserver/pom.xml b/bufferserver/pom.xml
index 6cc9725..2341550 100644
--- a/bufferserver/pom.xml
+++ b/bufferserver/pom.xml
@@ -59,7 +59,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
- <maxAllowedViolations>139</maxAllowedViolations>
+ <maxAllowedViolations>123</maxAllowedViolations>
</configuration>
</plugin>
</plugins>
http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/77aa6a2e/common/pom.xml
----------------------------------------------------------------------
diff --git a/common/pom.xml b/common/pom.xml
index 7bd61c1..20a9d1b 100644
--- a/common/pom.xml
+++ b/common/pom.xml
@@ -74,7 +74,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
- <maxAllowedViolations>88</maxAllowedViolations>
+ <maxAllowedViolations>77</maxAllowedViolations>
</configuration>
</plugin>
</plugins>
http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/77aa6a2e/engine/pom.xml
----------------------------------------------------------------------
diff --git a/engine/pom.xml b/engine/pom.xml
index 94dd3a6..32f2001 100644
--- a/engine/pom.xml
+++ b/engine/pom.xml
@@ -145,7 +145,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
- <maxAllowedViolations>2385</maxAllowedViolations>
+ <maxAllowedViolations>2248</maxAllowedViolations>
</configuration>
</plugin>
</plugins>
http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/77aa6a2e/engine/src/main/java/org/apache/log4j/DTLoggerFactory.java
----------------------------------------------------------------------
diff --git a/engine/src/main/java/org/apache/log4j/DTLoggerFactory.java b/engine/src/main/java/org/apache/log4j/DTLoggerFactory.java
index 6464d09..04a4238 100644
--- a/engine/src/main/java/org/apache/log4j/DTLoggerFactory.java
+++ b/engine/src/main/java/org/apache/log4j/DTLoggerFactory.java
@@ -46,7 +46,7 @@ public class DTLoggerFactory implements LoggerFactory
private static DTLoggerFactory SINGLETON;
- public synchronized static DTLoggerFactory getInstance()
+ public static synchronized DTLoggerFactory getInstance()
{
if (SINGLETON == null) {
SINGLETON = new DTLoggerFactory();
@@ -57,10 +57,13 @@ public class DTLoggerFactory implements LoggerFactory
private final ConcurrentMap<String, Logger> loggerMap;
private final Map<String, Level> patternLevel;
- public ImmutableMap<String, String> getPatternLevels() {
- return ImmutableMap.copyOf(Maps.transformValues(patternLevel, new Function<Level, String>(){
+ public ImmutableMap<String, String> getPatternLevels()
+ {
+ return ImmutableMap.copyOf(Maps.transformValues(patternLevel, new Function<Level, String>()
+ {
@Override
- public String apply(Level input) {
+ public String apply(Level input)
+ {
return input == null ? "" : input.toString();
}
}));
@@ -92,8 +95,7 @@ public class DTLoggerFactory implements LoggerFactory
changeLoggersLevel(targetChanges);
}
initialized = true;
- }
- else {
+ } else {
LOG.warn("DT Logger Factory already initialized.");
}
}
@@ -120,8 +122,7 @@ public class DTLoggerFactory implements LoggerFactory
}
if (wider.charAt(i) != finer.charAt(i)) {
break;
- }
- else if (i == wider.length() - 1) {
+ } else if (i == wider.length() - 1) {
remove = true;
}
}
@@ -209,6 +210,7 @@ public class DTLoggerFactory implements LoggerFactory
{
initialized = false;
}
+
private void initialize()
{
if (!initialized) {
http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/77aa6a2e/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 28cee71..6da75f7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -293,6 +293,13 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.16</version>
+ <dependencies>
+ <dependency>
+ <groupId>com.puppycrawl.tools</groupId>
+ <artifactId>checkstyle</artifactId>
+ <version>6.9</version>
+ </dependency>
+ </dependencies>
<executions>
<execution>
<id>checkstyle</id>