Skip to content

Commit

Permalink
Fix rule
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Manuel Leflet Estrada <[email protected]>
  • Loading branch information
jmle committed Nov 25, 2024
1 parent 4bbba51 commit eb47aaf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@
when:
and:
- java.referenced:
pattern: org.springframework.web.client.RestTemplate
location: CONSTRUCTOR_CALL
pattern: org.springframework.http.client.HttpComponentsClientHttpRequestFactory
- java.dependency:
name: org.apache.httpcomponents.httpclient
upperbound: 4.5.999999
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.konveyor;

import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
import org.springframework.web.client.RestTemplate;

import java.net.URI;
Expand All @@ -9,6 +10,8 @@ public class Main {
public static void main(String[] args) {
RestTemplate rest = new RestTemplate();
rest.getForEntity(URI.create("http://www.example.com/"), Object.class);

HttpComponentsClientHttpRequestFactory factory = new HttpComponentsClientHttpRequestFactory();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ tests:
analysisParams:
mode: "source-only"
hasIncidents:
exactly: 1
exactly: 2

0 comments on commit eb47aaf

Please sign in to comment.