You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When moving from argouml.tigris.org to github the following code suddenly caused problems:
URL url = anURL;
InputStream stream
try {
stream = url.openStream();
} catch (IOException e) {
...act on the URL not existing ...
}
...act on the URL existing...
The problem is that when redirecting from http: to https:, as from http://argouml.org to https://argouml-tigris-org.github.io, java does not follow that redirect when opening the stream, so the stream is invalid and no Exception is thrown.
I have fixed this for the simplest case, in getValidURL in XmiReferenceResolverImpl.java, where it caused a test to fail (bf30ff1). There are a lot of other places in the code where a similar pattern is used and they should also be fixed or at least protected with asserts to make sure that it is not an http- or an https-url.
The text was updated successfully, but these errors were encountered:
Patch Set 2:
(1 comment)
> Patch Set 1:
>
> > Patch Set 1:
> >
> > The tests are still not working. Strange.
>
> When I run the tests, I'm getting:
>
> Tests run: 1175, Failures: 0, Errors: 1, Skipped: 0
>
> and the failed test is
> org.argouml.uml.ui.foundation.extension_mechanisms.TestUMLTagDefinitionComboBoxModel.testGetApplicableTagDefinitionsIssue6008
>
> And it fails because it tries to download the file:
>
> http://argouml.org/user-profiles/Profile4testGetApplicableTagDefinitionsIssue60087642449135064096360.xmi
>
> I can't even find this file from the git sources.
>
> This test is failing even without my corrections.
>
> Where do you see the tests results on gerrit?
The test results are not available on Gerrit but it is the exact same result as you are seeing.
And your analysis is wrong, ;-). The test fails because when attempting to download the file http://argouml.org/user-profiles/Profile4testGetApplicableTagDefinitionsIssue6008whatever it doesn't fail. The code and the test require it to fail with an IOException meaning file/resource does not exist, when it doesn't it cannot open the file.
I have fixed that now. I will rebase the rest of your changes and take action, now that the tests are working.
I have also create an issue argouml-tigris-org/argouml#31.
Patch-set: 2
Reviewer: Gerrit User 1016795 <1016795@d5d70762-12d0-45a1-890d-524b12d3f735>
When moving from argouml.tigris.org to github the following code suddenly caused problems:
The problem is that when redirecting from http: to https:, as from http://argouml.org to https://argouml-tigris-org.github.io, java does not follow that redirect when opening the stream, so the stream is invalid and no Exception is thrown.
I have fixed this for the simplest case, in getValidURL in XmiReferenceResolverImpl.java, where it caused a test to fail (bf30ff1). There are a lot of other places in the code where a similar pattern is used and they should also be fixed or at least protected with asserts to make sure that it is not an http- or an https-url.
The text was updated successfully, but these errors were encountered: