Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/apache/dubbo
Browse files Browse the repository at this point in the history
  • Loading branch information
chickenlj committed Apr 17, 2020
2 parents 8e8a3d4 + 0def3dc commit 3fef429
Show file tree
Hide file tree
Showing 12 changed files with 846 additions and 20 deletions.
40 changes: 39 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -241,4 +241,42 @@ https://github.com/edazdarevic/CIDRUtils. The project is licensed under a MIT Li
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
* THE SOFTWARE.

For the file org.apache.dubbo.common.utils.Utf8Utils.java:

This product contains a portion of the Protocol Buffers project, which is published at
https://developers.google.com/protocol-buffers/ and is licensed under the following License:

Copyright 2008 Google Inc. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Code generated by the Protocol Buffer compiler is owned by the owner
of the input file used when generating it. This code is not
standalone and requires a support library to be linked with it. This
support library is itself covered by the above license.
7 changes: 7 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,10 @@ Please visit the Netty web site for more information:

Copyright 2014 The Netty Project

The product contains code form the Google Protocol Buffers project:

Please visit the following site for more information:
https://developers.google.com/protocol-buffers/

Copyright 2008 Google Inc. All rights reserved.

15 changes: 10 additions & 5 deletions dubbo-common/src/main/java/org/apache/dubbo/common/URL.java
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,8 @@ private static String getAddress(String host, int port) {
}

/**
* NOTICE: This method allocate too much objects, we can use {@link URLStrParser#parseDecodedStr(String)} instead.
* <p>
* Parse url string
*
* @param url URL string
Expand Down Expand Up @@ -326,13 +328,16 @@ public static Map<String, Map<String, String>> toMethodParameters(Map<String, St

String methodsString = parameters.get(METHODS_KEY);
if (StringUtils.isNotEmpty(methodsString)) {
String[] methods = methodsString.split(",");
List<String> methods = StringUtils.splitToList(methodsString, ',');
for (Map.Entry<String, String> entry : parameters.entrySet()) {
String key = entry.getKey();
for (String method : methods) {
String methodPrefix = method + '.';
if (key.startsWith(methodPrefix)) {
String realKey = key.substring(methodPrefix.length());
for (int i = 0; i < methods.size(); i++) {
String method = methods.get(i);
int methodLen = method.length();
if (key.length() > methodLen
&& key.startsWith(method)
&& key.charAt(methodLen) == '.') {//equals to: key.startsWith(method + '.')
String realKey = key.substring(methodLen + 1);
URL.putMethodParameter(method, realKey, entry.getValue(), methodParameters);
}
}
Expand Down
Loading

0 comments on commit 3fef429

Please sign in to comment.