You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Joseph Witt (JIRA)" <ji...@apache.org> on 2016/07/16 03:19:20 UTC
[jira] [Commented] (NIFI-1730)
org/apache/nifi/util/ReflectionUtils.java (and possibly other classes)
exist in two different modules under the same FQN
[ https://issues.apache.org/jira/browse/NIFI-1730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15380462#comment-15380462 ]
Joseph Witt commented on NIFI-1730:
-----------------------------------
So we have ReflectionUtils in
- documentation
- nifi-framework-core
- nfii-mock
We could either:
- refactor into a single class and pull that into each as a dependency. Could use 'nifi-utils'. Or could make a 'nifi-nodeps-utils' which strictly is not allowed to have any dependencies beyond the JRE libs. Also, the nifi-documentation and nifi-mock implementations setAccessible to true and it doesn't appear the nifi-framework-api one does. This difference is important and could lead to confusing behavior. I think we should not do it in all of them or do it in all of them. We should also have it support detecting whether there is a SecurityManager and if so check if it has perms to do that security override or not and when it can it should and when it can't it should not. Perhaps.
- just namespace them in packages better so there is no risk of confusion of which is being used. Though there is still the issue of them diverging in behavior.
> org/apache/nifi/util/ReflectionUtils.java (and possibly other classes) exist in two different modules under the same FQN
> ------------------------------------------------------------------------------------------------------------------------
>
> Key: NIFI-1730
> URL: https://issues.apache.org/jira/browse/NIFI-1730
> Project: Apache NiFi
> Issue Type: Bug
> Reporter: Oleg Zhurakousky
> Assignee: Joseph Witt
> Fix For: 1.0.0
>
>
> _org/apache/nifi/util/ReflectionUtils.java_ specifically exists in _framework core_ and _mock_ under the same FQN (see below)
> * https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/util/ReflectionUtils.java
> * https://github.com/apache/nifi/blob/master/nifi-mock/src/main/java/org/apache/nifi/util/ReflectionUtils.java
> This means that if the two versions are not identical one can start seeing something along the lines of this:
> {code}
> java.lang.NoSuchMethodError: org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotations(Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/Object;[Ljava/lang/Object;)V
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)