garydgregory commented on code in PR #784:
URL: https://github.com/apache/commons-io/pull/784#discussion_r2366416013


##########
src/main/java/org/apache/commons/io/build/AbstractOrigin.java:
##########
@@ -203,7 +452,7 @@ public CharSequenceOrigin(final CharSequence origin) {
         @Override
         public byte[] getByteArray() {
             // TODO Pass in a Charset? Consider if call sites actually need 
this.
-            return origin.toString().getBytes(Charset.defaultCharset());
+            return 
getCharSequence(null).toString().getBytes(Charset.defaultCharset());

Review Comment:
   How is this change related to Channels? This is a giant PR already. Can it 
be focused on just the new feature? Or is this a bug fix?



##########
src/main/java/org/apache/commons/io/build/AbstractOrigin.java:
##########
@@ -267,7 +521,7 @@ public FileOrigin(final File origin) {
 
         @Override
         public byte[] getByteArray(final long position, final int length) 
throws IOException {
-            try (RandomAccessFile raf = 
RandomAccessFileMode.READ_ONLY.create(origin)) {
+            try (RandomAccessFile raf = 
RandomAccessFileMode.READ_ONLY.create(getFile())) {

Review Comment:
   How is this change related to Channels? This is a giant PR already. Can it 
be focused on just the new feature? Or is this a bug fix?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to