Skip to content

Commit c308ca0

Browse files
oconnelciluwatar
authored andcommitted
1011: Fixed all of the SonarCloud blocking errors (iluwatar#1017)
* 1011: Added the method to the RequestMapping annotation * 1011: Changed all of the a href blank targets to include rel="noopener noreferrer"
1 parent 880b234 commit c308ca0

File tree

3 files changed

+13
-11
lines changed
  • aggregator-microservices/aggregator-service/src/main/java/com/iluwatar/aggregator/microservices
  • api-gateway/api-gateway-service/src/main/java/com/iluwatar/api/gateway
  • naked-objects/webapp/src/main/webapp/about

3 files changed

+13
-11
lines changed

aggregator-microservices/aggregator-service/src/main/java/com/iluwatar/aggregator/microservices/Aggregator.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,12 @@
2222
*/
2323
package com.iluwatar.aggregator.microservices;
2424

25+
import javax.annotation.Resource;
26+
2527
import org.springframework.web.bind.annotation.RequestMapping;
28+
import org.springframework.web.bind.annotation.RequestMethod;
2629
import org.springframework.web.bind.annotation.RestController;
2730

28-
import javax.annotation.Resource;
29-
3031
/**
3132
* The aggregator aggregates calls on various micro-services, collects
3233
* data and further publishes them under a REST endpoint.
@@ -47,7 +48,7 @@ public class Aggregator {
4748
*
4849
* @return a Product.
4950
*/
50-
@RequestMapping("/product")
51+
@RequestMapping(path = "/product", method = RequestMethod.GET)
5152
public Product getProduct() {
5253
Product product = new Product();
5354
product.setTitle(informationClient.getProductTitle());

api-gateway/api-gateway-service/src/main/java/com/iluwatar/api/gateway/ApiGateway.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
package com.iluwatar.api.gateway;
2424

2525
import org.springframework.web.bind.annotation.RequestMapping;
26+
import org.springframework.web.bind.annotation.RequestMethod;
2627
import org.springframework.web.bind.annotation.RestController;
2728

2829
import javax.annotation.Resource;
@@ -43,7 +44,7 @@ public class ApiGateway {
4344
* Retrieves product information that desktop clients need
4445
* @return Product information for clients on a desktop
4546
*/
46-
@RequestMapping("/desktop")
47+
@RequestMapping(path = "/desktop", method = RequestMethod.GET)
4748
public DesktopProduct getProductDesktop() {
4849
DesktopProduct desktopProduct = new DesktopProduct();
4950
desktopProduct.setImagePath(imageClient.getImagePath());
@@ -55,7 +56,7 @@ public DesktopProduct getProductDesktop() {
5556
* Retrieves product information that mobile clients need
5657
* @return Product information for clients on a mobile device
5758
*/
58-
@RequestMapping("/mobile")
59+
@RequestMapping(path = "/mobile", method = RequestMethod.GET)
5960
public MobileProduct getProductMobile() {
6061
MobileProduct mobileProduct = new MobileProduct();
6162
mobileProduct.setPrice(priceClient.getPrice());

naked-objects/webapp/src/main/webapp/about/index.html

+6-6
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,12 @@
8282

8383
<p>
8484
This app has been generated using Apache Isis'
85-
<a href="http://isis.apache.org/intro/getting-started/simple%61pp-archetype.html" target="_blank">SimpleApp</a> archetype,
85+
<a href="http://isis.apache.org/intro/getting-started/simple%61pp-archetype.html" target="_blank" rel="noopener noreferrer">SimpleApp</a> archetype,
8686
to create a purposefully minimal application that nevertheless includes fixture data, integration tests and BDD specs.
8787
<br/>
8888
<br/>
89-
The app itself consists of a single domain class, <a href="https://github.com/apache/isis/blob/master/example/application/simple%61pp/dom/src/main/java/dom/simple/SimpleObject.java" target="_blank"><tt>SimpleObject</tt></a>,
90-
along with an equally simple (factory/repository) domain service, <a href="https://github.com/apache/isis/blob/master/example/application/simple%61pp/dom/src/main/java/dom/simple/SimpleObjects.java" target="_blank"><tt>SimpleObjects</tt></a>.
89+
The app itself consists of a single domain class, <a href="https://github.com/apache/isis/blob/master/example/application/simple%61pp/dom/src/main/java/dom/simple/SimpleObject.java" target="_blank" rel="noopener noreferrer"><tt>SimpleObject</tt></a>,
90+
along with an equally simple (factory/repository) domain service, <a href="https://github.com/apache/isis/blob/master/example/application/simple%61pp/dom/src/main/java/dom/simple/SimpleObjects.java" target="_blank" rel="noopener noreferrer"><tt>SimpleObjects</tt></a>.
9191
</p>
9292

9393
<p>To access the app:</p>
@@ -98,8 +98,8 @@
9898
</p>
9999
<p>
100100
provides accesses to a generic UI for end-users,
101-
Isis' <a href="http://isis.apache.org/components/viewers/wicket/about.html" target="_blank">Wicket Viewer</a>.
102-
As its name suggests, this viewer is built on top of <a href="http://wicket.apache.org" target="_blank">Apache Wicket</a>&trade;.
101+
Isis' <a href="http://isis.apache.org/components/viewers/wicket/about.html" target="_blank" rel="noopener noreferrer">Wicket Viewer</a>.
102+
As its name suggests, this viewer is built on top of <a href="http://wicket.apache.org" target="_blank" rel="noopener noreferrer">Apache Wicket</a>&trade;.
103103
</p>
104104
</li>
105105
<li>
@@ -118,7 +118,7 @@
118118

119119
<p>
120120
The default user/password is <b><i>sven/pass</i></b> (as configured in the
121-
<a href="https://github.com/apache/isis/blob/master/example/application/simple%61pp/webapp/src/main/webapp/WEB-INF/shiro.ini" target="_blank">shiro.ini</a> file).
121+
<a href="https://github.com/apache/isis/blob/master/example/application/simple%61pp/webapp/src/main/webapp/WEB-INF/shiro.ini" target="_blank" rel="noopener noreferrer">shiro.ini</a> file).
122122
</p>
123123

124124
</div>

0 commit comments

Comments
 (0)