You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/03/31 15:31:41 UTC

[jira] [Commented] (JENA-733) Long typed literals report class java.lang.Long but return java.lang.Integer

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

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

GitHub user kinow opened a pull request:

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

    JENA-733 add documentation for narrower data type case

    Tried to clarify what happens when users provide Long values that fit into Integers, for [JENA-733](https://issues.apache.org/jira/browse/JENA-733).
    
    I think if the docs are good to be merged, then the issue in JIRA can be closed too.
    
    Cheers
    Bruno

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

    $ git pull https://github.com/kinow/jena JENA-733-javadocs

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

    https://github.com/apache/jena/pull/230.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 #230
    
----
commit 58cd30308e36dda3e2686953257ec771d72f681b
Author: Bruno P. Kinoshita <br...@yahoo.com.br>
Date:   2017-03-31T15:28:41Z

    JENA-733 add documentation for narrower data type case

----


> Long typed literals report class java.lang.Long but return java.lang.Integer
> ----------------------------------------------------------------------------
>
>                 Key: JENA-733
>                 URL: https://issues.apache.org/jira/browse/JENA-733
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: RDF API
>    Affects Versions: Jena 2.11.2
>            Reporter: Benno Willoweit
>            Priority: Minor
>
> This is my first bug report ever so I hope I get this right. When retrieving query results with ARQ, long values are returned as Integers:
> {{QuerySulution qs;}}
> {{Literal l = qs.getLiteral("myVar");}}
> {{l.getDatatype().getJavaClass(); //returns java.lang.Long which is correct}}
> {{l.getValue(); //returns a java.lang.Integer object but it should return a java.lang.Long object according to the docs}}
> I have this problem with ARQ 2.11.2 which does not exist in the "affects version" drop down.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)