[
https://issues.apache.org/jira/browse/NIFI-16022?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Daniel Stieglitz updated NIFI-16022:
------------------------------------
Description:
Text which begins with multi-line Java comment is misinterpreted by the
StandardResourceReferenceFactory in method createResourceReference as a File
when the ResourceType can be either FILE or TEXT. A case in point is the bug
discovered in NIFI-16021 where a JOLT transform with a multi-line Java comment
e.g.
{code:java}
/*
This is a multi-line Java comment
*/
[
{
"operation": "shift",
"spec": {
"rating": {
"primary": {
"value": "Rating",
"max": "RatingRange"
},
"*": {
"max": "SecondaryRatings.&1.Range",
"value": "SecondaryRatings.&1.Value",
"$": "SecondaryRatings.&1.Id"
}
}
}
},
{
"operation": "default",
"spec": {
"Range": 5,
"SecondaryRatings": {
"*": {
"Range": 5
}
}
}
}
] {code}
is misinterpreted as a file instead of text. The assumption made in this ticket
is that two forward slashes although is a valid Linux path, is not common hence
it should not be interpreted as a file path.
was:
Text which begins with multi-line Java comment is misinterpreted by the
StandardResourceReferenceFactory in method createResourceReference as a File
when the ResourceType can be either FILE or TEXT. A case in point is the bug
discovered in NIFI-16021 where a JOLT transform with a multi-line Java comment
e.g.
{code:java}
{code}
is misinterpreted as a file instead of text. The assumption made in this ticket
is that two forward slashes although is a valid Linux path, is not common hence
it should not be interpreted as a file path.
> StandardResourceReferenceFactory cannot disambiguate between a file path and
> a multi-line Java comment
> ------------------------------------------------------------------------------------------------------
>
> Key: NIFI-16022
> URL: https://issues.apache.org/jira/browse/NIFI-16022
> Project: Apache NiFi
> Issue Type: Bug
> Components: NiFi API
> Reporter: Daniel Stieglitz
> Assignee: Daniel Stieglitz
> Priority: Major
>
> Text which begins with multi-line Java comment is misinterpreted by the
> StandardResourceReferenceFactory in method createResourceReference as a File
> when the ResourceType can be either FILE or TEXT. A case in point is the bug
> discovered in NIFI-16021 where a JOLT transform with a multi-line Java
> comment e.g.
> {code:java}
> /*
> This is a multi-line Java comment
> */
> [
> {
> "operation": "shift",
> "spec": {
> "rating": {
> "primary": {
> "value": "Rating",
> "max": "RatingRange"
> },
> "*": {
> "max": "SecondaryRatings.&1.Range",
> "value": "SecondaryRatings.&1.Value",
> "$": "SecondaryRatings.&1.Id"
> }
> }
> }
> },
> {
> "operation": "default",
> "spec": {
> "Range": 5,
> "SecondaryRatings": {
> "*": {
> "Range": 5
> }
> }
> }
> }
> ] {code}
> is misinterpreted as a file instead of text. The assumption made in this
> ticket is that two forward slashes although is a valid Linux path, is not
> common hence it should not be interpreted as a file path.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)