kinow commented on code in PR #366:
URL: https://github.com/apache/commons-imaging/pull/366#discussion_r1518975813
##########
src/main/java/org/apache/commons/imaging/formats/tiff/write/TiffOutputField.java:
##########
@@ -66,6 +66,11 @@ public boolean bytesEqual(final byte[] data) {
return Arrays.equals(bytes, data);
}
+ /* Only used in tests. */
+ protected boolean bytesEqual(final TiffOutputField other) {
+ return Arrays.equals(bytes, other.bytes);
+ }
+
protected AbstractTiffOutputItem getSeperateValue() {
Review Comment:
Oh, a typo. Will fix in another PR.
##########
src/test/java/org/apache/commons/imaging/formats/tiff/write/TiffOutputFieldTestUtil.java:
##########
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.imaging.formats.tiff.write;
+
+public class TiffOutputFieldTestUtil {
Review Comment:
(There is some code in `BinaryFunctions` related to this; anyway, for a
future PR :+1: )
##########
src/test/java/org/apache/commons/imaging/formats/tiff/write/TiffOutputFieldTestUtil.java:
##########
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.imaging.formats.tiff.write;
+
+public class TiffOutputFieldTestUtil {
Review Comment:
Will delete this class and simply use `Arrays.equals`. Can't see a reason to
have the methods used for testing (and in one `if` statement in the code) while
the other parsers use `Arrays.equals`. Please, do not update the PR with this,
I have a working copy now.
--
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]