jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [06/11] jena git commit: Reverted changes made to the dtGetTimezone function.
Date Fri, 10 Jun 2016 12:52:59 GMT


Reverted changes made to the dtGetTimezone function.

Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/5dcb82b6
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/5dcb82b6
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/5dcb82b6

Branch: refs/heads/master
Commit: 5dcb82b67a20e56d1e9476e34c288b36eec69152
Parents: 77ddf08
Author: ales004 <cicerone54@hotmail.com>
Authored: Fri Jun 3 21:00:18 2016 +0200
Committer: ales004 <cicerone54@hotmail.com>
Committed: Fri Jun 3 21:00:18 2016 +0200

----------------------------------------------------------------------
 .../apache/jena/sparql/expr/nodevalue/XSDFuncOp.java    | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/5dcb82b6/jena-arq/src/main/java/org/apache/jena/sparql/expr/nodevalue/XSDFuncOp.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/expr/nodevalue/XSDFuncOp.java b/jena-arq/src/main/java/org/apache/jena/sparql/expr/nodevalue/XSDFuncOp.java
index 861b388..f00d564 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/expr/nodevalue/XSDFuncOp.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/expr/nodevalue/XSDFuncOp.java
@@ -1423,9 +1423,10 @@ public class XSDFuncOp
         return NodeValue.makeString(dts.timezone) ;
     }
 
-    private static NodeValue fromTimezoneToDuration(DateTimeStruct dts){
+    public static NodeValue dtGetTimezone(NodeValue nv) {
+        DateTimeStruct dts = parseAnyDT(nv) ;
         if ( dts == null || dts.timezone == null )
-            return null;
+            throw new ExprEvalException("Not a datatype with a timezone: " + nv) ;
         if ( "".equals(dts.timezone) )
             return null ;
         if ( "Z".equals(dts.timezone) ) {
@@ -1456,13 +1457,6 @@ public class XSDFuncOp
         return NodeValue.makeNode(sb.toString(), null, XSDDatatype.XSD + "#dayTimeDuration")
;
     }
 
-    public static NodeValue dtGetTimezone(NodeValue nv) {
-        DateTimeStruct dts = parseAnyDT(nv) ;
-        if ( dts == null || dts.timezone == null )
-            throw new ExprEvalException("Not a datatype with a timezone: " + nv) ;
-        return fromTimezoneToDuration(dts);
-    }
-
     private static void digitsTwo(String s, int idx, StringBuilder sb, char indicator) {
         if ( s.charAt(idx) == '0' ) {
             idx++ ;


Mime
View raw message