You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Dzmitry Kazimirchyk (JIRA)" <ji...@apache.org> on 2011/09/15 16:24:08 UTC
[jira] [Created] (CAY-1619) AdhocObjectFactory: passing
factory.newInstance() as parameter causes compilation error
AdhocObjectFactory: passing factory.newInstance() as parameter causes compilation error
---------------------------------------------------------------------------------------
Key: CAY-1619
URL: https://issues.apache.org/jira/browse/CAY-1619
Project: Cayenne
Issue Type: Bug
Components: Core Library
Affects Versions: 3.1M4
Reporter: Dzmitry Kazimirchyk
Priority: Minor
Passing AdhocObjectFactory.newInstance(....) as parameter or using it in ternary operator causes compilation error on Jenkins.
We have following method declaration:
<T> T newInstance(Class<? super T> superType, String className);
If we pass it as a parameter to other method:
createBuilder(objectFactory.newInstance(JdbcAdapter.class, JdbcAdapter.class.getName()));
Jenkins compiler will throw following error message:
cannot find symbol
symbol : method createBuilder(java.lang.Object)
location: class org.apache.cayenne.access.jdbc.SoftDeleteBatchQueryBuilderTest
Same thing will occur if we using it in ternary operator.
Unfortunately I can't reproduce it locally, probably this is something compiler specific. As a workaround we can assign returned value to local variable and then pass it as parameter. But definitely it is worth to log this here.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira