Skip to content

Commit 05ceee3

Browse files
Toparvionartembilan
authored andcommitted
GH-3286: Make FileTailingEvent#getMessage public
Fixes #3286 The `FileTailingEvent.getMessage()` is really meant to be as `public` **Cherry-pick to 5.3.x, 5.2.x, 5.1.x & 4.3.x**
1 parent 5ef737a commit 05ceee3

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

spring-integration-file/src/main/java/org/springframework/integration/file/tail/FileTailingMessageProducerSupport.java

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 the original author or authors.
2+
* Copyright 2002-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -36,6 +36,7 @@
3636
* @author Gary Russell
3737
* @author Artem Bilan
3838
* @author Ali Shahbour
39+
* @author Vladimir Plizga
3940
* @since 3.0
4041
*
4142
*/
@@ -218,7 +219,15 @@ public FileTailingEvent(Object source, String message, File file) {
218219
this.file = file;
219220
}
220221

221-
protected String getMessage() {
222+
/**
223+
* Return the text message emitted from the underlying tailing producer
224+
* ({@linkplain ApacheCommonsFileTailingMessageProducer Apache Commons} or one of
225+
* {@linkplain OSDelegatingFileTailingMessageProducer OS natives}).
226+
* <p>Note that for the same event type (e.g. 'file not found') the text may be different
227+
* depending on the producer and its platform.
228+
* @return the original text of the tailing event
229+
*/
230+
public String getMessage() {
222231
return this.message;
223232
}
224233

0 commit comments

Comments
 (0)