Commit e600a1f5 authored by Fred Eisele's avatar Fred Eisele
Browse files

suppress warnings

parent 64f78bbe
......@@ -7,9 +7,6 @@ import java.util.LinkedHashSet;
import java.util.Set;
import java.util.function.Predicate;
import catdata.aql.Lineage;
import catdata.aql.Term;
public class BinRelMap<X, Y> implements Iterable<Pair<X, Y>> {
@Override
......@@ -191,7 +188,7 @@ public class BinRelMap<X, Y> implements Iterable<Pair<X, Y>> {
public int size() {
int i = 0;
for (Pair<X, Y> x : this) {
for (@SuppressWarnings("unused") Pair<X, Y> x : this) {
i++;
}
return i;
......
......@@ -4,11 +4,8 @@ import java.io.Serializable;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.apache.commons.lang3.builder.CompareToBuilder;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
/**
......
package catdata;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.util.ArrayList;
import java.util.Arrays;
......@@ -288,7 +284,7 @@ public class Util {
return ret;
}
@SuppressWarnings({ "unchecked", "SuspiciousArrayCast" })
@SuppressWarnings({ "unchecked" })
public static <X> X[] sing(X x) {
return (X[]) new Object[] { x };
}
......
......@@ -111,6 +111,7 @@ public class Anonymized<Ty, En, Sym, Fk, Att, Gen, Sk, X, Y> extends Instance<Ty
}
};
@SuppressWarnings("hiding")
private <En, Sym, Fk, Att, Gen, Sk> Object iso1(Object obj, Ty ty) {
if (I.schema().typeSide.js.java_tys.containsKey(ty)) {
String ty2 = I.schema().typeSide.js.java_tys.map.get(ty);
......@@ -145,6 +146,7 @@ public class Anonymized<Ty, En, Sym, Fk, Att, Gen, Sk, X, Y> extends Instance<Ty
return obj;
}
@SuppressWarnings("hiding")
private <En, Sym, Fk, Att, Gen, Sk> Term<Ty, En, Sym, Fk, Att, Gen, Sk> iso1(Term<Ty, En, Sym, Fk, Att, Gen, Sk> t) {
return t.visit(x->Term.Var(x),(obj,ty)->Term.Obj(iso1(obj,ty),ty), (sym,x)->Term.Sym(sym, x), (fk,x)->Term.Fk(fk,x), (att,x)->Term.Att(att,x), x->Term.Gen(x), x->Term.Sk(x));
}
......
......@@ -9,8 +9,6 @@ import javax.script.Bindings;
import javax.script.Invocable;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import javax.script.ScriptException;
import catdata.Ctx;
import catdata.Pair;
import catdata.Util;
......
......@@ -87,7 +87,7 @@ public class Chase<Ty, En1, Sym, Fk1, Att1, En2, Fk2, Att2, Gen, Sk, X, Y> {
for (Att2 att : F.dst.atts.keySet()) {
atts.put(att, new BinRelMap<>());
}
for (Ty ty : F.src.typeSide.tys) {
for (@SuppressWarnings("unused") Ty ty : F.src.typeSide.tys) {
// vs.put(ty, new Ctx<>());
}
}
......
......@@ -25,6 +25,7 @@ import catdata.provers.KBTheory;
//TODO: aql validate collage
public class Collage<Ty, En, Sym, Fk, Att, Gen, Sk> {
@SuppressWarnings({ "hiding", "unchecked" })
public <Ty, En, Sym, Fk, Att, Gen, Sk> Collage<Ty, En, Sym, Fk, Att, Gen, Sk> convert() {
return (Collage<Ty, En, Sym, Fk, Att, Gen, Sk>) this;
}
......
package catdata.aql;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import catdata.Util;
......@@ -359,6 +358,7 @@ public class Head<Ty, En, Sym, Fk, Att, Gen, Sk> implements Comparable<Head<Ty,
if (x.getClass() != getClass()) {
return false;
}
@SuppressWarnings("unchecked")
Head<Ty, En, Sym, Fk, Att, Gen, Sk> o = (Head<Ty, En, Sym, Fk, Att, Gen, Sk>) x;
if (ty != null) {
return (ty.equals(o.ty) && obj.equals(o.obj));
......
......@@ -2,8 +2,6 @@ package catdata.aql;
import java.util.Collection;
import java.util.function.Function;
import java.util.stream.Collectors;
import catdata.Chc;
import catdata.Ctx;
import catdata.Triple;
......
......@@ -75,12 +75,14 @@ public final class Mapping<Ty,En1,Sym,Fk1,Att1,En2,Fk2,Att2> implements Semantic
}
for (Att1 a : src.atts.keySet()) {
En1 v = src.atts.get(a).first;
@SuppressWarnings("unused")
Ty w = src.atts.get(a).second;
//a = m_v.F(a)
Var x = atts.get(a).first;
Term<Ty, Chc<En1, En2>, Sym, Chc<Chc<Fk1,Fk2>,En1>, Chc<Att1, Att2>, Void, Void> lhs
= Term.Att(Chc.inLeft(a), Term.Var(x));
@SuppressWarnings("unused")
En2 en2 = atts.get(a).second;
Term<Ty, Chc<En1, En2>, Sym, Fk2, Att2, Void, Void> l = atts.get(a).third.mapEn();
Function<Fk2,Chc<Chc<Fk1,Fk2>,En1>> f = xx->Chc.inLeft(Chc.inRight(xx));
......@@ -109,6 +111,7 @@ public final class Mapping<Ty,En1,Sym,Fk1,Att1,En2,Fk2,Att2> implements Semantic
return ret;
}
@SuppressWarnings("hiding")
private <Att1, Att2> Map<Chc<Chc<Att1, Att2>,En1>, Pair<Chc<En1, En2>, Chc<En1,En2>>> or2(Ctx<Att1, Pair<En1, En1>> xs,
Ctx<Att2, Pair<En2, En2>> ys) {
Map<Chc<Chc<Att1, Att2>,En1>, Pair<Chc<En1, En2>, Chc<En1,En2>>> ret = new HashMap<>();
......
......@@ -925,7 +925,7 @@ public final class Term<Ty, En, Sym, Fk, Att, Gen, Sk> {
}
@SuppressWarnings("unchecked")
@SuppressWarnings({ "unchecked", "hiding" })
public <En> Term<Ty, En, Sym, Fk, Att, Gen, Sk> mapEn() {
return (Term<Ty, En, Sym, Fk, Att, Gen, Sk>) this;
}
......
......@@ -5,8 +5,6 @@ import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.stream.Collectors;
import catdata.Chc;
import catdata.Ctx;
import catdata.Pair;
......
......@@ -9,7 +9,6 @@ import catdata.Pair;
import catdata.ParseException;
import catdata.Program;
import catdata.Triple;
import catdata.Util;
import catdata.aql.AqlOptions;
import catdata.aql.RawTerm;
......
......@@ -2,7 +2,6 @@ package catdata.aql.exp;
import java.io.File;
import java.io.FileReader;
import java.lang.reflect.Field;
import java.util.Arrays;
import java.util.HashMap;
import java.util.LinkedList;
......
......@@ -48,6 +48,7 @@ public abstract class InstExpImport<Handle, Q>
return raw;
}
@SuppressWarnings("hiding")
public static <En> Gen toGen(En en, String o, boolean b, String sep) {
if (b) {
return new Gen(en + sep + o);
......@@ -268,6 +269,7 @@ public abstract class InstExpImport<Handle, Q>
protected abstract void joinedEn(Handle h, En en, Q s, Schema<Ty, En, Sym, Fk, Att> sch) throws Exception;
@SuppressWarnings("hiding")
public static <Ty, En, Sym, Fk, Att, Gen> Instance<Ty, En, Sym, Fk, Att, Gen, Null<?>, Gen, Null<?>> forTheory(
Schema<Ty, En, Sym, Fk, Att> sch, Ctx<En, Collection<Gen>> ens0, Ctx<Ty, Collection<Null<?>>> tys0,
Ctx<Gen, Ctx<Fk, Gen>> fks0, Ctx<Gen, Ctx<Att, Term<Ty, Void, Sym, Void, Void, Void, Null<?>>>> atts0,
......@@ -337,6 +339,7 @@ public abstract class InstExpImport<Handle, Q>
}
} */
@SuppressWarnings("unused")
private void totalityCheck(Schema<Ty, En, Sym, Fk, Att> sch, Map<En, Q> ens, Map<Ty, Q> tys,
Map<Att, Q> atts, Map<Fk, Q> fks) {
// for (En En : sch.ens) {
......
......@@ -99,6 +99,7 @@ public class InstExpJdbcAll extends InstExp<Ty, En, Sym, Fk, Att, Gen, Null<?>,
Set<Map<SqlColumn, Optional<Object>>> tuples = inst.get(table);
Map<Map<SqlColumn, Optional<Object>>, Gen> i1 = new HashMap<>();
@SuppressWarnings("unused")
SqlColumn thePk = null;
if (table.pk.size() == 1) {
thePk = Util.get0(table.pk);
......
......@@ -14,7 +14,6 @@ import catdata.aql.AqlOptions;
import catdata.aql.AqlOptions.AqlOption;
import catdata.aql.DP;
import catdata.aql.ImportAlgebra;
import catdata.aql.Instance;
import catdata.aql.Kind;
import catdata.aql.Schema;
import catdata.aql.Term;
......
......@@ -10,7 +10,6 @@ import catdata.Ctx;
import catdata.Pair;
import catdata.Quad;
import catdata.Triple;
import catdata.Util;
import catdata.aql.RawTerm;
public class LocStr {
......
......@@ -9,8 +9,6 @@ import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import catdata.Chc;
import catdata.Ctx;
import catdata.Pair;
......@@ -67,6 +65,7 @@ public final class MapExpRaw extends MapExp<Ty, En, Sym, Fk, Att, En, Fk, Att> i
private Ctx<Fk, Integer> fkPos = new Ctx<>();
private Ctx<Att, Integer> attPos = new Ctx<>();
@SuppressWarnings("unchecked")
public MapExpRaw(SchExp<?, ?, ?, ?, ?> src, SchExp<?, ?, ?, ?, ?> dst, List<LocStr> imports,
List<Pair<LocStr, Triple<String, List<Pair<LocStr, List<String>>>, List<Pair<LocStr, Triple<String, String, RawTerm>>>>>> list,
List<Pair<String, String>> options) {
......
......@@ -53,6 +53,7 @@ public abstract class PragmaExp extends Exp<Pragma> {
/////////////////////////////////////////////////////////////////////////////////////////////////
@SuppressWarnings("hiding")
public static final class PragmaExpConsistent<Ty,En,Sym,Fk,Att,Gen,Sk,X,Y> extends PragmaExp {
public final InstExp<Ty,En,Sym,Fk,Att,Gen,Sk,X,Y> I;
@Override
......@@ -125,6 +126,7 @@ public abstract class PragmaExp extends Exp<Pragma> {
/////////////////////////////////////////////////////////////////////////////////////////////////
@SuppressWarnings("hiding")
public static final class PragmaExpCheck<Ty,En,Sym,Fk,Att,Gen,Sk,X,Y> extends PragmaExp {
public InstExp<Ty,En,Sym,Fk,Att,Gen,Sk,X,Y> I;
public EdsExp<Ty,En,Sym,Fk,Att> C;
......@@ -531,6 +533,7 @@ public abstract class PragmaExp extends Exp<Pragma> {
////////////////////////////////////////////////////////////////////////////////////////////////
@SuppressWarnings("hiding")
public static final class PragmaExpToCsvInst<Ty, En, Sym, Att, Fk, Gen, Sk, X, Y> extends PragmaExp {
public final String file;
......@@ -612,6 +615,7 @@ public abstract class PragmaExp extends Exp<Pragma> {
///////////////////////////////////////////////////////////////////
@SuppressWarnings("hiding")
public static final class PragmaExpToCsvTrans<Ty, En, Sym, Att, Fk, Gen1, Sk1, X1, Y1, Gen2, Sk2, X2, Y2> extends PragmaExp {
public final String file;
......@@ -906,6 +910,7 @@ public abstract class PragmaExp extends Exp<Pragma> {
/////////////////////////////////////////////////
@SuppressWarnings("hiding")
public static class PragmaExpToJdbcInst<Ty, En, Sym, Att, Fk, Gen, Sk, X, Y> extends PragmaExp {
public final String jdbcString;
......@@ -1137,6 +1142,7 @@ public abstract class PragmaExp extends Exp<Pragma> {
/////////////////////////////////////////////////////////////////////////////////////////////////
@SuppressWarnings("hiding")
public static class PragmaExpToJdbcQuery<Ty, En1, Sym, Fk1, Att1, En2, Fk2, Att2> extends PragmaExp {
public final String jdbcString;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment