Yes. Please create a jira and attach patch :) Thanks;
--Gurkan ________________________________ From: James Carman <[email protected]> To: [email protected] Sent: Tuesday, June 16, 2009 4:58:10 AM Subject: ContextFactory switch statements... In the code for org.apache.webbeans.context.ContextFactory, we currently have: switch (type.getName()) { case 0: context = getRequestContext(); break; case 1: context = getSessionContext(); break; case 2: context = getApplicationContext(); break; case 3: context = getConversationContext(); break; case 4: context = getDependentContext(); break; default: throw new IllegalArgumentException("There is no such a standard context with name id=" + type.getName()); } This should be changed to (the Java language supports switching on enum values): switch (type) { case REQUEST: context = getRequestContext(); break; case SESSION: context = getSessionContext(); break; case APPLICATION: context = getApplicationContext(); break; case CONVERSATION: context = getConversationContext(); break; case DEPENDENT: context = getDependentContext(); break; default: throw new IllegalArgumentException("There is no such a standard context with name id=" + type.getName()); } This is much more readable.
