You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by asciborek <gi...@git.apache.org> on 2018/11/21 21:49:54 UTC

[GitHub] commons-lang pull request #385: WIP: CheckedFunction utils

GitHub user asciborek opened a pull request:

    https://github.com/apache/commons-lang/pull/385

    WIP: CheckedFunction utils

    This is an example of utils which I would like to create. Purpose of interfaces like this is to simplify usage of java streams

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/asciborek/commons-lang LANG_1424

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/commons-lang/pull/385.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #385
    
----
commit e5c3f15b0505f3aec7e735932707afb084118695
Author: Aleksander Sciborek <al...@...>
Date:   2018-11-18T21:25:52Z

    [LANG_1424] implement CheckedFunction - a counterpat of java.util.function.Function which throws a checked exception in apply method

----


---

[GitHub] commons-lang issue #385: WIP: CheckedFunction utils

Posted by coveralls <gi...@git.apache.org>.
Github user coveralls commented on the issue:

    https://github.com/apache/commons-lang/pull/385
  
    
    [![Coverage Status](https://coveralls.io/builds/20251932/badge)](https://coveralls.io/builds/20251932)
    
    Coverage decreased (-0.01%) to 95.221% when pulling **3bf5df5013c24523c5d3a2c33a3748c0d3e38201 on asciborek:LANG_1424** into **60b8f18e463be4673732e2a31867a7c3b02a4a1e on apache:master**.



---

[GitHub] commons-lang pull request #385: WIP: CheckedFunction utils

Posted by asciborek <gi...@git.apache.org>.
Github user asciborek closed the pull request at:

    https://github.com/apache/commons-lang/pull/385


---

[GitHub] commons-lang pull request #385: WIP: CheckedFunction utils

Posted by ajs6f <gi...@git.apache.org>.
Github user ajs6f commented on a diff in the pull request:

    https://github.com/apache/commons-lang/pull/385#discussion_r236042692
  
    --- Diff: src/test/java/org/apache/commons/lang3/function/CheckedFunctionTest.java ---
    @@ -0,0 +1,45 @@
    +/*
    + * 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.lang3.function;
    +
    +import org.junit.jupiter.api.Assertions;
    +import org.junit.jupiter.api.DisplayName;
    +import org.junit.jupiter.api.Test;
    +
    +import java.net.MalformedURLException;
    +import java.net.URI;
    +import java.net.URISyntaxException;
    +import java.net.URL;
    +import java.util.function.Function;
    +
    +public class CheckedFunctionTest {
    +
    +    @DisplayName("unchecked should return a correctly working function")
    --- End diff --
    
    This doesn't seem to test the interesting behavior of the code. There is no exception rethrown as a `RuntimeException`. Shouldn't that be happening?


---