-
Notifications
You must be signed in to change notification settings - Fork 26.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'apache-3.2' into apache-3.3
# Conflicts: # README.md # dubbo-common/pom.xml # dubbo-common/src/main/java/org/apache/dubbo/config/MetricsConfig.java # dubbo-demo/dubbo-demo-triple/pom.xml # dubbo-dependencies-bom/pom.xml # dubbo-distribution/dubbo-all/pom.xml # dubbo-metadata/dubbo-metadata-processor/pom.xml # dubbo-native-plugin/pom.xml # dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryProtocol.java # dubbo-spring-boot/pom.xml
- Loading branch information
Showing
79 changed files
with
1,510 additions
and
728 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,5 +74,51 @@ See [CONTRIBUTING](https://github.com/apache/dubbo/blob/master/CONTRIBUTING.md) | |
* Twitter: [@ApacheDubbo](https://twitter.com/ApacheDubbo) | ||
* Security issues: please mail to [us](mailto:[email protected]) privately. | ||
|
||
## Contributing | ||
|
||
See [CONTRIBUTING](https://github.com/apache/dubbo/blob/master/CONTRIBUTING.md) for details on submitting patches and the contribution workflow. | ||
|
||
### How can I contribute? | ||
|
||
* Take a look at issues with tags marked [`Good first issue`](https://github.com/apache/dubbo/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) or [`Help wanted`](https://github.com/apache/dubbo/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22). | ||
* Join the discussion on the mailing list, subscription [guide](https://github.com/apache/dubbo/wiki/Mailing-list-subscription-guide). | ||
* Answer questions on [issues](https://github.com/apache/dubbo/issues). | ||
* Fix bugs reported on [issues](https://github.com/apache/dubbo/issues), and send us a pull request. | ||
* Review the existing [pull request](https://github.com/apache/dubbo/pulls). | ||
* Improve the [website](https://github.com/apache/dubbo-website), typically we need | ||
* blog post | ||
* translation on documentation | ||
* use cases around the integration of Dubbo in enterprise systems. | ||
* Improve the [dubbo-admin/dubbo-monitor](https://github.com/apache/dubbo-admin). | ||
* Contribute to the projects listed in [ecosystem](https://github.com/dubbo). | ||
* Other forms of contribution not explicitly enumerated above. | ||
* If you would like to contribute, please send an email to [email protected] to let us know! | ||
|
||
## Reporting bugs | ||
|
||
Please follow the [template](https://github.com/apache/dubbo/issues/new?template=dubbo-issue-report-template.md) for reporting any issues. | ||
|
||
## Reporting a security vulnerability | ||
|
||
Please report security vulnerabilities to [us](mailto:[email protected]) privately. | ||
|
||
## Dubbo ecosystem | ||
|
||
* [Dubbo Ecosystem Entry](https://github.com/apache?utf8=%E2%9C%93&q=dubbo&type=&language=) - A GitHub group `dubbo` to gather all Dubbo relevant projects not appropriate in [apache](https://github.com/apache) group yet | ||
* [Dubbo Website](https://github.com/apache/dubbo-website) - Apache Dubbo official website | ||
* [Dubbo Samples](https://github.com/apache/dubbo-samples) - samples for Apache Dubbo | ||
* [Dubbo Spring Boot](https://github.com/apache/dubbo-spring-boot-project) - Spring Boot Project for Dubbo | ||
* [Dubbo Admin](https://github.com/apache/dubbo-admin) - The reference implementation for Dubbo admin | ||
* [Dubbo Awesome](https://github.com/apache/dubbo-awesome) - Dubbo's slides and video links in Meetup | ||
|
||
#### Language | ||
|
||
* [Go](https://github.com/apache/dubbo-go) (recommended) | ||
* [Rust](https://github.com/apache/dubbo-rust) | ||
* [Node.js](https://github.com/apache/dubbo-js) | ||
* [Python](https://github.com/dubbo/py-client-for-apache-dubbo) | ||
* [PHP](https://github.com/apache/dubbo-php-framework) | ||
* [Erlang](https://github.com/apache/dubbo-erlang) | ||
|
||
## License | ||
Apache Dubbo is licensed under the Apache License Version 2.0. See the [LICENSE](https://github.com/apache/dubbo/blob/master/LICENSE) file for details. |
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
dubbo-common/src/main/java/org/apache/dubbo/common/utils/ProtobufUtils.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 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You 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.apache.dubbo.common.utils; | ||
|
||
import org.apache.dubbo.common.logger.Logger; | ||
import org.apache.dubbo.common.logger.LoggerFactory; | ||
|
||
import static org.apache.dubbo.common.constants.CommonConstants.PROTOBUF_MESSAGE_CLASS_NAME; | ||
|
||
public class ProtobufUtils { | ||
|
||
private static final Logger logger = LoggerFactory.getLogger(ProtobufUtils.class); | ||
|
||
private static Class<?> protobufClss; | ||
|
||
private ProtobufUtils() {} | ||
|
||
static { | ||
try { | ||
protobufClss = ClassUtils.forName(PROTOBUF_MESSAGE_CLASS_NAME, ProtobufUtils.class.getClassLoader()); | ||
} catch (Throwable t) { | ||
logger.info("protobuf's dependency is absent"); | ||
} | ||
} | ||
|
||
public static boolean isProtobufClass(Class<?> pojoClazz) { | ||
if (protobufClss != null) { | ||
return protobufClss.isAssignableFrom(pojoClazz); | ||
} | ||
return false; | ||
} | ||
} |
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
38 changes: 38 additions & 0 deletions
38
dubbo-common/src/test/java/org/apache/dubbo/common/utils/ProtobufUtilsTest.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,38 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You 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.apache.dubbo.common.utils; | ||
|
||
import org.apache.dubbo.common.vo.UserVo; | ||
import org.apache.dubbo.rpc.model.HelloReply; | ||
import org.apache.dubbo.rpc.model.HelloRequest; | ||
import org.apache.dubbo.rpc.model.Person; | ||
import org.apache.dubbo.rpc.model.SerializablePerson; | ||
|
||
import org.junit.jupiter.api.Assertions; | ||
import org.junit.jupiter.api.Test; | ||
|
||
class ProtobufUtilsTest { | ||
|
||
@Test | ||
void testIsProtobufClass() { | ||
Assertions.assertTrue(ProtobufUtils.isProtobufClass(HelloRequest.class)); | ||
Assertions.assertTrue(ProtobufUtils.isProtobufClass(HelloReply.class)); | ||
Assertions.assertFalse(ProtobufUtils.isProtobufClass(Person.class)); | ||
Assertions.assertFalse(ProtobufUtils.isProtobufClass(SerializablePerson.class)); | ||
Assertions.assertFalse(ProtobufUtils.isProtobufClass(UserVo.class)); | ||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
dubbo-common/src/test/java/org/apache/dubbo/rpc/model/HelloReply.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,47 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You 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.apache.dubbo.rpc.model; | ||
|
||
import com.google.protobuf.Message; | ||
|
||
public final class HelloReply extends com.google.protobuf.GeneratedMessageV3 { | ||
|
||
@Override | ||
protected FieldAccessorTable internalGetFieldAccessorTable() { | ||
return null; | ||
} | ||
|
||
@Override | ||
protected Message.Builder newBuilderForType(BuilderParent builderParent) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public Message.Builder newBuilderForType() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public Message.Builder toBuilder() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public Message getDefaultInstanceForType() { | ||
return null; | ||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
dubbo-common/src/test/java/org/apache/dubbo/rpc/model/HelloRequest.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,47 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You 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.apache.dubbo.rpc.model; | ||
|
||
import com.google.protobuf.Message; | ||
|
||
public final class HelloRequest extends com.google.protobuf.GeneratedMessageV3 { | ||
|
||
@Override | ||
protected FieldAccessorTable internalGetFieldAccessorTable() { | ||
return null; | ||
} | ||
|
||
@Override | ||
protected Message.Builder newBuilderForType(BuilderParent builderParent) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public Message.Builder newBuilderForType() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public Message.Builder toBuilder() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public Message getDefaultInstanceForType() { | ||
return null; | ||
} | ||
} |
Oops, something went wrong.