-
Notifications
You must be signed in to change notification settings - Fork 810
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WW-5251 Reinstate deleted interfaces with transparent compat #898
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
core/src/main/java/org/apache/struts2/interceptor/ApplicationAware.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,32 @@ | ||
/* | ||
* 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.struts2.interceptor; | ||
|
||
import java.util.Map; | ||
|
||
@Deprecated | ||
public interface ApplicationAware extends org.apache.struts2.action.ApplicationAware { | ||
|
||
void setApplication(Map<String, Object> application); | ||
|
||
@Override | ||
default void withApplication(Map<String, Object> application) { | ||
setApplication(application); | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
core/src/main/java/org/apache/struts2/interceptor/HttpParametersAware.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,32 @@ | ||
/* | ||
* 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.struts2.interceptor; | ||
|
||
import org.apache.struts2.dispatcher.HttpParameters; | ||
|
||
@Deprecated | ||
public interface HttpParametersAware extends org.apache.struts2.action.ParametersAware { | ||
|
||
void setParameters(HttpParameters parameters); | ||
|
||
@Override | ||
default void withParameters(HttpParameters parameters) { | ||
setParameters(parameters); | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
core/src/main/java/org/apache/struts2/interceptor/ParameterAware.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,36 @@ | ||
/* | ||
* 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.struts2.interceptor; | ||
|
||
import org.apache.struts2.dispatcher.HttpParameters; | ||
|
||
import java.util.Map; | ||
|
||
import static java.util.stream.Collectors.toMap; | ||
|
||
@Deprecated | ||
public interface ParameterAware extends org.apache.struts2.action.ParametersAware { | ||
|
||
void setParameters(Map map); | ||
|
||
@Override | ||
default void withParameters(HttpParameters parameters) { | ||
setParameters(parameters.entrySet().stream().collect(toMap(Map.Entry::getKey, e -> e.getValue().getMultipleValues()))); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
core/src/main/java/org/apache/struts2/interceptor/PrincipalAware.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,30 @@ | ||
/* | ||
* 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.struts2.interceptor; | ||
|
||
@Deprecated | ||
public interface PrincipalAware extends org.apache.struts2.action.PrincipalAware { | ||
|
||
void setPrincipalProxy(PrincipalProxy principalProxy); | ||
|
||
@Override | ||
default void withPrincipalProxy(PrincipalProxy principalProxy) { | ||
setPrincipalProxy(principalProxy); | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
core/src/main/java/org/apache/struts2/interceptor/RequestAware.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,41 @@ | ||
/* | ||
* 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.struts2.interceptor; | ||
|
||
import org.apache.struts2.dispatcher.RequestMap; | ||
|
||
import javax.servlet.http.HttpServletRequest; | ||
import java.util.Map; | ||
|
||
@Deprecated | ||
public interface RequestAware extends ServletRequestAware { | ||
|
||
@Override | ||
default void setServletRequest(HttpServletRequest httpServletRequest) { | ||
// default no-op | ||
} | ||
|
||
@Override | ||
default void withServletRequest(HttpServletRequest request) { | ||
ServletRequestAware.super.withServletRequest(request); | ||
setRequest(new RequestMap(request)); | ||
} | ||
|
||
void setRequest(Map<String, Object> request); | ||
} |
32 changes: 32 additions & 0 deletions
32
core/src/main/java/org/apache/struts2/interceptor/ServletRequestAware.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,32 @@ | ||
/* | ||
* 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.struts2.interceptor; | ||
|
||
import javax.servlet.http.HttpServletRequest; | ||
|
||
@Deprecated | ||
public interface ServletRequestAware extends org.apache.struts2.action.ServletRequestAware { | ||
|
||
void setServletRequest(HttpServletRequest httpServletRequest); | ||
|
||
@Override | ||
default void withServletRequest(HttpServletRequest request) { | ||
setServletRequest(request); | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
core/src/main/java/org/apache/struts2/interceptor/ServletResponseAware.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,32 @@ | ||
/* | ||
* 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.struts2.interceptor; | ||
|
||
import javax.servlet.http.HttpServletResponse; | ||
|
||
@Deprecated | ||
public interface ServletResponseAware extends org.apache.struts2.action.ServletResponseAware { | ||
|
||
void setServletResponse(HttpServletResponse httpServletResponse); | ||
|
||
@Override | ||
default void withServletResponse(HttpServletResponse response) { | ||
setServletResponse(response); | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
core/src/main/java/org/apache/struts2/interceptor/SessionAware.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,32 @@ | ||
/* | ||
* 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.struts2.interceptor; | ||
|
||
import java.util.Map; | ||
|
||
@Deprecated | ||
public interface SessionAware extends org.apache.struts2.action.SessionAware { | ||
|
||
void setSession(Map<String, Object> session); | ||
|
||
@Override | ||
default void withSession(Map<String, Object> session) { | ||
setSession(session); | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
core/src/main/java/org/apache/struts2/util/ServletContextAware.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,32 @@ | ||
/* | ||
* 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.struts2.util; | ||
|
||
import javax.servlet.ServletContext; | ||
|
||
@Deprecated | ||
public interface ServletContextAware extends org.apache.struts2.action.ServletContextAware { | ||
|
||
void setServletContext(ServletContext context); | ||
|
||
@Override | ||
default void withServletContext(ServletContext context) { | ||
setServletContext(context); | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
...ins/portlet/src/main/java/org/apache/struts2/portlet/interceptor/PortletContextAware.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,32 @@ | ||
/* | ||
* 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.struts2.portlet.interceptor; | ||
|
||
import javax.portlet.PortletContext; | ||
|
||
@Deprecated | ||
public interface PortletContextAware extends org.apache.struts2.portlet.action.PortletContextAware { | ||
|
||
void setPortletContext(PortletContext portletContext); | ||
|
||
@Override | ||
default void withPortletContext(PortletContext context) { | ||
setPortletContext(context); | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
...portlet/src/main/java/org/apache/struts2/portlet/interceptor/PortletPreferencesAware.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,32 @@ | ||
/* | ||
* 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.struts2.portlet.interceptor; | ||
|
||
import javax.portlet.PortletPreferences; | ||
|
||
@Deprecated | ||
public interface PortletPreferencesAware extends org.apache.struts2.portlet.action.PortletPreferencesAware { | ||
|
||
void setPortletPreferences(PortletPreferences prefs); | ||
|
||
@Override | ||
default void withPortletPreferences(PortletPreferences prefs) { | ||
setPortletPreferences(prefs); | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To match the existing signature, which caused build issues for us, this needs to be:
setParameters(Map<String, String[]> map);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah good catch, not sure how I managed to drop the generic types here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did check the other files in the review and it was just this one.
We were able to build fine and it's going through our automation, what we have anyway, tonight.