dropwizard-request-logging/src/test/java/io/dropwizard/request/logging/LogbackAccessRequestLogTest.java
Do not hard code the IP address Open
Open
assertThat(event.getRemoteAddr()).isEqualTo("10.0.0.1");
- Read upRead up
- Exclude checks
AvoidUsingHardCodedIP
Since: PMD 4.1
Priority: Medium
Categories: Style
Remediation Points: 50000
Application with hard-coded IP addresses can become impossible to deploy in some cases. Externalizing IP adresses is preferable.
Example:
public class Foo {
private String ip = '127.0.0.1'; // not recommended
}
Do not hard code the IP address Open
Open
when(request.getRemoteAddr()).thenReturn("10.0.0.1");
- Read upRead up
- Exclude checks
AvoidUsingHardCodedIP
Since: PMD 4.1
Priority: Medium
Categories: Style
Remediation Points: 50000
Application with hard-coded IP addresses can become impossible to deploy in some cases. Externalizing IP adresses is preferable.
Example:
public class Foo {
private String ip = '127.0.0.1'; // not recommended
}