-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update MediaWiki versions #34
Comments
Can you give me the warning message? |
"Unknown MediaWiki version" |
Sorry I tried to find your warning message in the sources, to remove it completely. I tried The best match, in case of version logging, I found at GetVersion.java ... but it is a debug logging. My warning messages look like the following one - do you have a similar line, or a classname of the logger where the warning was logged?
|
The warning message doesn't exist. I ask you to throw warning if the version resolves to UNKNOWN. |
I assume UA means User Agent and you try to pass a version of your tool to mediawiki's api - correct? What do you think about a code example to explain where we have a problem or what can be improved? |
I run the example code from the main page: public static void main(String[] args) {
MediaWikiBot wikiBot = new MediaWikiBot("https://en.wikipedia.org/w/");
Article article = wikiBot.getArticle("42");
System.out.println(article.getText().substring(5, 42));
} and I get: |
|
Managed to checkout the project. Running public static void main(String[] args) {
System.out.println(new MediaWikiBot("http://en.wikipedia.org/w/").getVersion());
} with |
I got it, this warning has nothing to do with current mediawiki version. Give me a moment |
The problem was, if you work with a development version of jwbf there is no versionconfig defined, so its is difficult to say This is JWBF/3.0.0-${git scm id} so I used the fallback value "Version unknown". "Version unknown" contains a space and this triggers the warning. I've added a test and removed the space. Thanks for the hint. btw: If you work with regular build snapshot, based on a public github commit there will be no warning 😉 -- see Developer resources (You can ignore this particular warning - I think I'll push a fix tomorrow) |
I tend to close this task -- can you confirm that the warning is absent? |
Yes, the warning message has gone. |
Two tests fail because of this. |
Which? |
HttpActionClientTest.testGet_headers_customUserAgent |
Can you give me the assertion message / exception too? I can't reproduce it at my local testsetup. try to run expected:
actual:
|
Instead of DEVEL is "Version unknown" and Version_unknown. |
You are right, this can happen. I'll fix it tomorrow. |
I've created an new issue for this problem |
Add 1.24 and 1.25 to the available versions and issue warning if the version is unknown.
The text was updated successfully, but these errors were encountered: