Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9C25D1057E for ; Fri, 11 Oct 2013 16:50:55 +0000 (UTC) Received: (qmail 78506 invoked by uid 500); 11 Oct 2013 16:50:51 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 78345 invoked by uid 500); 11 Oct 2013 16:50:46 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 78253 invoked by uid 99); 11 Oct 2013 16:50:43 -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, 11 Oct 2013 16:50:43 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 4DC4C915822; Fri, 11 Oct 2013 16:50:43 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: kocka@apache.org To: commits@cloudstack.apache.org Message-Id: <38599abb00d64fcb952244a426c487fc@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: updated refs/heads/master to 982db55 Date: Fri, 11 Oct 2013 16:50:43 +0000 (UTC) Updated Branches: refs/heads/master fa0c685bc -> 982db550e test fix: no assertion on the number of fileds returned Removed the assertion on the number of fields from ReflectUtil because it did not work with bytecode manipulation like what sonar works with. Signed-off-by: Laszlo Hornyak Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/982db550 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/982db550 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/982db550 Branch: refs/heads/master Commit: 982db550eb3ccac16aa92a76e4f4abf87377c04f Parents: fa0c685 Author: Laszlo Hornyak Authored: Fri Oct 11 18:47:08 2013 +0200 Committer: Laszlo Hornyak Committed: Fri Oct 11 18:49:10 2013 +0200 ---------------------------------------------------------------------- utils/test/com/cloud/utils/ReflectUtilTest.java | 4 ---- 1 file changed, 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/982db550/utils/test/com/cloud/utils/ReflectUtilTest.java ---------------------------------------------------------------------- diff --git a/utils/test/com/cloud/utils/ReflectUtilTest.java b/utils/test/com/cloud/utils/ReflectUtilTest.java index fc1cda6..baa5dd8 100644 --- a/utils/test/com/cloud/utils/ReflectUtilTest.java +++ b/utils/test/com/cloud/utils/ReflectUtilTest.java @@ -115,7 +115,6 @@ public final class ReflectUtilTest { public void getAllFieldsForClassWithFoo() throws NoSuchFieldException, SecurityException { Set fooFields = ReflectUtil.getAllFieldsForClass(Foo.class, new Class [] {}); Assert.assertNotNull(fooFields); - Assert.assertEquals(2, fooFields.size()); Assert.assertTrue(fooFields.contains(Foo.class.getDeclaredField("fooField"))); Assert.assertTrue(fooFields.contains(Foo.class.getDeclaredField("fooIntField"))); } @@ -124,7 +123,6 @@ public final class ReflectUtilTest { public void getAllFieldsForClassWithBar() throws NoSuchFieldException, SecurityException { Set barFields = ReflectUtil.getAllFieldsForClass(Bar.class, new Class [] {}); Assert.assertNotNull(barFields); - Assert.assertEquals(4, barFields.size()); Assert.assertTrue(barFields.contains(Foo.class.getDeclaredField("fooField"))); Assert.assertTrue(barFields.contains(Foo.class.getDeclaredField("fooIntField"))); Assert.assertTrue(barFields.contains(Bar.class.getDeclaredField("barField"))); @@ -135,7 +133,6 @@ public final class ReflectUtilTest { public void getAllFieldsForClassWithBarWithoutFoo() throws NoSuchFieldException, SecurityException { Set barFields = ReflectUtil.getAllFieldsForClass(Bar.class, new Class [] {Foo.class}); Assert.assertNotNull(barFields); - Assert.assertEquals(2, barFields.size()); Assert.assertTrue(barFields.contains(Bar.class.getDeclaredField("barField"))); Assert.assertTrue(barFields.contains(Bar.class.getDeclaredField("barIntField"))); } @@ -144,7 +141,6 @@ public final class ReflectUtilTest { public void getAllFieldsForClassWithBazWithoutBar() throws NoSuchFieldException, SecurityException { Set bazFields = ReflectUtil.getAllFieldsForClass(Baz.class, new Class [] {Bar.class}); Assert.assertNotNull(bazFields); - Assert.assertEquals(4, bazFields.size()); Assert.assertTrue(bazFields.contains(Foo.class.getDeclaredField("fooField"))); Assert.assertTrue(bazFields.contains(Foo.class.getDeclaredField("fooIntField"))); Assert.assertTrue(bazFields.contains(Baz.class.getDeclaredField("bazField")));