Skip to content

Commit 4074217

Browse files
committed
Implement java.util.function.Supplier since we are using Java 8 for a while.
1 parent cfbd981 commit 4074217

File tree

4 files changed

+8
-12
lines changed

4 files changed

+8
-12
lines changed

src/main/java/org/owasp/esapi/logging/appender/ClientInfoSupplier.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515

1616
package org.owasp.esapi.logging.appender;
1717

18-
// Uncomment and use once ESAPI supports Java 8 as the minimal baseline.
19-
// import java.util.function.Supplier;
18+
import java.util.function.Supplier;
2019

2120
import javax.servlet.http.HttpServletRequest;
2221
import javax.servlet.http.HttpSession;
@@ -28,7 +27,7 @@
2827
* Supplier which can provide a String representing the client-side connection
2928
* information.
3029
*/
31-
public class ClientInfoSupplier // implements Supplier<String>
30+
public class ClientInfoSupplier implements Supplier<String>
3231
{
3332
/** Default Last Host string if the Authenticated user is null.*/
3433
private static final String DEFAULT_LAST_HOST = "#UNKNOWN_HOST#";

src/main/java/org/owasp/esapi/logging/appender/EventTypeLogSupplier.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515

1616
package org.owasp.esapi.logging.appender;
1717

18-
// Uncomment and use once ESAPI supports Java 8 as the minimal baseline.
19-
// import java.util.function.Supplier;
18+
import java.util.function.Supplier;
2019

2120
import org.owasp.esapi.Logger;
2221
import org.owasp.esapi.Logger.EventType;
@@ -26,7 +25,7 @@
2625
* an EventType for logging
2726
*
2827
*/
29-
public class EventTypeLogSupplier // implements Supplier<String>
28+
public class EventTypeLogSupplier implements Supplier<String>
3029
{
3130
/** EventType reference to supply log representation of. */
3231
private final EventType eventType;

src/main/java/org/owasp/esapi/logging/appender/ServerInfoSupplier.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515

1616
package org.owasp.esapi.logging.appender;
1717

18-
// Uncomment and use once ESAPI supports Java 8 as the minimal baseline.
19-
// import java.util.function.Supplier;
18+
import java.util.function.Supplier;
2019

2120
import javax.servlet.http.HttpServletRequest;
2221

@@ -26,7 +25,7 @@
2625
* Supplier which can provide a String representing the server-side connection
2726
* information.
2827
*/
29-
public class ServerInfoSupplier // implements Supplier<String>
28+
public class ServerInfoSupplier implements Supplier<String>
3029
{
3130
/** Whether to log the server connection info. */
3231
private boolean logServerIP = true;

src/main/java/org/owasp/esapi/logging/appender/UserInfoSupplier.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515

1616
package org.owasp.esapi.logging.appender;
1717

18-
// Uncomment and use once ESAPI supports Java 8 as the minimal baseline.
19-
// import java.util.function.Supplier;
18+
import java.util.function.Supplier;
2019

2120
import org.owasp.esapi.ESAPI;
2221
import org.owasp.esapi.User;
@@ -25,7 +24,7 @@
2524
* Supplier which can provide a String representing the client-side connection
2625
* information.
2726
*/
28-
public class UserInfoSupplier // implements Supplier<String>
27+
public class UserInfoSupplier implements Supplier<String>
2928
{
3029
/** Default UserName string if the Authenticated user is null.*/
3130
private static final String DEFAULT_USERNAME = "#ANONYMOUS#";

0 commit comments

Comments
 (0)