Closed redouane59 closed 3 years ago
ETA on this release?
ETA on this release?
I will try to release it next week-end as a maximum, stay tuned :)
ETA on this release?
I will try to release it next week-end as a maximum, stay tuned :)
Anyway I can easily use this version before the official release?
Anyway I can easily use this version before the official release?
Yes I guess that you can just fork and build it locally
I forked the project as suggested but I wasn't able to serialize the objects.
I had to add implements Serializable
in classes UserV2, UserData and UserPublicMetrics. Now yes, I can serialize objects.
I had to add
implements Serializable
in classes UserV2, UserData and UserPublicMetrics. Now yes, I can serialize objects.
That's not normal. Can you just launch the unit test testSerialization()
in UserDeserializerV2Test.java
and tell me if it passes ? Because on my side it is.
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities
0 Security Hotspots
174 Code Smells
The test did pass, yes, but in my own project it still failed to serialize with
FileOutputStream fileOut = new FileOutputStream(file);
ObjectOutputStream out = new ObjectOutputStream(fileOut);
out.writeObject(object);
out.close();
fileOut.close();
After implementing Serializable, there are no longer exceptions and it works fine.
After implementing Serializable, there are no longer exceptions and it works fine.
Are you sure your project is using this new version ?
I just created the same test in class TweetDeserializerV2Test
and it is working, with a UserData
object inside the main object.
Yes.
De: Redouane @.> Enviado: 5 de julho de 2021 14:19 Para: @.> Cc: @.>; @.> Assunto: Re: [redouane59/twittered] v2.5 (#242)
After implementing Serializable, there are no longer exceptions and it works fine.
Are you sure your project is using this new version ?
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/redouane59/twittered/pull/242#issuecomment-874107831, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AD34HLRQZICJ32WAK3ALQZLTWGWMLANCNFSM47YF64YA.
Can you please write to me here your full test please ?
Just get a random UserV2 or User or UserData object.
Then call this function:
public static boolean serialize(Object object, String file) {
try {
FileOutputStream fileOut = new FileOutputStream(new File(file));
ObjectOutputStream out = new ObjectOutputStream(fileOut);
out.writeObject(object);
out.close();
fileOut.close();
} catch (Exception ex) {
return false;
}
return true;
}
In my tests with a similar function, NotSerializableException was thrown.
Thank you very much, I'm currently debugging that :)
I just merge the PR https://github.com/redouane59/twittered/pull/249 . Could you just try this :
@Test
public void getAndSerializeUser() throws IOException {
String userName = "RedouaneBali";
User result = twitterClient.getUserFromUserName(userName);
assertNotNull(TwitterClient.OBJECT_MAPPER.writeValueAsString(result));
TwitterClient.OBJECT_MAPPER.writeValue(new File("../test_serialization.json"), result);
}
On my side, after having added some @JsonIgnore
annotations on methods which gave NPE on DTO classes, it's now working :)
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities
0 Security Hotspots
186 Code Smells
User
andTwitter
object serialization : https://github.com/redouane59/twittered/pull/244searchAllTweets
method https://github.com/redouane59/twittered/pull/255Deprecated
and removing the oldgetFavorites()
method