You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2025/07/13 09:58:43 UTC

(httpcomponents-core) branch iofunction updated (18dcf3270 -> 080583913)

This is an automated email from the ASF dual-hosted git repository.

olegk pushed a change to branch iofunction
in repository https://gitbox.apache.org/repos/asf/httpcomponents-core.git


 discard 18dcf3270 IOFunction functional interface
     new 080583913 IOFunction functional interface

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (18dcf3270)
            \
             N -- N -- N   refs/heads/iofunction (080583913)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 httpcore5/src/main/java/org/apache/hc/core5/function/IOFunction.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


(httpcomponents-core) 01/01: IOFunction functional interface

Posted by ol...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

olegk pushed a commit to branch iofunction
in repository https://gitbox.apache.org/repos/asf/httpcomponents-core.git

commit 0805839138e477e4db42b4145eb7e0ffd5805572
Author: Arturo Bernal <ab...@apache.org>
AuthorDate: Sun Jul 13 11:57:05 2025 +0200

    IOFunction functional interface
---
 .../org/apache/hc/core5/function/IOFunction.java   | 52 ++++++++++++++++++++++
 1 file changed, 52 insertions(+)

diff --git a/httpcore5/src/main/java/org/apache/hc/core5/function/IOFunction.java b/httpcore5/src/main/java/org/apache/hc/core5/function/IOFunction.java
new file mode 100644
index 000000000..43ba5da16
--- /dev/null
+++ b/httpcore5/src/main/java/org/apache/hc/core5/function/IOFunction.java
@@ -0,0 +1,52 @@
+/*
+ * ====================================================================
+ * 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.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ */
+
+package org.apache.hc.core5.function;
+
+import java.io.IOException;
+
+/**
+ * Minimal equivalent of {@link java.util.function.Function} whose
+ * {@link #apply(Object)} method is allowed to throw {@link IOException}.
+ *
+ * @param <T> input type
+ * @param <R> result type
+ * @since 5.4
+ */
+@FunctionalInterface
+public interface IOFunction<T, R> {
+
+    /**
+     * Applies the transformation.
+     *
+     * @param value source value (never {@code null})
+     * @return transformed value
+     * @throws IOException if the transformation cannot be performed
+     */
+    R apply(T value) throws IOException;
+
+}
\ No newline at end of file