[f2j] 01/03: Replace non-free class by Java standard String.format
Andreas Tille
tille at debian.org
Fri Jan 29 18:24:50 UTC 2016
This is an automated email from the git hooks/post-receive script.
tille pushed a commit to branch master
in repository f2j.
commit cd230bff6ff4216b2c5b6fd9ee283c23c08c32c1
Author: Andreas Tille <tille at debian.org>
Date: Fri Jan 29 18:02:05 2016 +0100
Replace non-free class by Java standard String.format
---
debian/patches/replace_printfformat.patch | 33 +++++++++++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 34 insertions(+)
diff --git a/debian/patches/replace_printfformat.patch b/debian/patches/replace_printfformat.patch
new file mode 100644
index 0000000..62aec60
--- /dev/null
+++ b/debian/patches/replace_printfformat.patch
@@ -0,0 +1,33 @@
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Fri, 29 Jan 2016 15:47:50 +0100
+Description: Replace non-free class by Java standard String.format
+
+--- a/util/org/j_paine/formatter/Formatter.java
++++ b/util/org/j_paine/formatter/Formatter.java
+@@ -553,7 +553,7 @@ class FormatI extends FormatIOElement
+ /* Convert the number to a string. */
+ if ( o instanceof Integer || o instanceof Long ) {
+ String fmtstr = "%" + Integer.toString(getWidth()) + "d";
+- s = new PrintfFormat(fmtstr).sprintf(o);
++ s = String.format(fmtstr, o);
+
+ /* Throw an exception if the string won't fit. */
+ if ( s.length() > getWidth() )
+@@ -745,7 +745,7 @@ class FormatF extends FormatIOElement
+ o instanceof Float || o instanceof Double ) {
+ String fmtstr = "%" + Integer.toString(getWidth()) + "." +
+ Integer.toString(this.d) + "f";
+- s = new PrintfFormat(fmtstr).sprintf(o);
++ s = String.format(fmtstr, o);
+
+ /* Throw an exception if the string won't fit. */
+ if ( s.length() > getWidth() )
+@@ -836,7 +836,7 @@ class FormatE extends FormatIOElement
+ o instanceof Float || o instanceof Double ) {
+ String fmtstr = "%" + Integer.toString(getWidth()) + "." +
+ Integer.toString(this.d) + "E";
+- s = new PrintfFormat(fmtstr).sprintf(o);
++ s = String.format(fmtstr, o);
+
+ /* Throw an exception if the string won't fit. */
+ if ( s.length() > getWidth() )
diff --git a/debian/patches/series b/debian/patches/series
index 0f94d65..b003799 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
fix_clean_target
generate_doc
remove_non-free_parts.patch
+replace_printfformat.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/f2j.git
More information about the pkg-java-commits
mailing list