Skip to content

Commit

Permalink
Moved jexl adjustments to own package so that it can't conflict with …
Browse files Browse the repository at this point in the history
…jexl
  • Loading branch information
chbloemer committed Oct 9, 2023
1 parent 572cf6d commit a39e874
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 22 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package de.neuland.pug4j.expression;

import org.apache.commons.jexl3.JexlScript;
import org.apache.commons.jexl3.internal.PugJexlEngine;
import de.neuland.pug4j.jexl3.internal.PugJexlEngine;
import org.apache.commons.jexl3.JexlEngine;
import org.apache.commons.jexl3.MapContext;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.apache.commons.jexl3;
package de.neuland.pug4j.jexl3;

import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.jexl3.JexlArithmetic;

import java.math.BigDecimal;
import java.math.BigInteger;
Expand All @@ -12,6 +13,7 @@ public PugJexlArithmetic(boolean astrict) {
super(astrict);
}

@Override
protected int compare(Object left, Object right, String operator) {
if (left != null && right != null) {
if (left instanceof String || right instanceof String) {
Expand Down Expand Up @@ -102,4 +104,8 @@ public Object add(Object left, Object right) {
return super.add(left, right);
}
}
@Override
public MapBuilder mapBuilder(int size) {
return new de.neuland.pug4j.jexl3.internal.MapBuilder(size);
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.apache.commons.jexl3.internal;
package de.neuland.pug4j.jexl3.internal;

import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
package org.apache.commons.jexl3.internal;
package de.neuland.pug4j.jexl3.internal;


import de.neuland.pug4j.jexl3.PugJexlArithmetic;
import org.apache.commons.jexl3.*;
import org.apache.commons.jexl3.internal.introspection.PugUberspect;
import org.apache.commons.jexl3.internal.Engine;
import org.apache.commons.jexl3.internal.Interpreter;
import org.apache.commons.jexl3.internal.Scope;
import de.neuland.pug4j.jexl3.internal.introspection.PugUberspect;
import org.apache.commons.jexl3.introspection.JexlUberspect;

import java.util.List;
Expand Down Expand Up @@ -35,5 +39,4 @@ public List<JexlUberspect.PropertyResolver> apply(JexlOperator op, Object obj) {
protected Interpreter createInterpreter(JexlContext context, Scope.Frame frame) {
return new PugJexlInterpreter(this, context == null ? EMPTY_CONTEXT : context, frame);
}

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package org.apache.commons.jexl3;
package de.neuland.pug4j.jexl3.internal;

import org.apache.commons.jexl3.JexlContext;
import org.apache.commons.jexl3.JexlException;
import org.apache.commons.jexl3.JexlInfo;
import org.apache.commons.jexl3.internal.Engine;
import org.apache.commons.jexl3.internal.Interpreter;
import org.apache.commons.jexl3.internal.Scope;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package de.neuland.pug4j.jexl3.internal.introspection;

import org.apache.commons.jexl3.internal.introspection.Uberspect;
import org.apache.commons.logging.Log;


public class PugUberspect extends Uberspect {
public PugUberspect(Log runtimeLogger, ResolverStrategy sty) {
super(runtimeLogger, sty);
}
}

This file was deleted.

0 comments on commit a39e874

Please sign in to comment.