[ 
https://issues.apache.org/jira/browse/JENA-1231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15474365#comment-15474365
 ] 

ASF GitHub Bot commented on JENA-1231:
--------------------------------------

GitHub user afs opened a pull request:

    https://github.com/apache/jena/pull/168

    JENA-1231: Modernize executeInTransaction

    

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

    $ git pull https://github.com/afs/jena graph-txn-upgrade

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

    https://github.com/apache/jena/pull/168.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 #168
    
----
commit 3c736de398862e21b33d577261d6a107c36b16c2
Author: Andy Seaborne <[email protected]>
Date:   2016-09-08T15:38:02Z

    JENA-1231: Modernize executeInTransaction

----


> Update "executeInTransaction" to Java8 style (Model, TransactionHandler).
> -------------------------------------------------------------------------
>
>                 Key: JENA-1231
>                 URL: https://issues.apache.org/jira/browse/JENA-1231
>             Project: Apache Jena
>          Issue Type: Bug
>    Affects Versions: Jena 3.1.0
>            Reporter: Andy Seaborne
>            Assignee: Andy Seaborne
>            Priority: Minor
>
> The proposal is to deprecate {{executeInTransaction}}, which returns "Object" 
> and have operations:
> {noformat}
>     <T> T executeRtn( Supplier<T> action ) ;
> {noformat}
> and the non-result version:
> {noformat}
>     void execute( Runnable action );
> {noformat}
> It helps in the IDE to have different names because they both start 
> "{{()\->...}}".  In my experience (Eclipse) completion and error messages are 
> not good when there is the same name and ambiguity over the inferred type. 
> Using the {{()->methodresultsvalue()}} form is ambiguous.
> For model, call them {{executeInTxnRtn}} and {{executeInTxn}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to