Cannot @Inject array-typed fields
---------------------------------

                 Key: TAP5-1360
                 URL: https://issues.apache.org/jira/browse/TAP5-1360
             Project: Tapestry 5
          Issue Type: Bug
          Components: tapestry-core
    Affects Versions: 5.2.4, 5.2.5
            Reporter: Jochen Kemnade
            Priority: Minor


I was trying to inject symbol into a String[]-typed page class like 

@Inject
@Symbol(SymbolConstants.SUPPORTED_LOCALES)
private String[] supportedLocales;

This leads to
org.apache.tapestry5.internal.services.TransformationException: Error obtaining 
injected value for field org.example.pages.Index.supportedLocales: 
java.lang.ClassNotFoundException: java/lang/String[]

The problem here is that InternalClassTransformationImpl.toClass(String) tries 
to invoke Class.forName("java.lang.String[]", true, 
classFactory.getClassLoader()); which leads to the ClassNotFoundException.
I attached a patch and a test case.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to