-
Notifications
You must be signed in to change notification settings - Fork 26.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…7326) * fix Use @SPI's wrapper method to report a null pointer exception bug. see #7176. (cherry picked from commit df6d6ad) * fix #7176 Use @SPI's wrapper method to report a null pointer exception bug * recover wildcard import * delete issue link * add new spi interface. * fix testActivateComparator test case. Co-authored-by: xiaoheng <xiaoyu>
- Loading branch information
Showing
9 changed files
with
153 additions
and
21 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
25 changes: 25 additions & 0 deletions
25
...-common/src/test/java/org/apache/dubbo/common/extension/activate/ActivateWrapperExt1.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,25 @@ | ||
/* | ||
* 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.extension.activate; | ||
|
||
import org.apache.dubbo.common.extension.SPI; | ||
|
||
@SPI("extImp1") | ||
public interface ActivateWrapperExt1 { | ||
String echo(String msg); | ||
} |
28 changes: 28 additions & 0 deletions
28
...c/test/java/org/apache/dubbo/common/extension/activate/impl/ActivateWrapperExt1Impl1.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,28 @@ | ||
/* | ||
* 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.extension.activate.impl; | ||
|
||
import org.apache.dubbo.common.extension.Activate; | ||
import org.apache.dubbo.common.extension.activate.ActivateWrapperExt1; | ||
|
||
@Activate(order = 1, group = {"order"}) | ||
public class ActivateWrapperExt1Impl1 implements ActivateWrapperExt1 { | ||
public String echo(String msg) { | ||
return msg; | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
...c/test/java/org/apache/dubbo/common/extension/activate/impl/ActivateWrapperExt1Impl2.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,28 @@ | ||
/* | ||
* 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.extension.activate.impl; | ||
|
||
import org.apache.dubbo.common.extension.Activate; | ||
import org.apache.dubbo.common.extension.activate.ActivateWrapperExt1; | ||
|
||
@Activate(order = 2, group = {"order"}) | ||
public class ActivateWrapperExt1Impl2 implements ActivateWrapperExt1 { | ||
public String echo(String msg) { | ||
return msg; | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
...test/java/org/apache/dubbo/common/extension/activate/impl/ActivateWrapperExt1Wrapper.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,34 @@ | ||
/* | ||
* 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.extension.activate.impl; | ||
|
||
import org.apache.dubbo.common.extension.activate.ActivateWrapperExt1; | ||
|
||
|
||
public class ActivateWrapperExt1Wrapper implements ActivateWrapperExt1 { | ||
private ActivateWrapperExt1 activateWrapperExt1; | ||
|
||
public ActivateWrapperExt1Wrapper(ActivateWrapperExt1 activateWrapperExt1) { | ||
this.activateWrapperExt1 = activateWrapperExt1; | ||
} | ||
|
||
@Override | ||
public String echo(String msg) { | ||
return activateWrapperExt1.echo(msg); | ||
} | ||
} |
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
3 changes: 3 additions & 0 deletions
3
...es/META-INF/dubbo/internal/org.apache.dubbo.common.extension.activate.ActivateWrapperExt1
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,3 @@ | ||
wrapper1=org.apache.dubbo.common.extension.activate.impl.ActivateWrapperExt1Wrapper | ||
extImp1=org.apache.dubbo.common.extension.activate.impl.ActivateWrapperExt1Impl1 | ||
extImp2=org.apache.dubbo.common.extension.activate.impl.ActivateWrapperExt1Impl2 |