Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Error: Cannot switch on a value of type String. Only convertible int values or enum constants are permitted EVEN WITH JDK 1.7.

I have to build a project which has a code that uses the 'String in switch case' feature. Even though the compiler is set to jdk 1.7, the build fails showing that error. I checked the compiler settings in my sandbox, and set jdk 1.7 everywhere. The error is not shown in my sandbox, but then when I build, compilation error pops up saying "Cannot switch on a value of type String. Only convertible int values or enum constants are permitted". Even in build tool, the compiler is set to jdk 1.7
What can be the possible issue??

I use 
IBM Rational® Application Developer for WebSphere® Software

Version: 9.1.1
Build ID: RADO911-I20141014_1328.
Build Forge as Build tool.

0 votes


Be the first one to answer this question!

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Nov 04 '16, 12:55 a.m.

Question was seen: 5,769 times

Last updated: Nov 04 '16, 12:55 a.m.

Confirmation Cancel Confirm