[libspring-java] 04/13: Disabled the Money API support for spring-context (not in Debian)

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Wed Aug 3 17:51:39 UTC 2016


This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to branch master
in repository libspring-java.

commit 4fe644ad4b10db2390c34d242805466fdcd20892
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Tue May 31 14:23:01 2016 +0200

    Disabled the Money API support for spring-context (not in Debian)
---
 debian/changelog                           |  1 +
 debian/maven.ignoreRules                   |  1 +
 debian/patches/0042-ignore-money-api.patch | 46 ++++++++++++++++++++++++++++++
 debian/patches/series                      |  1 +
 4 files changed, 49 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 14096fb..eb117e5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,7 @@ libspring-java (4.2.6-1) UNRELEASED; urgency=medium
   * Team upload.
   * New upstream release
     - Refreshed the patches
+    - Disabled the Money API support for spring-context (not in Debian)
     - New dependency on webjars-locator for spring-webmvc
 
  -- Emmanuel Bourg <ebourg at apache.org>  Tue, 24 May 2016 15:19:05 +0200
diff --git a/debian/maven.ignoreRules b/debian/maven.ignoreRules
index e8e374d..7832e5c 100644
--- a/debian/maven.ignoreRules
+++ b/debian/maven.ignoreRules
@@ -2,6 +2,7 @@ com.ibm.websphere uow * * * *
 com.h2database h2 * * * *
 org.hibernate hibernate-annotations * * * *
 io.spring.gradle docbook-reference-plugin * * * *
+javax.money money-api * * * *
 org.asciidoctor asciidoctor-gradle-plugin * * * *
 org.mvel mvel2 * * * *
 org.skyscreamer jsonassert * * * *
diff --git a/debian/patches/0042-ignore-money-api.patch b/debian/patches/0042-ignore-money-api.patch
new file mode 100644
index 0000000..79dafce
--- /dev/null
+++ b/debian/patches/0042-ignore-money-api.patch
@@ -0,0 +1,46 @@
+Description: Ignore the Money API support (not in Debian)
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: not-needed
+--- a/spring-context/src/main/java/org/springframework/format/support/DefaultFormattingConversionService.java
++++ b/spring-context/src/main/java/org/springframework/format/support/DefaultFormattingConversionService.java
+@@ -21,9 +21,6 @@
+ import org.springframework.format.datetime.DateFormatterRegistrar;
+ import org.springframework.format.datetime.joda.JodaTimeFormatterRegistrar;
+ import org.springframework.format.datetime.standard.DateTimeFormatterRegistrar;
+-import org.springframework.format.number.money.CurrencyUnitFormatter;
+-import org.springframework.format.number.money.Jsr354NumberFormatAnnotationFormatterFactory;
+-import org.springframework.format.number.money.MonetaryAmountFormatter;
+ import org.springframework.format.number.NumberFormatAnnotationFormatterFactory;
+ import org.springframework.util.ClassUtils;
+ import org.springframework.util.StringValueResolver;
+@@ -104,13 +101,6 @@
+ 		// Default handling of number values
+ 		formatterRegistry.addFormatterForFieldAnnotation(new NumberFormatAnnotationFormatterFactory());
+ 
+-		// Default handling of monetary values
+-		if (jsr354Present) {
+-			formatterRegistry.addFormatter(new CurrencyUnitFormatter());
+-			formatterRegistry.addFormatter(new MonetaryAmountFormatter());
+-			formatterRegistry.addFormatterForFieldAnnotation(new Jsr354NumberFormatAnnotationFormatterFactory());
+-		}
+-
+ 		// Default handling of date-time values
+ 		if (jsr310Present) {
+ 			// just handling JSR-310 specific date and time types
+--- a/build.gradle
++++ b/build.gradle
+@@ -486,6 +486,14 @@
+ 		testCompile("org.apache.commons:commons-pool2:2.4.2")
+ 		testCompile("org.slf4j:slf4j-api:${slf4jVersion}")
+ 	}
++
++	sourceSets {
++		main {
++			java {
++				exclude "**/money/*"
++			}
++		}
++	}
+ }
+ 
+ project("spring-messaging") {
diff --git a/debian/patches/series b/debian/patches/series
index 01a4b11..8477a18 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -10,3 +10,4 @@
 0039-openjpa-compatibility.patch
 0040-ignore-json-assert.patch
 0041-servlet-api-compatibility.patch
+0042-ignore-money-api.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/libspring-java.git



More information about the pkg-java-commits mailing list