Skip to content

Commit

Permalink
Cleaned up commented code and a few PMD warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
david-waltermire committed Feb 22, 2024
1 parent 2993e4c commit 0782426
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -745,14 +745,16 @@ protected IExpression handleAndexpr(AndexprContext ctx) {
* ====================================================================
*/

@SuppressWarnings("PMD.AvoidInstantiatingObjectsInLoops")
@Override
protected IExpression handleForexpr(ForexprContext ctx) {
SimpleforclauseContext simpleForClause = ctx.simpleforclause();

// for SimpleForBinding ("," SimpleForBinding)*
int bindingCount = simpleForClause.getChildCount() / 2;

@NonNull IExpression retval = ObjectUtils.notNull(ctx.exprsingle().accept(this));
@NonNull
IExpression retval = ObjectUtils.notNull(ctx.exprsingle().accept(this));

// step through in reverse
for (int idx = bindingCount - 1; idx >= 0; idx--) {
Expand Down Expand Up @@ -781,7 +783,8 @@ protected IExpression handleForexpr(ForexprContext ctx) {

@Override
protected IExpression handleLet(LetexprContext context) {
@NonNull IExpression retval = ObjectUtils.notNull(context.exprsingle().accept(this));
@NonNull
IExpression retval = ObjectUtils.notNull(context.exprsingle().accept(this));

SimpleletclauseContext letClause = context.simpleletclause();
List<SimpleletbindingContext> clauses = letClause.simpleletbinding();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@
public class XmlMetaConstraintLoader
extends AbstractLoader<IConstraintSet>
implements IConstraintLoader {
// private static final Logger LOGGER =
// LogManager.getLogger(XmlMetaConstraintLoader.class);

@Override
protected IConstraintSet parseResource(URI resource, Deque<URI> visitedResources) throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ private UriUtils() {
* @throws URISyntaxException
* an error if the location string is not convertible to URI
*/
@SuppressWarnings("PMD.PreserveStackTrace")
public static URI toUri(@NonNull String location, @NonNull URI baseUri) throws URISyntaxException {
URI asUri;
try {
Expand Down

0 comments on commit 0782426

Please sign in to comment.