cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dzmitry Kazimirchyk (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CAY-1619) AdhocObjectFactory: passing factory.newInstance() as parameter causes compilation error
Date Thu, 15 Sep 2011 14:24:08 GMT
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

        

Mime
View raw message