Dear all,
I have a static method as following:
public static void writeArticle(TypeA typeA, TypeB typeB) {
AWriter writer = AFactory.getWriter("aWriter");
Article article = writer.newArticle();
/* PARAMETER WRITE START */
article.set("title", typeA.getTitle());
article.set("author", typeB.getName());
article.set("age", typeB.getAge());
// …
/* more set statments here */
writer.write(article);
}
Could this method cause a problem that the writer will write a value-mixed Article? That is, when 2 class (Class A and ClassB) instances calling this method, will Article get some of typeA values from ClassA and some from ClassB?