Skip to content

Commit 85e0272

Browse files
committed
Ctd
1 parent c4716f9 commit 85e0272

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

as2-lib/src/main/java/com/helger/as2lib/processor/sender/AbstractSenderModule.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@
5050
import com.helger.commons.collection.impl.ICommonsMap;
5151
import com.helger.commons.string.StringParser;
5252

53+
/**
54+
* An abstract sender module that allows for retry. It allows to configure the
55+
* maximum number of retries.
56+
*
57+
* @author Philip Helger
58+
*/
5359
public abstract class AbstractSenderModule extends AbstractProcessorModule implements IProcessorSenderModule
5460
{
5561
private static final Logger LOGGER = LoggerFactory.getLogger (AbstractSenderModule.class);
@@ -64,7 +70,8 @@ public abstract class AbstractSenderModule extends AbstractProcessorModule imple
6470
* @return 0 to indicate no retry.
6571
*/
6672
@Nonnegative
67-
protected final int getRetryCount (@Nullable final Partnership aPartnerhsip, @Nullable final Map <String, Object> aOptions)
73+
protected final int getRetryCount (@Nullable final Partnership aPartnerhsip,
74+
@Nullable final Map <String, Object> aOptions)
6875
{
6976
int nRetries = -1;
7077

as2-lib/src/main/java/com/helger/as2lib/processor/storage/MessageFileModule.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ public void handle (@Nonnull final String sAction,
136136

137137
@Override
138138
@Nonnull
139-
protected String getFilename (@Nonnull final IMessage aMsg, @Nullable final String sFileParam) throws AS2InvalidParameterException
139+
protected String getFilename (@Nonnull final IMessage aMsg,
140+
@Nullable final String sFileParam) throws AS2InvalidParameterException
140141
{
141142
final CompositeParameters aCompParams = new CompositeParameters (false).add ("date", new DateParameters ())
142143
.add ("msg", new MessageParameters (aMsg));
@@ -148,11 +149,9 @@ protected static InputStream getHeaderStream (@Nonnull final IMessage aMsg, @Non
148149
{
149150
final StringBuilder aSB = new StringBuilder ();
150151

151-
// write headers to the string buffer
152+
// write headers and a trailing EOL to the string builder
152153
aSB.append ("Message Headers:").append (CHttp.EOL);
153-
154154
aMsg.headers ().forEachHeaderLine (sHeaderLine -> aSB.append (sHeaderLine).append (CHttp.EOL), true);
155-
156155
aSB.append (CHttp.EOL);
157156

158157
// write attributes to the string buffer

0 commit comments

Comments
 (0)