Skip to content

[SYNCOPE-1951] - Add realm search base on plain attr#1300

Draft
TatoniMatteo wants to merge 5 commits intoapache:4_0_Xfrom
TatoniMatteo:SYNCOPE-1951
Draft

[SYNCOPE-1951] - Add realm search base on plain attr#1300
TatoniMatteo wants to merge 5 commits intoapache:4_0_Xfrom
TatoniMatteo:SYNCOPE-1951

Conversation

@TatoniMatteo
Copy link
Contributor

No description provided.

doReturn(Optional.of(aLong)).when(plainSchemaDAO).findById("aLong");
doAnswer(ic -> {
PlainAttrValue value = ic.getArgument(2);
value.setLongValue(Long.valueOf(ic.getArgument(1)));

Check notice

Code scanning / CodeQL

Missing catch of NumberFormatException Note test

Potential uncaught 'java.lang.NumberFormatException'.
return new CheckResult<>(schema, attrValue, cond);
}

protected CheckResult<AnyCond> check(final AnyCond cond) {

Check notice

Code scanning / CodeQL

Confusing overloading of methods Note

Method OpenSearchRealmSearchDAO.check(..) could be confused with overloaded method
check
, since dispatch depends on static types.
return fillAttrQuery(checked.schema(), checked.value(), cond);
}

protected Query getQuery(final AnyCond cond) {

Check notice

Code scanning / CodeQL

Confusing overloading of methods Note

Method OpenSearchRealmSearchDAO.getQuery(..) could be confused with overloaded method
getQuery
, since dispatch depends on static types.
return fillAttrQuery(checked.schema(), checked.value(), checked.cond());
}

protected Query getQueryForCustomConds(final SearchCond cond) {

Check notice

Code scanning / CodeQL

Useless parameter Note

The parameter 'cond' is never used.
doReturn(Optional.of(aLong)).when(plainSchemaDAO).findById("aLong");
doAnswer(ic -> {
PlainAttrValue value = ic.getArgument(2);
value.setLongValue(Long.valueOf(ic.getArgument(1)));

Check notice

Code scanning / CodeQL

Missing catch of NumberFormatException Note test

Potential uncaught 'java.lang.NumberFormatException'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments