falcon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From srik...@apache.org
Subject [32/47] git commit: More check style fixes relating to common module
Date Fri, 26 Apr 2013 15:50:48 GMT
More check style fixes relating to common module


Project: http://git-wip-us.apache.org/repos/asf/incubator-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-falcon/commit/9bfdf3bb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-falcon/tree/9bfdf3bb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-falcon/diff/9bfdf3bb

Branch: refs/heads/master
Commit: 9bfdf3bb2236496e1f16f0722004902e8c347c23
Parents: 968f197
Author: srikanth.sundarrajan <srikanth.sundarrajan@inmobi.com>
Authored: Wed Apr 17 16:46:24 2013 +0530
Committer: srikanth.sundarrajan <srikanth.sundarrajan@inmobi.com>
Committed: Wed Apr 17 16:46:24 2013 +0530

----------------------------------------------------------------------
 .../apache/falcon/entity/WorkflowNameBuilder.java  |    2 -
 .../apache/falcon/security/FalconLoginModule.java  |    8 +++++-
 .../falcon/entity/parser/FeedEntityParserTest.java |   17 ++++++++-------
 .../falcon/entity/parser/FeedUpdateTest.java       |    3 +-
 .../entity/parser/ProcessEntityParserTest.java     |    9 ++++---
 5 files changed, 21 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/9bfdf3bb/common/src/main/java/org/apache/falcon/entity/WorkflowNameBuilder.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/falcon/entity/WorkflowNameBuilder.java b/common/src/main/java/org/apache/falcon/entity/WorkflowNameBuilder.java
index a1216e7..6890594 100644
--- a/common/src/main/java/org/apache/falcon/entity/WorkflowNameBuilder.java
+++ b/common/src/main/java/org/apache/falcon/entity/WorkflowNameBuilder.java
@@ -41,7 +41,6 @@ public class WorkflowNameBuilder<T extends Entity> {
         this.entity = entity;
     }
 
-    //SUSPEND CHECKSTYLE CHECK
     public void setTag(Tag tag) {
         this.tag = tag;
     }
@@ -49,7 +48,6 @@ public class WorkflowNameBuilder<T extends Entity> {
     public void setSuffixes(List<String> suffixes) {
         this.suffixes = suffixes;
     }
-    //RESUME CHECKSTYLE CHECK
 
     public WorkflowName getWorkflowName() {
         return new WorkflowName(PREFIX, entity.getEntityType().name(),

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/9bfdf3bb/common/src/main/java/org/apache/falcon/security/FalconLoginModule.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/falcon/security/FalconLoginModule.java b/common/src/main/java/org/apache/falcon/security/FalconLoginModule.java
index 4f4542c..d95e147 100644
--- a/common/src/main/java/org/apache/falcon/security/FalconLoginModule.java
+++ b/common/src/main/java/org/apache/falcon/security/FalconLoginModule.java
@@ -37,6 +37,10 @@ public class FalconLoginModule implements LoginModule {
 
     private Subject subject;
 
+    public Subject getSubject() {
+        return subject;
+    }
+
     @Override
     public boolean abort() throws LoginException {
         return true;
@@ -65,13 +69,13 @@ public class FalconLoginModule implements LoginModule {
         throw new LoginException("No such user " + subject);
     }
 
-    //SUSPEND CHECKSTYLE CHECK
+    //SUSPEND CHECKSTYLE CHECK HiddenFieldCheck
     @Override
     public void initialize(Subject subject, CallbackHandler callbackHandler,
                            Map<String, ?> sharedState, Map<String, ?> options)
{
         this.subject = subject;
     }
-    //RESUME CHECKSTYLE CHECK
+    //RESUME CHECKSTYLE CHECK HiddenFieldCheck
 
     @Override
     public boolean login() throws LoginException {

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/9bfdf3bb/common/src/test/java/org/apache/falcon/entity/parser/FeedEntityParserTest.java
----------------------------------------------------------------------
diff --git a/common/src/test/java/org/apache/falcon/entity/parser/FeedEntityParserTest.java
b/common/src/test/java/org/apache/falcon/entity/parser/FeedEntityParserTest.java
index ff8cc46..1d24e6c 100644
--- a/common/src/test/java/org/apache/falcon/entity/parser/FeedEntityParserTest.java
+++ b/common/src/test/java/org/apache/falcon/entity/parser/FeedEntityParserTest.java
@@ -145,7 +145,6 @@ public class FeedEntityParserTest extends AbstractTestBase {
     }
 
 
-    //SUSPEND CHECKSTYLE CHECK
     @Test
     public void testPartitionExpression() throws FalconException {
         Feed feed = (Feed) parser.parseAndValidate(ProcessEntityParserTest.class
@@ -161,6 +160,7 @@ public class FeedEntityParserTest extends AbstractTestBase {
             parser.validate(feed);
             Assert.fail("Expected ValidationException");
         } catch (ValidationException ignore) {
+            //ignore
         }
 
         //When there are more than 1 src clusters, the partition expression should contain
cluster variable
@@ -169,6 +169,7 @@ public class FeedEntityParserTest extends AbstractTestBase {
             parser.validate(feed);
             Assert.fail("Expected ValidationException");
         } catch (ValidationException ignore) {
+            //ignore
         }
 
         //When there are more than 1 target cluster, there should be partition expre
@@ -177,6 +178,7 @@ public class FeedEntityParserTest extends AbstractTestBase {
             parser.validate(feed);
             Assert.fail("Expected ValidationException");
         } catch (ValidationException ignore) {
+            //ignore
         }
 
         //When there are more than 1 target clusters, the partition expression should contain
cluster variable
@@ -185,6 +187,7 @@ public class FeedEntityParserTest extends AbstractTestBase {
             parser.validate(feed);
             Assert.fail("Expected ValidationException");
         } catch (ValidationException ignore) {
+            //ignore
         }
 
         //Number of parts in partition expression < number of partitions defined for feed
@@ -193,6 +196,7 @@ public class FeedEntityParserTest extends AbstractTestBase {
             parser.validate(feed);
             Assert.fail("Expected ValidationException");
         } catch (ValidationException ignore) {
+            //ignore
         }
 
         feed.getClusters().getClusters().get(0).setPartition(null);
@@ -201,7 +205,6 @@ public class FeedEntityParserTest extends AbstractTestBase {
         feed.setPartitions(null);
         parser.validate(feed);
     }
-    //RESUME CHECKSTYLE CHECK
 
     @Test
     public void testInvalidClusterValidityTime() {
@@ -333,7 +336,6 @@ public class FeedEntityParserTest extends AbstractTestBase {
         ConfigurationStore.get().publish(EntityType.FEED, feed1);
     }
 
-    //SUSPEND CHECKSTYLE CHECK
     @Test
     public void testInvalidGroupNames() throws FalconException, JAXBException {
         Feed feed1 = (Feed) EntityType.FEED.getUnmarshaller().unmarshal(
@@ -345,25 +347,24 @@ public class FeedEntityParserTest extends AbstractTestBase {
             feed1.setGroups("commaend,");
             parser.parseAndValidate(feed1.toString());
             Assert.fail("Expected exception");
-        } catch (FalconException e) {
-
+        } catch (FalconException ignore) {
+            //ignore
         }
         try {
             feed1.setGroups("group8,   group9");
             parser.parseAndValidate(feed1.toString());
             Assert.fail("Expected exception");
         } catch (FalconException e) {
-
+            //ignore
         }
         try {
             feed1.setGroups("space in group,group9");
             parser.parseAndValidate(feed1.toString());
             Assert.fail("Expected exception");
         } catch (FalconException e) {
-
+            //ignore
         }
     }
-    //RESUME CHECKSTYLE CHECK
 
     @Test
     public void testClusterPartitionExp() throws FalconException {

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/9bfdf3bb/common/src/test/java/org/apache/falcon/entity/parser/FeedUpdateTest.java
----------------------------------------------------------------------
diff --git a/common/src/test/java/org/apache/falcon/entity/parser/FeedUpdateTest.java b/common/src/test/java/org/apache/falcon/entity/parser/FeedUpdateTest.java
index 35ca217..e887fee 100644
--- a/common/src/test/java/org/apache/falcon/entity/parser/FeedUpdateTest.java
+++ b/common/src/test/java/org/apache/falcon/entity/parser/FeedUpdateTest.java
@@ -112,7 +112,6 @@ public class FeedUpdateTest extends AbstractTestBase {
         }
     }
 
-    //SUSPEND CHECKSTYLE CHECK
     @Test
     public void testFeedUpdateWithViolations() throws Exception {
         ConfigurationStore.get().remove(EntityType.FEED, "clicks");
@@ -137,7 +136,7 @@ public class FeedUpdateTest extends AbstractTestBase {
                     .getResourceAsStream(FEED1_XML));
             Assert.fail("Expected feed parsing to fail");
         } catch (ValidationException ignore) {
+            //ignore
         }
     }
-    //RESUME CHECKSTYLE CHECK
 }

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/9bfdf3bb/common/src/test/java/org/apache/falcon/entity/parser/ProcessEntityParserTest.java
----------------------------------------------------------------------
diff --git a/common/src/test/java/org/apache/falcon/entity/parser/ProcessEntityParserTest.java
b/common/src/test/java/org/apache/falcon/entity/parser/ProcessEntityParserTest.java
index af9fddd..fd15062 100644
--- a/common/src/test/java/org/apache/falcon/entity/parser/ProcessEntityParserTest.java
+++ b/common/src/test/java/org/apache/falcon/entity/parser/ProcessEntityParserTest.java
@@ -117,7 +117,6 @@ public class ProcessEntityParserTest extends AbstractTestBase {
         // TODO for retry and late policy
     }
 
-    //SUSPEND CHECKSTYLE CHECK
     @Test
     public void testELExpressions() throws Exception {
         Process process = parser.parseAndValidate(getClass().getResourceAsStream(PROCESS_XML));
@@ -126,6 +125,7 @@ public class ProcessEntityParserTest extends AbstractTestBase {
             parser.validate(process);
             throw new AssertionError("Expected ValidationException!");
         } catch (ValidationException e) {
+            //ignore
         }
 
         process.getInputs().getInputs().get(0).setStart("today(0,0)");
@@ -134,6 +134,7 @@ public class ProcessEntityParserTest extends AbstractTestBase {
             parser.validate(process);
             throw new AssertionError("Expected ValidationException!");
         } catch (ValidationException e) {
+            //ignore
         }
 
         process.getInputs().getInputs().get(0).setStart("today(2,0)");
@@ -142,9 +143,9 @@ public class ProcessEntityParserTest extends AbstractTestBase {
             parser.validate(process);
             throw new AssertionError("Expected ValidationException!");
         } catch (ValidationException e) {
+            //ignore
         }
     }
-    //RESUME CHECKSTYLE CHECK
 
     @Test(expectedExceptions = FalconException.class)
     public void doParseInvalidXML() throws IOException, FalconException {
@@ -165,7 +166,7 @@ public class ProcessEntityParserTest extends AbstractTestBase {
         parser.parseAndValidate("<process></process>");
     }
 
-    //SUSPEND CHECKSTYLE CHECK
+    //SUSPEND CHECKSTYLE CHECK HiddenFieldCheck
     @Test
     public void testConcurrentParsing() throws Exception {
         List<Thread> threadList = new ArrayList<Thread>();
@@ -189,7 +190,7 @@ public class ProcessEntityParserTest extends AbstractTestBase {
             thread.join();
         }
     }
-    //RESUME CHECKSTYLE CHECK
+    //RESUME CHECKSTYLE CHECK HiddenFieldCheck
 
     @Test(expectedExceptions = ValidationException.class)
     public void testInvalidProcessValidity() throws Exception {


Mime
View raw message