commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1763729 - /commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/segments/GenericSegment.java
Date Fri, 07 Oct 2016 10:21:03 GMT
Author: sebb
Date: Fri Oct  7 10:21:03 2016
New Revision: 1763729

URL: http://svn.apache.org/viewvc?rev=1763729&view=rev
Log:
The getter clones already

Modified:
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/segments/GenericSegment.java

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/segments/GenericSegment.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/segments/GenericSegment.java?rev=1763729&r1=1763728&r2=1763729&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/segments/GenericSegment.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/segments/GenericSegment.java
Fri Oct  7 10:21:03 2016
@@ -35,7 +35,7 @@ public abstract class GenericSegment ext
     public GenericSegment(final int marker, final byte[] bytes) {
         super(marker, bytes.length);
 
-        this.segmentData = bytes;
+        this.segmentData = bytes.clone();
     }
 
     @Override



Mime
View raw message