Skip to content

Commit c60942a

Browse files
committed
Merge pull request OfficeDev#243 from vbauer/message-format
- fix message concatenation
2 parents 50c419b + 2a9d00d commit c60942a

2 files changed

Lines changed: 12 additions & 10 deletions

File tree

src/main/java/microsoft/exchange/webservices/data/ExchangeServiceBase.java

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838

3939
import javax.xml.stream.XMLStreamException;
4040
import javax.xml.stream.XMLStreamWriter;
41+
4142
import java.io.ByteArrayOutputStream;
4243
import java.io.Closeable;
4344
import java.io.File;
@@ -49,11 +50,14 @@
4950
import java.security.KeyStoreException;
5051
import java.security.NoSuchAlgorithmException;
5152
import java.text.DateFormat;
52-
import java.text.ParseException;
5353
import java.text.SimpleDateFormat;
54-
import java.util.*;
55-
import java.util.regex.Matcher;
56-
import java.util.regex.Pattern;
54+
import java.util.Date;
55+
import java.util.EnumSet;
56+
import java.util.HashMap;
57+
import java.util.List;
58+
import java.util.Map;
59+
import java.util.Random;
60+
import java.util.TimeZone;
5761

5862
/**
5963
* Represents an abstract binding to an Exchange Service.
@@ -324,11 +328,9 @@ protected void internalProcessHttpErrorResponse(HttpWebRequest httpWebResponse,
324328
accountUnlockUrl = new URI(location);
325329
}
326330

327-
this.traceMessage(responseTraceFlag,
328-
String.format("Account is locked. Unlock URL is {0}", accountUnlockUrl));
329-
330-
throw new AccountIsLockedException(String.format(Strings.AccountIsLocked, accountUnlockUrl),
331-
accountUnlockUrl, webException);
331+
final String message = String.format(Strings.AccountIsLocked, accountUnlockUrl);
332+
this.traceMessage(responseTraceFlag, message);
333+
throw new AccountIsLockedException(message, accountUnlockUrl, webException);
332334
}
333335
}
334336

src/main/java/microsoft/exchange/webservices/data/MapiTypeConverterMapEntry.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ protected MapiTypeConverterMapEntry(Class<?> type) {
9696
EwsUtilities.EwsAssert(
9797
defaultValueMap.getMember().containsKey(type),
9898
"MapiTypeConverterMapEntry ctor",
99-
String.format("No default value entry for type {0}", type.getName()));
99+
"No default value entry for type " + type.getName());
100100

101101
this.type = type;
102102
this.convertToString = new IFunction<Object, String>() {

0 commit comments

Comments
 (0)