[hibernate-issues] [Hibernate-JIRA] Issue Comment Edited: (HHH-5363) DetachedCriteria getCriteriaImpl() method should be protected instead of default
Tobias Seelinger (JIRA)
noreply at atlassian.com
Thu Jul 8 12:22:13 EDT 2010
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-5363?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=37672#action_37672 ]
Tobias Seelinger edited comment on HHH-5363 at 7/8/10 11:20 AM:
----------------------------------------------------------------
An Unit Test checking the desired state:
{code}
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import org.hibernate.criterion.DetachedCriteria;
import junit.framework.TestCase;
public class HHH5363Test extends TestCase {
public void test_getCriteriaImplIsProtected() throws SecurityException, NoSuchMethodException {
Method method = DetachedCriteria.class.getDeclaredMethod("getCriteriaImpl", null);
int modifiers = method.getModifiers();
assertTrue("DetachedCriteria.getCriteriaImpl() is not protected or public.",
Modifier.isProtected(modifiers) || Modifier.isPublic(modifiers));
}
}
{code}
was (Author: takashi):
An Unit Test checking the desired state:
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import org.hibernate.criterion.DetachedCriteria;
import junit.framework.TestCase;
public class HHH5363Test extends TestCase {
public void test_getCriteriaImplIsProtected() throws SecurityException, NoSuchMethodException {
Method method = DetachedCriteria.class.getDeclaredMethod("getCriteriaImpl", null);
int modifiers = method.getModifiers();
assertTrue("DetachedCriteria.getCriteriaImpl() is not protected or public.",
Modifier.isProtected(modifiers) || Modifier.isPublic(modifiers));
}
}
> DetachedCriteria getCriteriaImpl() method should be protected instead of default
> --------------------------------------------------------------------------------
>
> Key: HHH-5363
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5363
> Project: Hibernate Core
> Issue Type: Improvement
> Components: core
> Affects Versions: 3.5.0-Final
> Reporter: Tobias Seelinger
>
> The method getCriteriaImpl() in org.hibernate.criterion.DetachedCriteria is not usable in a subclass outside the same package. I think it should be at least protected to gain access to the additional attributes of the embedded CriteriaImpl that aren't supported by DetachedCriteria yet.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list