projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Always create a new Sone.
[Sone.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sone
/
core
/
SoneDownloader.java
diff --git
a/src/main/java/net/pterodactylus/sone/core/SoneDownloader.java
b/src/main/java/net/pterodactylus/sone/core/SoneDownloader.java
index
13154a0
..
6a6265e
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/core/SoneDownloader.java
+++ b/
src/main/java/net/pterodactylus/sone/core/SoneDownloader.java
@@
-167,16
+167,16
@@
public class SoneDownloader extends AbstractService {
}
/**
}
/**
- * Parses a Sone from the given input stream and
updates the given Sone, or
- *
creates a new Sone
.
+ * Parses a Sone from the given input stream and
creates a new Sone from the
+ *
parsed data
.
*
*
- * @param
s
one
+ * @param
originalS
one
* The Sone to update
* @param soneInputStream
* The input stream to parse the Sone from
* @return The parsed Sone
*/
* The Sone to update
* @param soneInputStream
* The input stream to parse the Sone from
* @return The parsed Sone
*/
- public Sone parseSone(Sone
s
one, InputStream soneInputStream) {
+ public Sone parseSone(Sone
originalS
one, InputStream soneInputStream) {
/* TODO - impose a size limit? */
Document document;
/* TODO - impose a size limit? */
Document document;
@@
-186,9
+186,12
@@
public class SoneDownloader extends AbstractService {
}
if (document == null) {
/* TODO - mark Sone as bad. */
}
if (document == null) {
/* TODO - mark Sone as bad. */
- logger.log(Level.WARNING, "Could not parse XML for Sone %s!", new Object[] {
s
one });
+ logger.log(Level.WARNING, "Could not parse XML for Sone %s!", new Object[] {
originalS
one });
return null;
}
return null;
}
+
+ Sone sone = new Sone(originalSone.getId());
+
SimpleXML soneXml;
try {
soneXml = SimpleXML.fromDocument(document);
SimpleXML soneXml;
try {
soneXml = SimpleXML.fromDocument(document);