| Summary: | [server] Exception when project name is a URL | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Anthony Hunter <ahunter.eclipse> |
| Component: | Server | Assignee: | Anthony Hunter <ahunter.eclipse> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | john.arthorne, simon_kaegi |
| Version: | 4.0 | Flags: | john.arthorne:
review+
simon_kaegi: review+ |
| Target Milestone: | 4.0 RC3 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
|
Description
Anthony Hunter
I have fixed this issue in commit: http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?h=ah-Bug419602&id=f11ebce1c539a36f88affef04f352ea04c8cf0f8 I now check during folder creation and file creation that it was successful and return false if not, rather than throwing a RuntimeException. I have also added a test case testCreateProjectWithURLAsName() The URL as a project name occurs in 12 projects out of all the projects that 19561 users have created on orionhub.eclipse.org, this is now handled in migration. We also have those 65 users that were broken when the secure storage file was truncated on orionhub.eclipse.org, I fixed the error messaging for that case. We finally have 38 projects where the project folder specified in the Projects.pref does not exist, fixed the error for that case. There is one last problem to handle, that being when you name your project "workspace". There are 8 such projects on orionhub.eclipse.org. I will raise a new defect for that one. Your new test fails for me: java.lang.Exception: Unexpected exception, expected<java.lang.RuntimeException> but was<java.lang.AssertionError> This looks like it is just a problem with the test? Presumably it should fail and the assertTrue should be assertFalse, and the expected throw removed from the @Test annotation. (In reply to John Arthorne from comment #2) > Your new test fails for me: > > java.lang.Exception: Unexpected exception, > expected<java.lang.RuntimeException> but was<java.lang.AssertionError> > > This looks like it is just a problem with the test? Presumably it should > fail and the assertTrue should be assertFalse, and the expected throw > removed from the @Test annotation. That is actually pretty good. The failing test is not the one I added. The test that is failing above is the older tests exercising the SimpleMetaStoreUtil. As I said below, before we threw a RuntimeException, now we just return false that the file could not be created and let the caller handle it. I have fixed this test in commit: http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?h=ah-Bug419602&id=bd5f93bbf4f5b11e6a03c394570df2263b74c317 > I have fixed this issue in commit: > http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?h=ah- > Bug419602&id=f11ebce1c539a36f88affef04f352ea04c8cf0f8 Failing test: > I have fixed this test in commit: > http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?h=ah- > Bug419602&id=bd5f93bbf4f5b11e6a03c394570df2263b74c317 |