Skip to content

Commit

Permalink
CU-86b14j4e0_SRU2024_check-code-security-reports-at-GitHub-for-all-repos
Browse files Browse the repository at this point in the history
  • Loading branch information
ptorres-prowide committed Sep 18, 2024
1 parent 6dfa1c0 commit 05500e8
Show file tree
Hide file tree
Showing 10 changed files with 62 additions and 941 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: "CodeQL"

on:
push:
branches: [ "main", "CU-*", "SRU*" ]
branches: [ "main" ]
pull_request:
branches: [ "main", "SRU*" ]
branches: [ "main", "CU-*", "SRU*" ]
schedule:
- cron: "59 12 * * 2"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -442,12 +442,12 @@ public Integer getMessageTypeInt() {
final String number = getMessageType();
if (StringUtils.isNumeric(number)) {
try {
return Integer.parseInt(number);
return Integer.parseInt(number);
} catch (NumberFormatException e) {
log.log(Level.WARNING, "error parsing message type as number: " + e.getMessage(), e);
}
}
return null;
return null;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1940,7 +1940,7 @@ public SwiftTagListBlock append(final Tag... tags) {
* @since 7.7
*/
public SwiftTagListBlock append(final Field field) {
Validate.notNull(field);
Validate.isTrue(field != null);
this.tags.add(field.asTag());
return this;
}
Expand All @@ -1953,7 +1953,7 @@ public SwiftTagListBlock append(final Field field) {
* @since 7.8
*/
public SwiftTagListBlock append(final Field... fields) {
if (fields != null && fields.length > 0) {
if (fields != null) {
for (final Field f : fields) {
append(f);
}
Expand Down
29 changes: 14 additions & 15 deletions src/main/java/com/prowidesoftware/swift/model/field/Field11T.java
Original file line number Diff line number Diff line change
Expand Up @@ -221,14 +221,14 @@ public String getValueDisplay(int component, Locale locale) {
return f.format(cal.getTime());
}
}
// time: HH[mm]
java.text.DateFormat f = new java.text.SimpleDateFormat("HH:mm", notNull(locale));
java.util.Calendar cal = getComponent3AsCalendar();
if (cal != null) {
return f.format(cal.getTime());
}
return null;
// time: HH[mm]
java.text.DateFormat f = new java.text.SimpleDateFormat("HH:mm", notNull(locale));
java.util.Calendar cal = getComponent3AsCalendar();
if (cal != null) {
return f.format(cal.getTime());
}
return null;
}

/**
* Returns the field component types pattern.
Expand Down Expand Up @@ -451,7 +451,6 @@ public Field11T setComponent1(String component1) {
return this;
}


/**
* Alternative method setter for field's Type (component 1) as as Number
*
Expand Down Expand Up @@ -593,7 +592,7 @@ public Field11T setTime(java.util.Calendar component3) {
*
* @return the list of converted components (a Calendar object or null)
*/
@Override
@Override
public List<Calendar> dates() {
return DateResolver.dates(this);
}
Expand Down Expand Up @@ -686,7 +685,7 @@ public static List<Field11T> getAll(final SwiftTagListBlock block) {
* @return line content or null if not present or if line number is above the expected
* @since 7.7
*/
@Override
@Override
public String getLine(int line) {
return getLine(line, 0);
}
Expand All @@ -700,7 +699,7 @@ public String getLine(int line) {
* @return line content or null if not present or if line number is above the expected
* @since 7.7
*/
@Override
@Override
public String getLine(int line, int offset) {
Field11T cp = newInstance(this);
return getLine(cp, line, null, offset);
Expand All @@ -713,7 +712,7 @@ public String getLine(int line, int offset) {
* @return lines content or empty list if field's value is empty
* @since 7.7
*/
@Override
@Override
public List<String> getLines() {
return SwiftParseUtils.getLines(getValue());
}
Expand All @@ -726,7 +725,7 @@ public List<String> getLines() {
* @return found lines or empty list if lines are not present or the offset is invalid
* @since 7.7
*/
@Override
@Override
public List<String> getLines(int offset) {
Field11T cp = newInstance(this);
return SwiftParseUtils.getLines(getLine(cp, null, null, offset));
Expand All @@ -741,7 +740,7 @@ public List<String> getLines(int offset) {
* @return found lines or empty list if value is empty
* @since 7.7
*/
@Override
@Override
public List<String> getLinesBetween(int start, int end) {
return getLinesBetween(start, end, 0);
}
Expand All @@ -756,7 +755,7 @@ public List<String> getLinesBetween(int start, int end) {
* @return found lines or empty list if lines are not present or the offset is invalid
* @since 7.7
*/
@Override
@Override
public List<String> getLinesBetween(int start, int end, int offset) {
Field11T cp = newInstance(this);
return SwiftParseUtils.getLines(getLine(cp, start, end, offset));
Expand Down
Loading

0 comments on commit 05500e8

Please sign in to comment.