From 3cdcaf96fe8badba5e61da17fa73c03026605d5d Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Fri, 2 Jan 2015 16:09:18 +0100 Subject: [PATCH] better use getter than raw attribute access --- src/main/org/apache/tools/zip/ZipEntry.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/org/apache/tools/zip/ZipEntry.java b/src/main/org/apache/tools/zip/ZipEntry.java index 8031481af..9703aca1d 100644 --- a/src/main/org/apache/tools/zip/ZipEntry.java +++ b/src/main/org/apache/tools/zip/ZipEntry.java @@ -136,9 +136,10 @@ public class ZipEntry extends java.util.zip.ZipEntry implements Cloneable { setInternalAttributes(entry.getInternalAttributes()); setExternalAttributes(entry.getExternalAttributes()); setExtraFields(entry.getExtraFields(true)); - setPlatform(entry.platform); - setGeneralPurposeBit(entry.gpb == null ? null : - (GeneralPurposeBit) entry.gpb.clone()); + setPlatform(entry.getPlatform()); + GeneralPurposeBit other = entry.getGeneralPurposeBit(); + setGeneralPurposeBit(other == null ? null : + (GeneralPurposeBit) other.clone()); } /**