[Git][java-team/plm][master] 2 commits: Fix the patch to fix #960632 [Gilles Filippini]
Martin Quinson
gitlab at salsa.debian.org
Mon May 18 07:38:27 BST 2020
Martin Quinson pushed to branch master at Debian Java Maintainers / plm
Commits:
10146f08 by Martin Quinson at 2020-05-18T08:26:27+02:00
Fix the patch to fix #960632 [Gilles Filippini]
- - - - -
3a7b431a by Martin Quinson at 2020-05-18T08:36:29+02:00
upload to unstable
- - - - -
2 changed files:
- debian/changelog
- debian/patches/json-simple-3.patch
Changes:
=====================================
debian/changelog
=====================================
@@ -1,24 +1,22 @@
-plm (2.6+repack-4) UNRELEASED; urgency=medium
+plm (2.6+repack-4) unstable; urgency=medium
[ Gilles Filippini ]
* Build against json-simple 2 or 3, depending on what's available.
(Closes: #960632).
[ Martin Quinson ]
- * Point vcs-git to salsa, and update upstream homepage.
* Java 7 was hardcoded in the launcher script :(
- * Trim trailing whitespace.
- * Don't specify --with=quilt, since package uses '3.0 (quilt)' source
- format.
- * debian/control: Add Vcs-Browser field
- * Bump debhelper from deprecated 8 to 12.
+ * d/changelog: Trim trailing whitespace.
+ * d/control: Point vcs-git to salsa, and update upstream homepage.
+ * d/control: Add Vcs-Browser field
+ * d/control: Bump debhelper from deprecated 8 to 12.
+ * d/control: Change priority extra to priority optional.
+ * d/copyright: Fix case (Upstream-name => Upstream-Name).
+ * d/rule: no need for --with=quilt, with '3.0 (quilt)' source format.
* Set debhelper-compat version in Build-Depends.
- * Change priority extra to priority optional.
* Set upstream metadata fields: Bug-Database, Bug-Submit.
- * Fix field name case in debian/copyright (Upstream-name => Upstream-
- Name).
- -- Martin Quinson <mquinson at debian.org> Sun, 17 May 2020 08:37:53 +0200
+ -- Martin Quinson <mquinson at debian.org> Mon, 18 May 2020 08:33:40 +0200
plm (2.6+repack-3) unstable; urgency=medium
=====================================
debian/patches/json-simple-3.patch
=====================================
@@ -164,9 +164,11 @@ Index: plm-2.6+repack/src/plm/core/model/session/SessionDB.java
===================================================================
--- plm-2.6+repack.orig/src/plm/core/model/session/SessionDB.java
+++ plm-2.6+repack/src/plm/core/model/session/SessionDB.java
-@@ -4,9 +4,9 @@ import java.util.HashMap;
+@@ -3,10 +3,11 @@ package plm.core.model.session;
+ import java.util.HashMap;
import java.util.Map;
import java.util.Set;
++import java.math.BigDecimal;
-import org.json.simple.JSONObject;
-import org.json.simple.parser.JSONParser;
@@ -177,7 +179,7 @@ Index: plm-2.6+repack/src/plm/core/model/session/SessionDB.java
import plm.core.lang.ProgrammingLanguage;
import plm.core.model.Game;
-@@ -154,7 +154,7 @@ public class SessionDB {
+@@ -154,7 +155,7 @@ public class SessionDB {
public String lessonSummary(String lesson) {
@@ -186,7 +188,7 @@ Index: plm-2.6+repack/src/plm/core/model/session/SessionDB.java
Map<ProgrammingLanguage, Integer> possibleL = possibleExercises.get(lesson);
for (ProgrammingLanguage pl: possibleL.keySet())
-@@ -166,15 +166,14 @@ public class SessionDB {
+@@ -166,15 +167,14 @@ public class SessionDB {
if (passedL.get(pl)!=0)
result.put("passed"+pl.getLang(), passedL.get(pl));
@@ -206,6 +208,23 @@ Index: plm-2.6+repack/src/plm/core/model/session/SessionDB.java
System.out.println("Ignoring invalid lesson summary (parse error: "+e.getLocalizedMessage()+").");
return;
}
+@@ -186,12 +186,12 @@ public class SessionDB {
+
+ for (ProgrammingLanguage pl: Game.getProgrammingLanguages()) {
+ if (data.containsKey("possible"+pl.getLang())) {
+- Long v = (Long) data.get("possible"+pl.getLang());
+- possibleL.put(pl, v.intValue());
++ Integer v = ((BigDecimal) data.get("possible"+pl.getLang())).intValue();
++ possibleL.put(pl, v);
+ }
+ if (data.containsKey("passed"+pl.getLang())) {
+- Long v = (Long) data.get("passed"+pl.getLang()); // damn, damn java casting madness
+- passedL.put(pl, v.intValue());
++ Integer v = ((BigDecimal) data.get("passed"+pl.getLang())).intValue(); // damn, damn java casting madness
++ passedL.put(pl, v);
+ }
+ }
+ }
Index: plm-2.6+repack/src/plm/core/model/session/ZipSessionKit.java
===================================================================
--- plm-2.6+repack.orig/src/plm/core/model/session/ZipSessionKit.java
@@ -430,7 +449,12 @@ Index: plm-2.6+repack/src/plm/core/model/User.java
===================================================================
--- plm-2.6+repack.orig/src/plm/core/model/User.java
+++ plm-2.6+repack/src/plm/core/model/User.java
-@@ -6,10 +6,10 @@ import java.util.LinkedHashMap;
+@@ -2,14 +2,15 @@ package plm.core.model;
+
+ import java.io.IOException;
+ import java.io.Writer;
++import java.io.StringWriter;
+ import java.util.LinkedHashMap;
import java.util.Objects;
import java.util.UUID;
@@ -444,7 +468,7 @@ Index: plm-2.6+repack/src/plm/core/model/User.java
private String username;
private boolean lastUsed;
private UUID userUUID;
-@@ -27,12 +27,16 @@ public class User implements JSONStreamA
+@@ -27,12 +28,23 @@ public class User implements JSONStreamA
}
@SuppressWarnings({ "unchecked", "rawtypes" })
@@ -459,7 +483,14 @@ Index: plm-2.6+repack/src/plm/core/model/User.java
+ }
+
+ public String toJson() {
-+ return toString();
++ StringWriter writer = new StringWriter();
++ try {
++ toJson(writer);
++ return writer.toString();
++ }
++ catch (IOException e) {
++ return "";
++ }
}
@Override
@@ -498,7 +529,7 @@ Index: plm-2.6+repack/src/plm/core/model/Users.java
- };
try {
- List json = (List) parser.parse(new FileReader(userDBFile), containerFactory);
-+ JsonArray json = Jsoner.deserializeMany(new FileReader(userDBFile));
++ JsonArray json = (JsonArray) Jsoner.deserialize(new FileReader(userDBFile));
Iterator iter = json.iterator();
while (iter.hasNext()) {
View it on GitLab: https://salsa.debian.org/java-team/plm/-/compare/263851fedb4b1837f2577d6bdd8642a49b7ef2f8...3a7b431a8e456440d29057be8001edae793a1342
--
View it on GitLab: https://salsa.debian.org/java-team/plm/-/compare/263851fedb4b1837f2577d6bdd8642a49b7ef2f8...3a7b431a8e456440d29057be8001edae793a1342
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20200518/edfe3921/attachment.html>
More information about the pkg-java-commits
mailing list