Skip to content

Commit 595d420

Browse files
author
Mohamed Bilal
committed
Addressed review comments
1 parent 2dbd2d2 commit 595d420

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/microsoft/graph/serializer/CalendarSerializer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,15 @@ public static Calendar deserialize(final String strVal) throws ParseException {
7777

7878
// Parse the well-formatted date string with and without offsets (eg: 2019-06-21T17:12:35.138, 2019-06-21T17:12:35.138+0000, 2019-06-21T17:12:35.138-07:00)
7979
final String datePattern;
80-
if (modifiedStrVal.contains(".")) {
80+
if (hasDot) {
8181

8282
String offsetSuffix = modifiedStrVal.substring(modifiedStrVal.indexOf(".") + 1);
8383

8484
// Find index of offset
8585
int offsetIndex = -1;
8686
if (hasOffset) {
8787
offsetIndex = (offsetSuffix.indexOf('+') != -1) ? offsetSuffix.indexOf('+') : offsetSuffix.indexOf('-');
88-
offsetIndex = modifiedStrVal.indexOf(".") + 1 + offsetIndex; //find offset index in original string
88+
offsetIndex = modifiedStrVal.indexOf('.') + 1 + offsetIndex; //find offset index in original string
8989
}
9090

9191

0 commit comments

Comments
 (0)