You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vxquery.apache.org by ti...@apache.org on 2010/04/15 02:58:40 UTC
svn commit: r934256 -
/incubator/vxquery/trunk/vxquery/src/main/java/org/apache/vxquery/datamodel/atomic/DecimalValue.java
Author: tillw
Date: Thu Apr 15 00:58:40 2010
New Revision: 934256
URL: http://svn.apache.org/viewvc?rev=934256&view=rev
Log:
- fixed type annotation
Modified:
incubator/vxquery/trunk/vxquery/src/main/java/org/apache/vxquery/datamodel/atomic/DecimalValue.java
Modified: incubator/vxquery/trunk/vxquery/src/main/java/org/apache/vxquery/datamodel/atomic/DecimalValue.java
URL: http://svn.apache.org/viewvc/incubator/vxquery/trunk/vxquery/src/main/java/org/apache/vxquery/datamodel/atomic/DecimalValue.java?rev=934256&r1=934255&r2=934256&view=diff
==============================================================================
--- incubator/vxquery/trunk/vxquery/src/main/java/org/apache/vxquery/datamodel/atomic/DecimalValue.java (original)
+++ incubator/vxquery/trunk/vxquery/src/main/java/org/apache/vxquery/datamodel/atomic/DecimalValue.java Thu Apr 15 00:58:40 2010
@@ -1,19 +1,19 @@
/*
-* 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.
-*/
+ * 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.vxquery.datamodel.atomic;
import java.math.BigDecimal;
@@ -25,7 +25,7 @@ import org.apache.vxquery.types.BuiltinT
public class DecimalValue extends NumericValue {
DecimalValue(BigDecimal value) {
- super(value, BuiltinTypeRegistry.XS_INTEGER);
+ super(value, BuiltinTypeRegistry.XS_DECIMAL);
}
public DecimalValue(BigDecimal value, AtomicType type) {
@@ -36,10 +36,10 @@ public class DecimalValue extends Numeri
public CharSequence getStringValue() {
return stringValue((BigDecimal) value);
}
-
+
static final String stringValue(BigDecimal value) {
String str = String.valueOf(value);
- return str.endsWith(".0") ? str.substring(0, str.length() - 2) : str;
+ return str.endsWith(".0") ? str.substring(0, str.length() - 2) : str;
}
@Override