Build failed in Jenkins: Olingo » olingo-odata4-all-profiles #20

2022-01-25 Thread Apache Jenkins Server
See 


Changes:

[ramya.vasanth] [OLINGO-1556]Fix scale handling of BigDecimals in 
EdmAssistedJsonSerializer


--
[...truncated 1.41 MB...]
[INFO] --- maven-failsafe-plugin:2.22.2:integration-test (integration-test) @ 
odata-samples ---
[INFO] No tests to run.
[INFO] 
[INFO] --- maven-source-plugin:3.2.1:jar-no-fork (attach-sources) @ 
odata-samples ---
[INFO] 
[INFO] --- maven-failsafe-plugin:2.22.2:verify (integration-test) @ 
odata-samples ---
[INFO] 
[INFO] --- maven-checkstyle-plugin:3.1.0:check (checkstyle) @ odata-samples ---
[INFO] Starting audit...
Audit done.
[INFO] 
[INFO] --- maven-install-plugin:2.5.2:install (default-install) @ odata-samples 
---
[INFO] Installing 

 to 
/home/jenkins/.m2/repository/org/apache/olingo/odata-samples/4.9.0-SNAPSHOT/odata-samples-4.9.0-SNAPSHOT.pom
[INFO] 
[INFO] --- apache-rat-plugin:0.13:check (rat-check) @ odata-samples ---
[INFO] Enabled default license matchers.
[INFO] Will parse SCM ignores for exclusions...
[INFO] Finished adding exclusions from SCM ignore files.
[INFO] 66 implicit excludes (use -debug for more details).
[INFO] 25 explicit excludes (use -debug for more details).
[INFO] 1 resources included (use -debug for more details)
[INFO] Rat check: Summary over all files. Unapproved: 0, unknown: 0, generated: 
0, approved: 1 licenses.
[INFO] 
[INFO] -< org.apache.olingo:odata-server-osgi-sample >-
[INFO] Building odata-server-osgi-sample 4.9.0-SNAPSHOT [19/46]
[INFO] ---[ bundle ]---
[INFO] 
[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ 
odata-server-osgi-sample ---
[INFO] Deleting 

[INFO] 
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-maven-version) @ 
odata-server-osgi-sample ---
[INFO] 
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-java-version) @ 
odata-server-osgi-sample ---
[INFO] 
[INFO] --- maven-enforcer-plugin:1.4.1:enforce 
(enforce-output-timestamp-property) @ odata-server-osgi-sample ---
[INFO] 
[INFO] --- build-helper-maven-plugin:3.2.0:add-source (add-source) @ 
odata-server-osgi-sample ---
[INFO] Source directory: 

 added.
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.5:process (process-resource-bundles) 
@ odata-server-osgi-sample ---
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ 
odata-server-osgi-sample ---
[INFO] 
[INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ 
odata-server-osgi-sample ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] skip non existing resourceDirectory 

[INFO] Copying 3 resources
[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ 
odata-server-osgi-sample ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 4 source files to 

[INFO] 
[INFO] --- maven-resources-plugin:3.2.0:testResources (default-testResources) @ 
odata-server-osgi-sample ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] skip non existing resourceDirectory 

[INFO] Copying 3 resources
[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ 
odata-server-osgi-sample ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-surefire-plugin:2.22.2:test (default-test) @ 
odata-server-osgi-sample ---
[INFO] 
[INFO] --- maven-bundle-plugin:5.1.3:bundle (default-bundle) @ 
odata-server-osgi-sample ---
[WARNING] Bundle 
org.apache.olingo:odata-server-osgi-sample:bundle:4.9.0-SNAPSHOT : Unused 
Import-Package instructions: [org.apache.olingo.netty.server.api*] 
[INFO] 
[INFO] --- maven-site-plugin:3.9.1:attach-descriptor (attach-descriptor) @ 
odata-server-osgi-sample ---
[INFO] Skipping because packaging 'bundle' is not pom.
[INFO] 
[INFO] --- maven-failsafe-plugin:2.22.2:integration-test (integration-test) @ 
odata-server-osgi-sample ---
[INFO] 
[INFO] --- maven-source-plugin:3.2.1:jar-no-fork (attach-sources) @ 
odata-server-osgi-sample ---
[INFO] Building jar: 

Build failed in Jenkins: Olingo » olingo-odata4 #37

2022-01-25 Thread Apache Jenkins Server
See 


Changes:

[ramya.vasanth] [OLINGO-1556]Fix scale handling of BigDecimals in 
EdmAssistedJsonSerializer


--
[...truncated 1.17 MB...]
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-java-version) @ 
odata-samples ---
[INFO] 
[INFO] --- maven-enforcer-plugin:1.4.1:enforce 
(enforce-output-timestamp-property) @ odata-samples ---
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.5:process (process-resource-bundles) 
@ odata-samples ---
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ odata-samples 
---
[INFO] 
[INFO] --- maven-site-plugin:3.9.1:attach-descriptor (attach-descriptor) @ 
odata-samples ---
[INFO] No site descriptor found: nothing to attach.
[INFO] 
[INFO] --- maven-failsafe-plugin:2.22.2:integration-test (integration-test) @ 
odata-samples ---
[INFO] No tests to run.
[INFO] 
[INFO] --- maven-source-plugin:3.2.1:jar-no-fork (attach-sources) @ 
odata-samples ---
[INFO] 
[INFO] --- maven-failsafe-plugin:2.22.2:verify (integration-test) @ 
odata-samples ---
[INFO] 
[INFO] --- maven-checkstyle-plugin:3.1.0:check (checkstyle) @ odata-samples ---
[INFO] Starting audit...
Audit done.
[INFO] 
[INFO] --- maven-install-plugin:2.5.2:install (default-install) @ odata-samples 
---
[INFO] Installing 
 
to 
/home/jenkins/.m2/repository/org/apache/olingo/odata-samples/4.9.0-SNAPSHOT/odata-samples-4.9.0-SNAPSHOT.pom
[INFO] 
[INFO] --- apache-rat-plugin:0.13:check (rat-check) @ odata-samples ---
[INFO] Enabled default license matchers.
[INFO] Will parse SCM ignores for exclusions...
[INFO] Finished adding exclusions from SCM ignore files.
[INFO] 64 implicit excludes (use -debug for more details).
[INFO] 25 explicit excludes (use -debug for more details).
[INFO] 179 resources included (use -debug for more details)
[INFO] Rat check: Summary over all files. Unapproved: 0, unknown: 0, generated: 
0, approved: 179 licenses.
[INFO] 
[INFO] --- maven-deploy-plugin:2.8.2:deploy (default-deploy) @ odata-samples ---
[INFO] Skipping artifact deployment
[INFO] 
[INFO] -< org.apache.olingo:odata-server-osgi-sample >-
[INFO] Building odata-server-osgi-sample 4.9.0-SNAPSHOT [19/28]
[INFO] ---[ bundle ]---
[INFO] 
[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ 
odata-server-osgi-sample ---
[INFO] 
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-maven-version) @ 
odata-server-osgi-sample ---
[INFO] 
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-java-version) @ 
odata-server-osgi-sample ---
[INFO] 
[INFO] --- maven-enforcer-plugin:1.4.1:enforce 
(enforce-output-timestamp-property) @ odata-server-osgi-sample ---
[INFO] 
[INFO] --- build-helper-maven-plugin:3.2.0:add-source (add-source) @ 
odata-server-osgi-sample ---
[INFO] Source directory: 

 added.
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.5:process (process-resource-bundles) 
@ odata-server-osgi-sample ---
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ 
odata-server-osgi-sample ---
[INFO] 
[INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ 
odata-server-osgi-sample ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] skip non existing resourceDirectory 

[INFO] Copying 3 resources
[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ 
odata-server-osgi-sample ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 4 source files to 

[INFO] 
[INFO] --- maven-resources-plugin:3.2.0:testResources (default-testResources) @ 
odata-server-osgi-sample ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] skip non existing resourceDirectory 

[INFO] Copying 3 resources
[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ 
odata-server-osgi-sample ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-surefire-plugin:2.22.2:test (default-test) @ 
odata-server-osgi-sample ---
[INFO] 
[INFO] --- maven-bundle-plugin:5.1.2:bundle (default-bundle) @ 
odata-server-osgi-sample ---
[WARNING] Bundle 
org.apache.olingo:odata-server-osgi-sample:bundle:4.9.0-SNAPSHOT : Unused 
Import-Package 

[olingo-odata4] branch master updated: [OLINGO-1556]Fix scale handling of BigDecimals in EdmAssistedJsonSerializer

2022-01-25 Thread ramyav
This is an automated email from the ASF dual-hosted git repository.

ramyav pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/olingo-odata4.git


The following commit(s) were added to refs/heads/master by this push:
 new 72d5e91  [OLINGO-1556]Fix scale handling of BigDecimals in 
EdmAssistedJsonSerializer
72d5e91 is described below

commit 72d5e9195c1e8e8f1284dc5cd11e1ce9aea5bfef
Author: ramya vasanth 
AuthorDate: Tue Jan 25 15:05:52 2022 +0530

[OLINGO-1556]Fix scale handling of BigDecimals in EdmAssistedJsonSerializer
---
 .../serializer/json/EdmAssistedJsonSerializer.java |  2 +-
 .../json/EdmAssistedJsonSerializerTest.java| 22 ++
 2 files changed, 23 insertions(+), 1 deletion(-)

diff --git 
a/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/json/EdmAssistedJsonSerializer.java
 
b/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/json/EdmAssistedJsonSerializer.java
index c011fdd..0759031 100644
--- 
a/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/json/EdmAssistedJsonSerializer.java
+++ 
b/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/json/EdmAssistedJsonSerializer.java
@@ -310,7 +310,7 @@ public class EdmAssistedJsonSerializer implements 
EdmAssistedSerializer {
   try {
  Integer scale = null;
  if (value instanceof BigDecimal) {
- scale = ((BigDecimal) value).scale();
+ scale = Math.max(0, ((BigDecimal) value).scale());
  } else {
  scale = Constants.DEFAULT_SCALE;
  }
diff --git 
a/lib/server-test/src/test/java/org/apache/olingo/server/core/serializer/json/EdmAssistedJsonSerializerTest.java
 
b/lib/server-test/src/test/java/org/apache/olingo/server/core/serializer/json/EdmAssistedJsonSerializerTest.java
index ade9d5d..84031a7 100644
--- 
a/lib/server-test/src/test/java/org/apache/olingo/server/core/serializer/json/EdmAssistedJsonSerializerTest.java
+++ 
b/lib/server-test/src/test/java/org/apache/olingo/server/core/serializer/json/EdmAssistedJsonSerializerTest.java
@@ -678,4 +678,26 @@ public class EdmAssistedJsonSerializerTest {
 serialize(serializerMin, metadata, null, entityCollection, null)
 .contains("1.6667406815349750104360282421112060546875"));
   }
+  
+  @Test
+  public void 
entityCollectionWithBigDecimalPropertyIntegerInScientificNotation() throws 
Exception {
+EntityCollection entityCollection = new EntityCollection();
+BigDecimal b = new BigDecimal("1.52E+4");
+entityCollection.getEntities().add(new Entity()
+.addProperty(new Property(null, "Property1", ValueType.PRIMITIVE, b)));
+Assert.assertTrue(
+serialize(serializerMin, metadata, null, entityCollection, null)
+.contains("15200"));
+  }
+
+  @Test
+  public void entityCollectionWithBigDecimalPropertyInScientificNotation() 
throws Exception {
+EntityCollection entityCollection = new EntityCollection();
+BigDecimal b = new BigDecimal("1.52123123E+4");
+entityCollection.getEntities().add(new Entity()
+.addProperty(new Property(null, "Property1", ValueType.PRIMITIVE, b)));
+Assert.assertTrue(
+serialize(serializerMin, metadata, null, entityCollection, null)
+.contains("15212.3123"));
+  }
 }