Skip to content

Commit 45e3c04

Browse files
committed
Use getStringProperty for username/group info
1 parent 33023b9 commit 45e3c04

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

nifi-7zip-processors/src/main/java/co/zeroae/nifi/processors/sevenzip/Unpack7ZipContent.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ private FlowFile createOutFlowFile() throws SevenZipException {
401401

402402
// Step two: Fill in the Filename/Path/Absolute Path
403403
// TODO: convert tgz -> tar, taz -> tar, tbz2 -> tar, etc IFF stringProperty is null or empty.
404-
String stringProperty = (String) inArchive.getProperty(index, PropID.PATH);
404+
String stringProperty = inArchive.getStringProperty(index, PropID.PATH);
405405
final File file = new File(
406406
!(stringProperty == null || stringProperty.isEmpty())
407407
? stringProperty
@@ -419,11 +419,11 @@ private FlowFile createOutFlowFile() throws SevenZipException {
419419
attributes.put(CoreAttributes.ABSOLUTE_PATH.key(), absPathString);
420420

421421
// Step three: USER, GROUP, Dates and Times
422-
stringProperty = (String) inArchive.getProperty(index, PropID.USER);
422+
stringProperty = inArchive.getStringProperty(index, PropID.USER);
423423
if (stringProperty != null && !stringProperty.isEmpty())
424424
attributes.put(FILE_OWNER_ATTRIBUTE, stringProperty);
425425

426-
stringProperty = (String) inArchive.getProperty(index, PropID.GROUP);
426+
stringProperty = inArchive.getStringProperty(index, PropID.GROUP);
427427
if (stringProperty != null && !stringProperty.isEmpty())
428428
attributes.put(FILE_GROUP_ATTRIBUTE, stringProperty);
429429

0 commit comments

Comments
 (0)