Return-Path: X-Original-To: apmail-falcon-commits-archive@minotaur.apache.org Delivered-To: apmail-falcon-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9F328F679 for ; Fri, 26 Apr 2013 15:50:45 +0000 (UTC) Received: (qmail 95752 invoked by uid 500); 26 Apr 2013 15:50:45 -0000 Delivered-To: apmail-falcon-commits-archive@falcon.apache.org Received: (qmail 95733 invoked by uid 500); 26 Apr 2013 15:50:45 -0000 Mailing-List: contact commits-help@falcon.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@falcon.incubator.apache.org Delivered-To: mailing list commits@falcon.incubator.apache.org Received: (qmail 95702 invoked by uid 99); 26 Apr 2013 15:50:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Apr 2013 15:50:45 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 26 Apr 2013 15:50:41 +0000 Received: (qmail 93782 invoked by uid 99); 26 Apr 2013 15:50:19 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Apr 2013 15:50:19 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 8A19D882082; Fri, 26 Apr 2013 15:50:19 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sriksun@apache.org To: commits@falcon.incubator.apache.org Date: Fri, 26 Apr 2013 15:50:48 -0000 Message-Id: <1178bdeb22f84a379021b584e87d35f2@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [32/47] git commit: More check style fixes relating to common module X-Virus-Checked: Checked by ClamAV on apache.org 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 Authored: Wed Apr 17 16:46:24 2013 +0530 Committer: srikanth.sundarrajan 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 { this.entity = entity; } - //SUSPEND CHECKSTYLE CHECK public void setTag(Tag tag) { this.tag = tag; } @@ -49,7 +48,6 @@ public class WorkflowNameBuilder { public void setSuffixes(List 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 sharedState, Map 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(""); } - //SUSPEND CHECKSTYLE CHECK + //SUSPEND CHECKSTYLE CHECK HiddenFieldCheck @Test public void testConcurrentParsing() throws Exception { List threadList = new ArrayList(); @@ -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 {