This repository has been archived by the owner on Feb 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request from GHSA-x9rj-m26h-656j
* Begin the fix * Potential road. * Almost there. I don't have tests (manually tested) * Ok, 12 tests don't pass. * All pass, fix is to not parse includes: they wil be parsed in second pass. * Testing * Testing * Better error messages, fix requested (can't get test, though). * Aligned with AMF * Cycles would have crashed, I think. * Simpler solution, however it'll need to be adjusted for 0.8 * Added flag for cycle. * Change distributionManagement to use mule internal repos * Using factories to abstract where resource created. Not brilliant, but it works. * Update version to 1.0.49 * Update version to 1.0.50-SNAPSHOT * Update version to 1.0.50 * Update version to 1.0.51-SNAPSHOT * A couple of null checks. * Simple space fixing solution. Actually the simplest solution. * issue-back-dates (#687) Options to allow more flexible verification. * Typo * Made CompositeResourceLoader constructor public * Back patch for issue 688. * Removed the dependency on Paths. * More publicness. * nillable simplification * Bad import slipped in there.... Co-authored-by: anosenzo <alejandro.nosenzo@mulesoft.com>
- Loading branch information
Showing
48 changed files
with
651 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
raml-parser-2/src/main/java/org/raml/v2/api/model/PermissiveURI.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Copyright 2013 (c) MuleSoft, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, | ||
* either express or implied. See the License for the specific | ||
* language governing permissions and limitations under the License. | ||
*/ | ||
package org.raml.v2.api.model; | ||
|
||
import java.net.URI; | ||
|
||
/** | ||
* Created. There, you have it. | ||
*/ | ||
public class PermissiveURI | ||
{ | ||
|
||
public static URI create(String s) | ||
{ | ||
|
||
return URI.create(s.replace(" ", "%20")); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
raml-parser-2/src/test/java/org/raml/v2/api/model/PermissiveURITest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* Copyright 2013 (c) MuleSoft, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, | ||
* either express or implied. See the License for the specific | ||
* language governing permissions and limitations under the License. | ||
*/ | ||
package org.raml.v2.api.model; | ||
|
||
import org.junit.Test; | ||
|
||
import java.net.URI; | ||
import java.nio.file.Paths; | ||
|
||
import static org.junit.Assert.*; | ||
|
||
/** | ||
* Created. There, you have it. | ||
*/ | ||
public class PermissiveURITest | ||
{ | ||
|
||
@Test | ||
public void simple() throws Exception | ||
{ | ||
|
||
URI i = PermissiveURI.create("file:/funk"); | ||
assertEquals("/funk", Paths.get(i).toString()); | ||
} | ||
|
||
@Test | ||
public void undone() throws Exception | ||
{ | ||
|
||
URI i = PermissiveURI.create("file:/file important"); | ||
assertEquals("/file important", Paths.get(i).toString()); | ||
} | ||
} |
Oops, something went wrong.