ka-zii / yuque Goto Github PK
View Code? Open in Web Editor NEWYuque for java SDK
License: MIT License
Yuque for java SDK
License: MIT License
see class:com.bkood.yuque.common.Request,the properties url
is shared with all thread and never clear.
for example:
Thread A first send a request with com.bkood.yuque.common.Request#url = https://www.yuque.com/api/v2/user
.
Then, when thread B expect to send a request with com.bkood.yuque.common.Request#url = 'https://www.yuque.com/api/v2/users/123/repos', but found that com.bkood.yuque.common.Request#url is actually equal to the fucking https://www.yuque.com/api/v2/userhttps://www.yuque.com/api/v2/users/123/repos
.
You can reproduce the example with these code:
@Test
public void testBug() {
Config apiConfig = getConfig();
Result<User> userResult = YuQueClient.query(apiConfig).user().run();
Assert.assertEquals(200, result.getStatus());
User user = userResult.getEntity();
ResultList<Book> repoResult = YuQueClient.query(apiConfig).usersRepos(String.valueOf(user.getId())).run();
Assert.assertEquals(200, result.getStatus());
List<Book> repos = repoResult.getEntity();
}
fixbug advice:
change com.bkood.yuque.common.Request and com.bkood.yuque.common.RequestParameters from interface to abstract class.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.