Return-Path: X-Original-To: apmail-zookeeper-user-archive@www.apache.org Delivered-To: apmail-zookeeper-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 62BA0C60D for ; Thu, 13 Nov 2014 14:26:49 +0000 (UTC) Received: (qmail 64160 invoked by uid 500); 13 Nov 2014 14:26:48 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 64118 invoked by uid 500); 13 Nov 2014 14:26:48 -0000 Mailing-List: contact user-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@zookeeper.apache.org Delivered-To: mailing list user@zookeeper.apache.org Received: (qmail 64106 invoked by uid 99); 13 Nov 2014 14:26:48 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Nov 2014 14:26:48 +0000 X-ASF-Spam-Status: No, hits=1.0 required=5.0 tests=FORGED_YAHOO_RCVD,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of fpjunqueira@yahoo.com designates 98.139.213.144 as permitted sender) Received: from [98.139.213.144] (HELO nm29-vm1.bullet.mail.bf1.yahoo.com) (98.139.213.144) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Nov 2014 14:26:20 +0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s2048; d=yahoo.com; b=B/tanBsKtbVg13UAEl2WgQQ/u7rdc0hM4BkVTD/Yg63kxvaOV3nf4P4GuBEcK074S3EuKZEUkn7VD9Qtfp6oSZkVvotXV552J354oUvRKuTYSd6ZVKyYX48nE+/9Z4Tbk47lCqilXGOFin2jtH88FL+u27168GzMoNy3ENWQWrKRL5NkAbWXg86tDL8hGF1v1phEiIOXxw7xW/xIiMyLWFY78Hl38bHi3Agjb9IGkog8doLWG0rrA24KBKqmCZjY6TLawIkSphHleHcjiQ3283hw6cHdVm+TOmITQJKzB51xKxcIEJyIKcAVhUxVG6JsTEhInhmd+mMqSg/zSTdQAA==; Received: from [66.196.81.170] by nm29.bullet.mail.bf1.yahoo.com with NNFMP; 13 Nov 2014 14:23:10 -0000 Received: from [98.139.213.15] by tm16.bullet.mail.bf1.yahoo.com with NNFMP; 13 Nov 2014 14:23:10 -0000 Received: from [127.0.0.1] by smtp115.mail.bf1.yahoo.com with NNFMP; 13 Nov 2014 14:23:10 -0000 X-Yahoo-Newman-Id: 50391.97278.bm@smtp115.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: jQEPCd4VM1nX4P3xkUx43.pynLhl2CXBLA7p3.3gFALv3OC nux3FNf8ymbJFNZWxktFDN7RODqWuCmYuEde3jAwG6xqE.N3rXT7Zr2RkDR_ mCVLYDPCM2ILmCE4zzoStvwywJhdzHtgss0uYw01diJwlyjKjxaJlkbV3OHN JZhD0wQkMoc8691LYt1FG1_JeW9ld9PON1L97DzmlsKYk.1ETBMuzfTQ.ii2 tSDe.xYuh742XH89ucvvXHfQwGSpc.NCxPu2zQ4PmKmxHtIA3KTOYWyVY6iZ B8mpcb85kg2e6BXZNwmmxdsK3p2aD5r73NVtXKg17GpYpy6XQ9UwM1mxslJc 3I15K1CwJ.F391Oe.u09Sz4OeHdC_Jx_7sfreqOSP_uwZa0UnoeOMtVklP38 lfqp2.mVbhgBbd5CuSB.7yjTkgKIFChOgmBCuu1u2WjFmZnt6.qPd0PJN5qZ 8zeYymKkxAnQ.juCMgB9ZzOCppk05QSnTaIZ0CfpnA4kyVmo21b4_8DtKXyN uoPSv_Owjcvr3Xj7cCvxkdwvec920HKpcrAcAr0eYnO6BbpbQFefnrhB7m_w oRMq9F5RxN3RN9lfwnAjCFjPRDWgCEbX0b0ZVfPYF6MQTRIbInv_T.izD.xX eUA1oXzRFBQ-- X-Yahoo-SMTP: HT5UJDeswBACWJPOeualxAa.da..S.fl Content-Type: text/plain; charset=gb18030 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: =?gb18030?Q?Re=3A_Bug_413368_=A8C_Type_Cannot_switch_on_a_value_?= =?gb18030?Q?of_type_=2E=2E=2E_Only_convertible_int_values=2C_str?= =?gb18030?Q?ings_or_enum_variables_are_permitted?= From: Flavio Junqueira X-Priority: 3 In-Reply-To: <201411132039265062096@163.com> Date: Thu, 13 Nov 2014 14:23:07 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201411131616449583266@163.com>, <201411132002130674833@163.com>, <087a01cfff3c$6fda1e80$4f8e5b80$@yahoo.com> <201411132039265062096@163.com> To: user@zookeeper.apache.org X-Mailer: Apple Mail (2.1878.6) X-Virus-Checked: Checked by ClamAV on apache.org I'm actually able to compile just fine with the 1.7.0_51 jdk on eclipse. = But, to be fair, I do remember some time back having this issue. I think = eclipse was just not pointing to the right jdk, but again I can't = remember for sure. -Flavio On 13 Nov 2014, at 12:39, bit1129@163.com wrote: > Thanks Flavio for the reply.=20 > The details is that I am trying to compile the zookeeper codebase from = trunk http://svn.apache.org/repos/asf/zookeeper/trunk/ >=20 > And I am using Java1.7.0_51. >=20 >=20 >=20 > bit1129@163.com >=20 > =B7=A2=BC=FE=C8=CB=A3=BA FPJ > =B7=A2=CB=CD=CA=B1=BC=E4=A3=BA 2014-11-13 20:22 > =CA=D5=BC=FE=C8=CB=A3=BA user@zookeeper.apache.org > =D6=F7=CC=E2=A3=BA RE: Bug 413368 =A8C Type Cannot switch on a value = of type ... Only convertible int values, strings or enum variables are = permitted > What are you trying to compile? Is it trunk or distro? What version of = java > are you using? >=20 > -Flavio >=20 >> -----Original Message----- >> From: bit1129@163.com [mailto:bit1129@163.com] >> Sent: 13 November 2014 12:02 >> To: dev@zookeeper.apache.org; user@zookeeper.apache.org >> Subject: =BB=D8=B8=B4: Bug 413368 =A8C Type Cannot switch on a value = of type ... > Only >> convertible int values, strings or enum variables are permitted >>=20 >> No one likes to answer this question? >>=20 >>=20 >>=20 >> bit1129@163.com >>=20 >> =B7=A2=BC=FE=C8=CB=A3=BA bit1129@163.com >> =B7=A2=CB=CD=CA=B1=BC=E4=A3=BA 2014-11-13 16:16 >> =CA=D5=BC=FE=C8=CB=A3=BA dev; user >> =D6=F7=CC=E2=A3=BA Bug 413368 =A8C Type Cannot switch on a value of = type ... Only >> convertible int values, strings or enum variables are permitted I = download >> the zookeeper codebase and setup the eclipse project with Ant, but I = got > the >> following compiling error: >>=20 >> Description Resource Path Location Type Cannot switch on a value of = type >> AuthFastLeaderElection.ToSend.mType. Only convertible int values, = strings >> or enum variables are permitted AuthFastLeaderElection.java >> /ZooKeeper/src/java/main/org/apache/zookeeper/server/quorum line 116 >> Java Problem >>=20 >> I see that this is a long existing eclipse >> bug(https://bugs.eclipse.org/bugs/show_bug.cgi?id=3D413368), but = there is no >> definite workaround there. >> I just wonder to know how you guys workaround this problem when >> developing zookeeper, thanks. >>=20 >>=20 >>=20 >>=20 >>=20 >>=20 >> bit1129@163.com >=20