From 168c613ac9b32923e279ef6056683342cf5d2b89 Mon Sep 17 00:00:00 2001 From: Jeremy Dubreil Date: Tue, 27 Sep 2016 13:59:05 -0700 Subject: [PATCH] [infer][java] Separate the builtins from the other models for a better modularity Summary: The Infer builtins can be used in the e2e tests, but those tests should not depend on the Infer models to avoid cyclic dependencies. This diff separates the models and the Infer builtins in two directories so that the test can depend on the builtins without depending on the models Reviewed By: sblackshear Differential Revision: D3929478 fbshipit-source-id: 7d0ab79 --- Makefile.config.in | 1 + infer/models/java/BUCK | 28 +++++++++++++------ infer/models/java/Makefile | 9 +++--- .../facebook/infer/builtins}/InferArray.java | 2 +- .../infer/builtins}/InferBuiltins.java | 2 +- .../infer/builtins}/InferCloseables.java | 2 +- .../facebook/infer/builtins}/InferTaint.java | 2 +- .../infer/builtins}/InferUndefined.java | 2 +- .../facebook/infer/builtins}/InferUtils.java | 2 +- .../models/java/src/android/app/Activity.java | 2 +- .../content/ContentProviderClient.java | 4 +-- .../src/android/content/ContentResolver.java | 2 +- .../src/android/content/ContentValues.java | 2 +- .../java/src/android/content/Context.java | 2 +- .../src/android/content/res/Resources.java | 2 +- .../src/android/content/res/TypedArray.java | 2 +- .../java/src/android/database/Cursor.java | 4 +-- .../src/android/database/CursorWrapper.java | 4 +-- .../android/database/sqlite/SQLiteCursor.java | 4 +-- .../fasterxml/jackson/core/JsonParser.java | 4 +-- .../core/json/UTF8StreamJsonParser.java | 2 +- .../com/google/common/base/Preconditions.java | 2 +- .../com/google/common/collect/Iterators.java | 2 +- .../src/com/google/common/io/Closeables.java | 4 +-- .../okhttp/internal/StrictLineReader.java | 2 +- .../com/squareup/okhttp/internal/Util.java | 2 +- .../java/src/java/io/BufferedInputStream.java | 2 +- .../src/java/io/BufferedOutputStream.java | 2 +- .../java/src/java/io/BufferedReader.java | 2 +- .../java/src/java/io/BufferedWriter.java | 2 +- .../java/src/java/io/DataInputStream.java | 2 +- .../java/src/java/io/DataOutputStream.java | 2 +- infer/models/java/src/java/io/File.java | 2 +- .../java/src/java/io/FileInputStream.java | 4 +-- .../java/src/java/io/FileOutputStream.java | 4 +-- .../java/src/java/io/FilterInputStream.java | 2 +- .../java/src/java/io/FilterOutputStream.java | 2 +- .../models/java/src/java/io/FilterReader.java | 2 +- .../models/java/src/java/io/InputStream.java | 4 +-- .../java/src/java/io/InputStreamReader.java | 4 +-- .../java/src/java/io/ObjectInputStream.java | 2 +- .../java/src/java/io/ObjectOutputStream.java | 2 +- .../models/java/src/java/io/OutputStream.java | 2 +- .../java/src/java/io/OutputStreamWriter.java | 4 +-- .../java/src/java/io/PipedInputStream.java | 4 +-- .../java/src/java/io/PipedOutputStream.java | 4 +-- .../models/java/src/java/io/PipedReader.java | 4 +-- .../models/java/src/java/io/PipedWriter.java | 4 +-- .../models/java/src/java/io/PrintWriter.java | 2 +- .../java/src/java/io/PushbackInputStream.java | 2 +- .../java/src/java/io/PushbackReader.java | 2 +- .../java/src/java/io/RandomAccessFile.java | 4 +-- infer/models/java/src/java/io/Reader.java | 4 +-- infer/models/java/src/java/io/Writer.java | 2 +- infer/models/java/src/java/lang/Object.java | 2 +- infer/models/java/src/java/lang/Process.java | 2 +- .../java/src/java/lang/ProcessManager.java | 2 +- infer/models/java/src/java/lang/String.java | 4 +-- infer/models/java/src/java/lang/System.java | 4 +-- infer/models/java/src/java/lang/Thread.java | 4 +-- .../java/src/java/lang/reflect/Array.java | 2 +- .../java/src/java/net/HttpURLConnection.java | 2 +- .../java/src/java/net/PlainSocketImpl.java | 4 +-- .../java/src/java/net/ServerSocket.java | 2 +- infer/models/java/src/java/net/Socket.java | 2 +- infer/models/java/src/java/net/URL.java | 2 +- .../java/src/java/nio/FileChannelImpl.java | 2 +- .../src/java/nio/channels/FileChannel.java | 2 +- .../src/java/security/DigestInputStream.java | 2 +- .../src/java/security/DigestOutputStream.java | 2 +- infer/models/java/src/java/util/HashMap.java | 2 +- .../models/java/src/java/util/Properties.java | 2 +- infer/models/java/src/java/util/Scanner.java | 2 +- infer/models/java/src/java/util/Vector.java | 2 +- .../java/src/java/util/concurrent/Lock.java | 4 +-- .../java/util/concurrent/ReentrantLock.java | 4 +-- .../src/java/util/jar/JarInputStream.java | 2 +- .../src/java/util/jar/JarOutputStream.java | 2 +- .../src/java/util/zip/CheckedInputStream.java | 2 +- .../java/util/zip/CheckedOutputStream.java | 2 +- .../java/src/java/util/zip/Deflater.java | 2 +- .../java/util/zip/DeflaterInputStream.java | 2 +- .../java/util/zip/DeflaterOutputStream.java | 2 +- .../src/java/util/zip/GZIPInputStream.java | 2 +- .../src/java/util/zip/GZIPOutputStream.java | 2 +- .../java/src/java/util/zip/Inflater.java | 2 +- .../java/util/zip/InflaterInputStream.java | 2 +- .../java/util/zip/InflaterOutputStream.java | 2 +- .../java/src/java/util/zip/ZipFile.java | 4 +-- .../src/java/util/zip/ZipInputStream.java | 2 +- .../src/java/util/zip/ZipOutputStream.java | 2 +- .../src/javax/crypto/CipherInputStream.java | 2 +- .../src/javax/crypto/CipherOutputStream.java | 2 +- .../java/src/javax/net/SocketFactory.java | 2 +- .../src/javax/net/ssl/HostnameVerifier.java | 4 +-- .../src/javax/net/ssl/HttpsURLConnection.java | 2 +- .../src/javax/net/ssl/SSLSocketFactory.java | 2 +- .../java/src/junit/framework/Assert.java | 2 +- infer/src/IR/Procname.re | 2 +- infer/src/backend/taint.ml | 8 +++--- infer/src/java/jConfig.ml | 3 +- infer/src/quandary/JavaTrace.ml | 4 +-- infer/tests/codetoanalyze/java/Makefile | 3 +- .../codetoanalyze/java/infer/Builtins.java | 2 +- .../java/infer/TaintExample.java | 2 +- .../codetoanalyze/java/quandary/Arrays.java | 2 +- .../codetoanalyze/java/quandary/Basics.java | 2 +- .../java/quandary/Exceptions.java | 2 +- .../codetoanalyze/java/quandary/Fields.java | 2 +- .../java/quandary/Interprocedural.java | 2 +- .../java/quandary/Recursion.java | 2 +- 111 files changed, 163 insertions(+), 151 deletions(-) rename infer/models/java/{src/com/facebook/infer/models => builtins/com/facebook/infer/builtins}/InferArray.java (96%) rename infer/models/java/{src/com/facebook/infer/models => builtins/com/facebook/infer/builtins}/InferBuiltins.java (97%) rename infer/models/java/{src/com/facebook/infer/models => builtins/com/facebook/infer/builtins}/InferCloseables.java (94%) rename infer/models/java/{src/com/facebook/infer/models => builtins/com/facebook/infer/builtins}/InferTaint.java (96%) rename infer/models/java/{src/com/facebook/infer/models => builtins/com/facebook/infer/builtins}/InferUndefined.java (99%) rename infer/models/java/{src/com/facebook/infer/models => builtins/com/facebook/infer/builtins}/InferUtils.java (96%) diff --git a/Makefile.config.in b/Makefile.config.in index bd8b58154..9cf1022f9 100644 --- a/Makefile.config.in +++ b/Makefile.config.in @@ -78,6 +78,7 @@ BUILD_DIR = $(INFER_DIR)/_build ETC_DIR = $(INFER_DIR)/etc LIB_DIR = $(INFER_DIR)/lib MODELS_DIR = $(INFER_DIR)/models +JAVA_BUILTINS_DIR = $(MODELS_DIR)/java/builtins SRC_DIR = $(INFER_DIR)/src ANNOT_DIR = $(SRC_DIR)/_build diff --git a/infer/models/java/BUCK b/infer/models/java/BUCK index 92cd2024c..30f9a229c 100644 --- a/infer/models/java/BUCK +++ b/infer/models/java/BUCK @@ -1,11 +1,21 @@ java_library( - name = 'models', - srcs = glob(['src/**/*.java']), - visibility = [ - 'PUBLIC', - ], - deps = [ - '//dependencies/java/jackson:jackson', - '//infer/lib/java/android:android', - ] + name = 'builtins', + srcs = glob(['builtins/**/*.java']), + visibility = [ + 'PUBLIC', + ], +) + +java_library( + name = 'models', + srcs = glob(['src/**/*.java']), + visibility = [ + 'PUBLIC', + ], + deps = [ + ':builtins', + '//dependencies/java/jackson:jackson', + '//infer/annotations:annotations', + '//infer/lib/java/android:android', + ] ) diff --git a/infer/models/java/Makefile b/infer/models/java/Makefile index f5698dd4a..06d38616e 100644 --- a/infer/models/java/Makefile +++ b/infer/models/java/Makefile @@ -11,8 +11,6 @@ include $(ROOT_DIR)/Makefile.config INFER = INFER_ANALYZE_MODELS=1 $(INFER_BIN) \ --buck --analyzer infer --multicore 1 -JAVA_MODELS_SOURCES = $(shell find $(JAVA_MODELS_DIR)/src -name "*.java") - ANDROID_JAR = $(LIB_DIR)/java/android/android-19.jar JACKSON_JAR = $(DEPENDENCIES_DIR)/java/jackson/jackson-2.2.3.jar INFER_ANNOTATIONS_JAR = $(ANNOTATIONS_DIR)/annotations.jar @@ -22,7 +20,10 @@ INFER_REPORT = $(MODELS_OUT)/infer/report.json MODELS_JAR = models.jar DEPLOYED_MODELS_JAR = $(LIB_DIR)/java/models.jar -JAVA_SOURCES = $(shell find src/ -name "*.java") +JAVA_BUILTINS_SOURCES = $(shell find builtins -name "*.java") +JAVA_MODELS_SOURCES = $(shell find src -name "*.java") + +JAVA_SOURCES = $(JAVA_BUILTINS_SOURCES) $(JAVA_MODELS_SOURCES) all: $(MODELS_JAR) @@ -31,7 +32,7 @@ clean: @rm -f $(MODELS_JAR) @rm -f $(DEPLOYED_MODELS_JAR) -$(INFER_REPORT): $(ANDROID_JAR) $(JACKSON_JAR) $(JAVA_SOURCES) $(JAVA_DEPS) $(INFER_ANNOTATIONS_JAR) +$(INFER_REPORT): $(ANDROID_JAR) $(JACKSON_JAR) $(JAVA_DEPS) $(INFER_ANNOTATIONS_JAR) $(JAVA_SOURCES) @rm -fr $(MODELS_OUT) mkdir -p $(MODELS_OUT) @rm -f $(DEPLOYED_MODELS_JAR) diff --git a/infer/models/java/src/com/facebook/infer/models/InferArray.java b/infer/models/java/builtins/com/facebook/infer/builtins/InferArray.java similarity index 96% rename from infer/models/java/src/com/facebook/infer/models/InferArray.java rename to infer/models/java/builtins/com/facebook/infer/builtins/InferArray.java index 97723c045..7b0413d02 100644 --- a/infer/models/java/src/com/facebook/infer/models/InferArray.java +++ b/infer/models/java/builtins/com/facebook/infer/builtins/InferArray.java @@ -8,7 +8,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package com.facebook.infer.models; +package com.facebook.infer.builtins; public class InferArray { diff --git a/infer/models/java/src/com/facebook/infer/models/InferBuiltins.java b/infer/models/java/builtins/com/facebook/infer/builtins/InferBuiltins.java similarity index 97% rename from infer/models/java/src/com/facebook/infer/models/InferBuiltins.java rename to infer/models/java/builtins/com/facebook/infer/builtins/InferBuiltins.java index 6e6cfa8c2..170e4243d 100644 --- a/infer/models/java/src/com/facebook/infer/models/InferBuiltins.java +++ b/infer/models/java/builtins/com/facebook/infer/builtins/InferBuiltins.java @@ -8,7 +8,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package com.facebook.infer.models; +package com.facebook.infer.builtins; public class InferBuiltins { diff --git a/infer/models/java/src/com/facebook/infer/models/InferCloseables.java b/infer/models/java/builtins/com/facebook/infer/builtins/InferCloseables.java similarity index 94% rename from infer/models/java/src/com/facebook/infer/models/InferCloseables.java rename to infer/models/java/builtins/com/facebook/infer/builtins/InferCloseables.java index dcd8e3df8..74580e3e5 100644 --- a/infer/models/java/src/com/facebook/infer/models/InferCloseables.java +++ b/infer/models/java/builtins/com/facebook/infer/builtins/InferCloseables.java @@ -8,7 +8,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package com.facebook.infer.models; +package com.facebook.infer.builtins; import java.io.Closeable; diff --git a/infer/models/java/src/com/facebook/infer/models/InferTaint.java b/infer/models/java/builtins/com/facebook/infer/builtins/InferTaint.java similarity index 96% rename from infer/models/java/src/com/facebook/infer/models/InferTaint.java rename to infer/models/java/builtins/com/facebook/infer/builtins/InferTaint.java index 420ee4b32..63bfa7148 100644 --- a/infer/models/java/src/com/facebook/infer/models/InferTaint.java +++ b/infer/models/java/builtins/com/facebook/infer/builtins/InferTaint.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package com.facebook.infer.models; +package com.facebook.infer.builtins; /** WARNING! These methods are for testing the taint analysis only! Don't use them in models or in * real code. diff --git a/infer/models/java/src/com/facebook/infer/models/InferUndefined.java b/infer/models/java/builtins/com/facebook/infer/builtins/InferUndefined.java similarity index 99% rename from infer/models/java/src/com/facebook/infer/models/InferUndefined.java rename to infer/models/java/builtins/com/facebook/infer/builtins/InferUndefined.java index 109a43942..c3a1347c2 100644 --- a/infer/models/java/src/com/facebook/infer/models/InferUndefined.java +++ b/infer/models/java/builtins/com/facebook/infer/builtins/InferUndefined.java @@ -8,7 +8,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package com.facebook.infer.models; +package com.facebook.infer.builtins; import java.io.IOException; import java.net.SocketException; diff --git a/infer/models/java/src/com/facebook/infer/models/InferUtils.java b/infer/models/java/builtins/com/facebook/infer/builtins/InferUtils.java similarity index 96% rename from infer/models/java/src/com/facebook/infer/models/InferUtils.java rename to infer/models/java/builtins/com/facebook/infer/builtins/InferUtils.java index c8195ad84..cd6808bf8 100644 --- a/infer/models/java/src/com/facebook/infer/models/InferUtils.java +++ b/infer/models/java/builtins/com/facebook/infer/builtins/InferUtils.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package com.facebook.infer.models; +package com.facebook.infer.builtins; public class InferUtils { diff --git a/infer/models/java/src/android/app/Activity.java b/infer/models/java/src/android/app/Activity.java index 658454f66..ebd93d769 100644 --- a/infer/models/java/src/android/app/Activity.java +++ b/infer/models/java/src/android/app/Activity.java @@ -13,7 +13,7 @@ import android.content.res.TypedArray; import android.util.AttributeSet; import android.view.ContextThemeWrapper; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; public abstract class Activity extends ContextThemeWrapper { diff --git a/infer/models/java/src/android/content/ContentProviderClient.java b/infer/models/java/src/android/content/ContentProviderClient.java index 5535fdd6a..18e878ffa 100644 --- a/infer/models/java/src/android/content/ContentProviderClient.java +++ b/infer/models/java/src/android/content/ContentProviderClient.java @@ -9,8 +9,8 @@ package android.content; -import com.facebook.infer.models.InferBuiltins; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferBuiltins; +import com.facebook.infer.builtins.InferUndefined; import android.database.Cursor; import android.database.sqlite.SQLiteCursor; diff --git a/infer/models/java/src/android/content/ContentResolver.java b/infer/models/java/src/android/content/ContentResolver.java index ba646fe49..dc2ef4e3e 100644 --- a/infer/models/java/src/android/content/ContentResolver.java +++ b/infer/models/java/src/android/content/ContentResolver.java @@ -14,7 +14,7 @@ import android.database.sqlite.SQLiteCursor; import android.net.Uri; import android.os.CancellationSignal; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; public class ContentResolver { diff --git a/infer/models/java/src/android/content/ContentValues.java b/infer/models/java/src/android/content/ContentValues.java index 7b2b7c06c..c72164d06 100644 --- a/infer/models/java/src/android/content/ContentValues.java +++ b/infer/models/java/src/android/content/ContentValues.java @@ -9,7 +9,7 @@ package android.content; -import com.facebook.infer.models.InferBuiltins; +import com.facebook.infer.builtins.InferBuiltins; public class ContentValues { diff --git a/infer/models/java/src/android/content/Context.java b/infer/models/java/src/android/content/Context.java index 7c5f0aa0f..69ae51792 100644 --- a/infer/models/java/src/android/content/Context.java +++ b/infer/models/java/src/android/content/Context.java @@ -11,7 +11,7 @@ package android.content; import android.content.res.TypedArray; import android.util.AttributeSet; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; public class Context { diff --git a/infer/models/java/src/android/content/res/Resources.java b/infer/models/java/src/android/content/res/Resources.java index fa33aa9d3..5be154767 100644 --- a/infer/models/java/src/android/content/res/Resources.java +++ b/infer/models/java/src/android/content/res/Resources.java @@ -11,7 +11,7 @@ package android.content.res; import android.util.AttributeSet; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; public class Resources { diff --git a/infer/models/java/src/android/content/res/TypedArray.java b/infer/models/java/src/android/content/res/TypedArray.java index 430c5cd6a..2f5bb6aa9 100644 --- a/infer/models/java/src/android/content/res/TypedArray.java +++ b/infer/models/java/src/android/content/res/TypedArray.java @@ -9,7 +9,7 @@ package android.content.res; -import com.facebook.infer.models.InferBuiltins; +import com.facebook.infer.builtins.InferBuiltins; public class TypedArray { diff --git a/infer/models/java/src/android/database/Cursor.java b/infer/models/java/src/android/database/Cursor.java index 43c3452d1..e190be4f9 100644 --- a/infer/models/java/src/android/database/Cursor.java +++ b/infer/models/java/src/android/database/Cursor.java @@ -10,8 +10,8 @@ package android.database; -import com.facebook.infer.models.InferUndefined; -import com.facebook.infer.models.InferBuiltins; +import com.facebook.infer.builtins.InferUndefined; +import com.facebook.infer.builtins.InferBuiltins; public class Cursor { diff --git a/infer/models/java/src/android/database/CursorWrapper.java b/infer/models/java/src/android/database/CursorWrapper.java index b3653c4b3..54a859bd4 100644 --- a/infer/models/java/src/android/database/CursorWrapper.java +++ b/infer/models/java/src/android/database/CursorWrapper.java @@ -9,8 +9,8 @@ package android.database; -import com.facebook.infer.models.InferUndefined; -import com.facebook.infer.models.InferBuiltins; +import com.facebook.infer.builtins.InferUndefined; +import com.facebook.infer.builtins.InferBuiltins; public class CursorWrapper extends Cursor { protected final Cursor mCursor; diff --git a/infer/models/java/src/android/database/sqlite/SQLiteCursor.java b/infer/models/java/src/android/database/sqlite/SQLiteCursor.java index d69312999..975df6940 100644 --- a/infer/models/java/src/android/database/sqlite/SQLiteCursor.java +++ b/infer/models/java/src/android/database/sqlite/SQLiteCursor.java @@ -10,8 +10,8 @@ package android.database.sqlite; import android.database.Cursor; -import com.facebook.infer.models.InferBuiltins; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferBuiltins; +import com.facebook.infer.builtins.InferUndefined; public class SQLiteCursor extends Cursor { diff --git a/infer/models/java/src/com/fasterxml/jackson/core/JsonParser.java b/infer/models/java/src/com/fasterxml/jackson/core/JsonParser.java index c3ecc415d..4b0ef2f88 100644 --- a/infer/models/java/src/com/fasterxml/jackson/core/JsonParser.java +++ b/infer/models/java/src/com/fasterxml/jackson/core/JsonParser.java @@ -9,8 +9,8 @@ package com.fasterxml.jackson.core; -import com.facebook.infer.models.InferBuiltins; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferBuiltins; +import com.facebook.infer.builtins.InferUndefined; import java.io.Closeable; import java.io.IOException; diff --git a/infer/models/java/src/com/fasterxml/jackson/core/json/UTF8StreamJsonParser.java b/infer/models/java/src/com/fasterxml/jackson/core/json/UTF8StreamJsonParser.java index 8179a0555..1ac1b0668 100644 --- a/infer/models/java/src/com/fasterxml/jackson/core/json/UTF8StreamJsonParser.java +++ b/infer/models/java/src/com/fasterxml/jackson/core/json/UTF8StreamJsonParser.java @@ -9,7 +9,7 @@ package com.fasterxml.jackson.core.json; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; import com.fasterxml.jackson.core.Base64Variant; import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.core.JsonToken; diff --git a/infer/models/java/src/com/google/common/base/Preconditions.java b/infer/models/java/src/com/google/common/base/Preconditions.java index 30461678a..44a186bbf 100644 --- a/infer/models/java/src/com/google/common/base/Preconditions.java +++ b/infer/models/java/src/com/google/common/base/Preconditions.java @@ -10,7 +10,7 @@ package com.google.common.base; import javax.annotation.Nullable; -import static com.facebook.infer.models.InferBuiltins.assume; +import static com.facebook.infer.builtins.InferBuiltins.assume; public final class Preconditions { diff --git a/infer/models/java/src/com/google/common/collect/Iterators.java b/infer/models/java/src/com/google/common/collect/Iterators.java index 9aed83b0a..610277eb7 100644 --- a/infer/models/java/src/com/google/common/collect/Iterators.java +++ b/infer/models/java/src/com/google/common/collect/Iterators.java @@ -11,7 +11,7 @@ package com.google.common.collect; import java.util.NoSuchElementException; -import com.facebook.infer.models.InferBuiltins; +import com.facebook.infer.builtins.InferBuiltins; import javax.annotation.Nullable; diff --git a/infer/models/java/src/com/google/common/io/Closeables.java b/infer/models/java/src/com/google/common/io/Closeables.java index 97128c9e5..72b251b6a 100644 --- a/infer/models/java/src/com/google/common/io/Closeables.java +++ b/infer/models/java/src/com/google/common/io/Closeables.java @@ -9,8 +9,8 @@ package com.google.common.io; -import com.facebook.infer.models.InferCloseables; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferCloseables; +import com.facebook.infer.builtins.InferUndefined; import java.io.Closeable; import java.io.IOException; diff --git a/infer/models/java/src/com/squareup/okhttp/internal/StrictLineReader.java b/infer/models/java/src/com/squareup/okhttp/internal/StrictLineReader.java index ba454410b..b913fd2d4 100644 --- a/infer/models/java/src/com/squareup/okhttp/internal/StrictLineReader.java +++ b/infer/models/java/src/com/squareup/okhttp/internal/StrictLineReader.java @@ -9,7 +9,7 @@ package com.squareup.okhttp.internal; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; import java.io.IOException; diff --git a/infer/models/java/src/com/squareup/okhttp/internal/Util.java b/infer/models/java/src/com/squareup/okhttp/internal/Util.java index 0e4b0eb3d..fa25d4941 100644 --- a/infer/models/java/src/com/squareup/okhttp/internal/Util.java +++ b/infer/models/java/src/com/squareup/okhttp/internal/Util.java @@ -9,7 +9,7 @@ package com.squareup.okhttp.internal; -import com.facebook.infer.models.InferCloseables; +import com.facebook.infer.builtins.InferCloseables; import java.io.Closeable; import java.io.IOException; diff --git a/infer/models/java/src/java/io/BufferedInputStream.java b/infer/models/java/src/java/io/BufferedInputStream.java index 78724ed3f..c0762a48c 100644 --- a/infer/models/java/src/java/io/BufferedInputStream.java +++ b/infer/models/java/src/java/io/BufferedInputStream.java @@ -9,7 +9,7 @@ package java.io; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; public class BufferedInputStream extends FilterInputStream { diff --git a/infer/models/java/src/java/io/BufferedOutputStream.java b/infer/models/java/src/java/io/BufferedOutputStream.java index 9ecad5785..b1ece3c58 100644 --- a/infer/models/java/src/java/io/BufferedOutputStream.java +++ b/infer/models/java/src/java/io/BufferedOutputStream.java @@ -9,7 +9,7 @@ package java.io; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; public class BufferedOutputStream extends FilterOutputStream { diff --git a/infer/models/java/src/java/io/BufferedReader.java b/infer/models/java/src/java/io/BufferedReader.java index 7dfea765c..a55541543 100644 --- a/infer/models/java/src/java/io/BufferedReader.java +++ b/infer/models/java/src/java/io/BufferedReader.java @@ -9,7 +9,7 @@ package java.io; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; public class BufferedReader extends Reader { diff --git a/infer/models/java/src/java/io/BufferedWriter.java b/infer/models/java/src/java/io/BufferedWriter.java index 036e388a7..27fab749a 100644 --- a/infer/models/java/src/java/io/BufferedWriter.java +++ b/infer/models/java/src/java/io/BufferedWriter.java @@ -9,7 +9,7 @@ package java.io; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; public class BufferedWriter extends Writer { diff --git a/infer/models/java/src/java/io/DataInputStream.java b/infer/models/java/src/java/io/DataInputStream.java index 3b38bc445..33554e091 100644 --- a/infer/models/java/src/java/io/DataInputStream.java +++ b/infer/models/java/src/java/io/DataInputStream.java @@ -9,7 +9,7 @@ package java.io; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; public class DataInputStream extends FilterInputStream { diff --git a/infer/models/java/src/java/io/DataOutputStream.java b/infer/models/java/src/java/io/DataOutputStream.java index ae6627a76..9243920a4 100644 --- a/infer/models/java/src/java/io/DataOutputStream.java +++ b/infer/models/java/src/java/io/DataOutputStream.java @@ -9,7 +9,7 @@ package java.io; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; public class DataOutputStream extends FilterOutputStream { diff --git a/infer/models/java/src/java/io/File.java b/infer/models/java/src/java/io/File.java index 9da0f95ec..77bc9ee8f 100644 --- a/infer/models/java/src/java/io/File.java +++ b/infer/models/java/src/java/io/File.java @@ -9,7 +9,7 @@ package java.io; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; import javax.annotation.Nullable; public class File { diff --git a/infer/models/java/src/java/io/FileInputStream.java b/infer/models/java/src/java/io/FileInputStream.java index 807772101..b2998690e 100644 --- a/infer/models/java/src/java/io/FileInputStream.java +++ b/infer/models/java/src/java/io/FileInputStream.java @@ -9,8 +9,8 @@ package java.io; -import com.facebook.infer.models.InferBuiltins; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferBuiltins; +import com.facebook.infer.builtins.InferUndefined; import java.nio.FileChannelImpl; diff --git a/infer/models/java/src/java/io/FileOutputStream.java b/infer/models/java/src/java/io/FileOutputStream.java index 4b293e05a..299d686cc 100644 --- a/infer/models/java/src/java/io/FileOutputStream.java +++ b/infer/models/java/src/java/io/FileOutputStream.java @@ -9,8 +9,8 @@ package java.io; -import com.facebook.infer.models.InferBuiltins; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferBuiltins; +import com.facebook.infer.builtins.InferUndefined; import java.nio.FileChannelImpl; import java.nio.channels.FileChannel; diff --git a/infer/models/java/src/java/io/FilterInputStream.java b/infer/models/java/src/java/io/FilterInputStream.java index ac246971a..5344f746f 100644 --- a/infer/models/java/src/java/io/FilterInputStream.java +++ b/infer/models/java/src/java/io/FilterInputStream.java @@ -9,7 +9,7 @@ package java.io; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; public class FilterInputStream extends InputStream { diff --git a/infer/models/java/src/java/io/FilterOutputStream.java b/infer/models/java/src/java/io/FilterOutputStream.java index 62affa949..154a3739c 100644 --- a/infer/models/java/src/java/io/FilterOutputStream.java +++ b/infer/models/java/src/java/io/FilterOutputStream.java @@ -9,7 +9,7 @@ package java.io; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; public class FilterOutputStream extends OutputStream { diff --git a/infer/models/java/src/java/io/FilterReader.java b/infer/models/java/src/java/io/FilterReader.java index 4ee98a253..57ff943e7 100644 --- a/infer/models/java/src/java/io/FilterReader.java +++ b/infer/models/java/src/java/io/FilterReader.java @@ -9,7 +9,7 @@ package java.io; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; public abstract class FilterReader extends Reader { diff --git a/infer/models/java/src/java/io/InputStream.java b/infer/models/java/src/java/io/InputStream.java index b2883bcc5..e9a10bfac 100644 --- a/infer/models/java/src/java/io/InputStream.java +++ b/infer/models/java/src/java/io/InputStream.java @@ -9,8 +9,8 @@ package java.io; -import com.facebook.infer.models.InferBuiltins; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferBuiltins; +import com.facebook.infer.builtins.InferUndefined; public class InputStream { diff --git a/infer/models/java/src/java/io/InputStreamReader.java b/infer/models/java/src/java/io/InputStreamReader.java index a61084d5c..ab677bb9e 100644 --- a/infer/models/java/src/java/io/InputStreamReader.java +++ b/infer/models/java/src/java/io/InputStreamReader.java @@ -9,8 +9,8 @@ package java.io; -import com.facebook.infer.models.InferUndefined; -import com.facebook.infer.models.InferUtils; +import com.facebook.infer.builtins.InferUndefined; +import com.facebook.infer.builtins.InferUtils; import java.nio.charset.Charset; import java.nio.charset.CharsetDecoder; diff --git a/infer/models/java/src/java/io/ObjectInputStream.java b/infer/models/java/src/java/io/ObjectInputStream.java index c3235d42f..6a2f84a5e 100644 --- a/infer/models/java/src/java/io/ObjectInputStream.java +++ b/infer/models/java/src/java/io/ObjectInputStream.java @@ -9,7 +9,7 @@ package java.io; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; public class ObjectInputStream extends InputStream { diff --git a/infer/models/java/src/java/io/ObjectOutputStream.java b/infer/models/java/src/java/io/ObjectOutputStream.java index 3cd8e468e..ea4d64e11 100644 --- a/infer/models/java/src/java/io/ObjectOutputStream.java +++ b/infer/models/java/src/java/io/ObjectOutputStream.java @@ -9,7 +9,7 @@ package java.io; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; public class ObjectOutputStream extends OutputStream { diff --git a/infer/models/java/src/java/io/OutputStream.java b/infer/models/java/src/java/io/OutputStream.java index 925433d7a..052c6a092 100644 --- a/infer/models/java/src/java/io/OutputStream.java +++ b/infer/models/java/src/java/io/OutputStream.java @@ -9,7 +9,7 @@ package java.io; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; public abstract class OutputStream implements Closeable { diff --git a/infer/models/java/src/java/io/OutputStreamWriter.java b/infer/models/java/src/java/io/OutputStreamWriter.java index e49279268..80cc90c2b 100644 --- a/infer/models/java/src/java/io/OutputStreamWriter.java +++ b/infer/models/java/src/java/io/OutputStreamWriter.java @@ -9,8 +9,8 @@ package java.io; -import com.facebook.infer.models.InferUndefined; -import com.facebook.infer.models.InferUtils; +import com.facebook.infer.builtins.InferUndefined; +import com.facebook.infer.builtins.InferUtils; import java.nio.charset.Charset; import java.nio.charset.CharsetEncoder; diff --git a/infer/models/java/src/java/io/PipedInputStream.java b/infer/models/java/src/java/io/PipedInputStream.java index e9720fbf3..21bdffe61 100644 --- a/infer/models/java/src/java/io/PipedInputStream.java +++ b/infer/models/java/src/java/io/PipedInputStream.java @@ -9,8 +9,8 @@ package java.io; -import com.facebook.infer.models.InferBuiltins; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferBuiltins; +import com.facebook.infer.builtins.InferUndefined; public class PipedInputStream extends InputStream { diff --git a/infer/models/java/src/java/io/PipedOutputStream.java b/infer/models/java/src/java/io/PipedOutputStream.java index e793b34aa..b366297bf 100644 --- a/infer/models/java/src/java/io/PipedOutputStream.java +++ b/infer/models/java/src/java/io/PipedOutputStream.java @@ -9,8 +9,8 @@ package java.io; -import com.facebook.infer.models.InferBuiltins; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferBuiltins; +import com.facebook.infer.builtins.InferUndefined; public class PipedOutputStream extends OutputStream { diff --git a/infer/models/java/src/java/io/PipedReader.java b/infer/models/java/src/java/io/PipedReader.java index 2e2f63527..184c3e5fc 100644 --- a/infer/models/java/src/java/io/PipedReader.java +++ b/infer/models/java/src/java/io/PipedReader.java @@ -9,8 +9,8 @@ package java.io; -import com.facebook.infer.models.InferBuiltins; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferBuiltins; +import com.facebook.infer.builtins.InferUndefined; public class PipedReader extends Reader { diff --git a/infer/models/java/src/java/io/PipedWriter.java b/infer/models/java/src/java/io/PipedWriter.java index de780a160..e951876d0 100644 --- a/infer/models/java/src/java/io/PipedWriter.java +++ b/infer/models/java/src/java/io/PipedWriter.java @@ -9,8 +9,8 @@ package java.io; -import com.facebook.infer.models.InferBuiltins; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferBuiltins; +import com.facebook.infer.builtins.InferUndefined; public abstract class PipedWriter extends Writer { diff --git a/infer/models/java/src/java/io/PrintWriter.java b/infer/models/java/src/java/io/PrintWriter.java index 5dd3614be..7a78ae5c8 100644 --- a/infer/models/java/src/java/io/PrintWriter.java +++ b/infer/models/java/src/java/io/PrintWriter.java @@ -9,7 +9,7 @@ package java.io; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; public class PrintWriter extends Writer { diff --git a/infer/models/java/src/java/io/PushbackInputStream.java b/infer/models/java/src/java/io/PushbackInputStream.java index e91977a37..d513802c7 100644 --- a/infer/models/java/src/java/io/PushbackInputStream.java +++ b/infer/models/java/src/java/io/PushbackInputStream.java @@ -9,7 +9,7 @@ package java.io; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; public class PushbackInputStream extends FilterInputStream { diff --git a/infer/models/java/src/java/io/PushbackReader.java b/infer/models/java/src/java/io/PushbackReader.java index aeb0dab60..1ef6ffd3d 100644 --- a/infer/models/java/src/java/io/PushbackReader.java +++ b/infer/models/java/src/java/io/PushbackReader.java @@ -9,7 +9,7 @@ package java.io; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; public class PushbackReader extends FilterReader { diff --git a/infer/models/java/src/java/io/RandomAccessFile.java b/infer/models/java/src/java/io/RandomAccessFile.java index bb8a8f240..08e04482b 100644 --- a/infer/models/java/src/java/io/RandomAccessFile.java +++ b/infer/models/java/src/java/io/RandomAccessFile.java @@ -9,8 +9,8 @@ package java.io; -import com.facebook.infer.models.InferBuiltins; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferBuiltins; +import com.facebook.infer.builtins.InferUndefined; import java.nio.FileChannelImpl; import java.nio.channels.FileChannel; diff --git a/infer/models/java/src/java/io/Reader.java b/infer/models/java/src/java/io/Reader.java index 0717a6bfd..1e315349c 100644 --- a/infer/models/java/src/java/io/Reader.java +++ b/infer/models/java/src/java/io/Reader.java @@ -9,8 +9,8 @@ package java.io; -import com.facebook.infer.models.InferBuiltins; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferBuiltins; +import com.facebook.infer.builtins.InferUndefined; public abstract class Reader { diff --git a/infer/models/java/src/java/io/Writer.java b/infer/models/java/src/java/io/Writer.java index bdf328f4f..2ddaf3087 100644 --- a/infer/models/java/src/java/io/Writer.java +++ b/infer/models/java/src/java/io/Writer.java @@ -9,7 +9,7 @@ package java.io; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; public abstract class Writer implements Closeable { diff --git a/infer/models/java/src/java/lang/Object.java b/infer/models/java/src/java/lang/Object.java index 15870b140..743b8498e 100644 --- a/infer/models/java/src/java/lang/Object.java +++ b/infer/models/java/src/java/lang/Object.java @@ -9,7 +9,7 @@ package java.lang; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; public class Object { diff --git a/infer/models/java/src/java/lang/Process.java b/infer/models/java/src/java/lang/Process.java index fca83a788..560bf738b 100644 --- a/infer/models/java/src/java/lang/Process.java +++ b/infer/models/java/src/java/lang/Process.java @@ -9,7 +9,7 @@ package java.lang; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; import java.io.*; diff --git a/infer/models/java/src/java/lang/ProcessManager.java b/infer/models/java/src/java/lang/ProcessManager.java index a08437928..1c7b69621 100644 --- a/infer/models/java/src/java/lang/ProcessManager.java +++ b/infer/models/java/src/java/lang/ProcessManager.java @@ -9,7 +9,7 @@ package java.lang; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; import java.io.File; import java.io.FileDescriptor; diff --git a/infer/models/java/src/java/lang/String.java b/infer/models/java/src/java/lang/String.java index ec1eb3751..47e6ae46b 100644 --- a/infer/models/java/src/java/lang/String.java +++ b/infer/models/java/src/java/lang/String.java @@ -9,8 +9,8 @@ package java.lang; -import com.facebook.infer.models.InferUndefined; -import com.facebook.infer.models.InferBuiltins; +import com.facebook.infer.builtins.InferUndefined; +import com.facebook.infer.builtins.InferBuiltins; public final class String { diff --git a/infer/models/java/src/java/lang/System.java b/infer/models/java/src/java/lang/System.java index a26f6dcc3..330f9bde0 100644 --- a/infer/models/java/src/java/lang/System.java +++ b/infer/models/java/src/java/lang/System.java @@ -9,8 +9,8 @@ package java.lang; -import com.facebook.infer.models.InferBuiltins; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferBuiltins; +import com.facebook.infer.builtins.InferUndefined; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; diff --git a/infer/models/java/src/java/lang/Thread.java b/infer/models/java/src/java/lang/Thread.java index e02155ad2..299ecfff8 100644 --- a/infer/models/java/src/java/lang/Thread.java +++ b/infer/models/java/src/java/lang/Thread.java @@ -9,8 +9,8 @@ package java.lang; -import com.facebook.infer.models.InferUndefined; -import com.facebook.infer.models.InferBuiltins; +import com.facebook.infer.builtins.InferUndefined; +import com.facebook.infer.builtins.InferBuiltins; class Thread implements Runnable { diff --git a/infer/models/java/src/java/lang/reflect/Array.java b/infer/models/java/src/java/lang/reflect/Array.java index f101d63f1..dfa729684 100644 --- a/infer/models/java/src/java/lang/reflect/Array.java +++ b/infer/models/java/src/java/lang/reflect/Array.java @@ -9,7 +9,7 @@ package java.lang.reflect; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; public final class Array { diff --git a/infer/models/java/src/java/net/HttpURLConnection.java b/infer/models/java/src/java/net/HttpURLConnection.java index 4dad75e0a..896885b5e 100644 --- a/infer/models/java/src/java/net/HttpURLConnection.java +++ b/infer/models/java/src/java/net/HttpURLConnection.java @@ -9,7 +9,7 @@ package java.net; -import com.facebook.infer.models.InferBuiltins; +import com.facebook.infer.builtins.InferBuiltins; public class HttpURLConnection extends URLConnection { diff --git a/infer/models/java/src/java/net/PlainSocketImpl.java b/infer/models/java/src/java/net/PlainSocketImpl.java index cdac4aefc..224e85189 100644 --- a/infer/models/java/src/java/net/PlainSocketImpl.java +++ b/infer/models/java/src/java/net/PlainSocketImpl.java @@ -9,8 +9,8 @@ package java.net; -import com.facebook.infer.models.InferBuiltins; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferBuiltins; +import com.facebook.infer.builtins.InferUndefined; import java.io.IOException; import java.io.InputStream; diff --git a/infer/models/java/src/java/net/ServerSocket.java b/infer/models/java/src/java/net/ServerSocket.java index cc04bdea6..527fdddde 100644 --- a/infer/models/java/src/java/net/ServerSocket.java +++ b/infer/models/java/src/java/net/ServerSocket.java @@ -9,7 +9,7 @@ package java.net; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; import java.io.IOException; diff --git a/infer/models/java/src/java/net/Socket.java b/infer/models/java/src/java/net/Socket.java index 910201a61..3de5b170e 100644 --- a/infer/models/java/src/java/net/Socket.java +++ b/infer/models/java/src/java/net/Socket.java @@ -13,7 +13,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; -import com.facebook.infer.models.InferBuiltins; +import com.facebook.infer.builtins.InferBuiltins; public class Socket { diff --git a/infer/models/java/src/java/net/URL.java b/infer/models/java/src/java/net/URL.java index e3a699075..f1b88f7c6 100644 --- a/infer/models/java/src/java/net/URL.java +++ b/infer/models/java/src/java/net/URL.java @@ -11,7 +11,7 @@ package java.net; import javax.net.ssl.HttpsURLConnection; import java.util.Hashtable; -import com.facebook.infer.models.InferBuiltins; +import com.facebook.infer.builtins.InferBuiltins; public final class URL implements java.io.Serializable { diff --git a/infer/models/java/src/java/nio/FileChannelImpl.java b/infer/models/java/src/java/nio/FileChannelImpl.java index b9bcf0df0..e15b2c9d8 100644 --- a/infer/models/java/src/java/nio/FileChannelImpl.java +++ b/infer/models/java/src/java/nio/FileChannelImpl.java @@ -9,7 +9,7 @@ package java.nio; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; import java.io.FileDescriptor; import java.io.FileInputStream; diff --git a/infer/models/java/src/java/nio/channels/FileChannel.java b/infer/models/java/src/java/nio/channels/FileChannel.java index ea1a1d22c..d292c1484 100644 --- a/infer/models/java/src/java/nio/channels/FileChannel.java +++ b/infer/models/java/src/java/nio/channels/FileChannel.java @@ -9,7 +9,7 @@ package java.nio.channels; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; import javax.annotation.Nullable; import java.io.IOException; import java.nio.channels.spi.AbstractInterruptibleChannel; diff --git a/infer/models/java/src/java/security/DigestInputStream.java b/infer/models/java/src/java/security/DigestInputStream.java index 0b349da47..8eb6824dc 100644 --- a/infer/models/java/src/java/security/DigestInputStream.java +++ b/infer/models/java/src/java/security/DigestInputStream.java @@ -9,7 +9,7 @@ package java.security; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; import java.io.FilterInputStream; import java.io.IOException; diff --git a/infer/models/java/src/java/security/DigestOutputStream.java b/infer/models/java/src/java/security/DigestOutputStream.java index 0751f8750..40406f627 100644 --- a/infer/models/java/src/java/security/DigestOutputStream.java +++ b/infer/models/java/src/java/security/DigestOutputStream.java @@ -9,7 +9,7 @@ package java.security; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; import java.io.FilterOutputStream; import java.io.IOException; diff --git a/infer/models/java/src/java/util/HashMap.java b/infer/models/java/src/java/util/HashMap.java index b5ce95bc6..dd459c556 100644 --- a/infer/models/java/src/java/util/HashMap.java +++ b/infer/models/java/src/java/util/HashMap.java @@ -10,7 +10,7 @@ package java.util; import java.io.*; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; /** * A recency abstraction for hashmaps that remembers only the last two diff --git a/infer/models/java/src/java/util/Properties.java b/infer/models/java/src/java/util/Properties.java index 9c90e82e2..c73dfca3c 100644 --- a/infer/models/java/src/java/util/Properties.java +++ b/infer/models/java/src/java/util/Properties.java @@ -9,7 +9,7 @@ package java.util; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; import javax.xml.parsers.DocumentBuilder; import java.io.*; diff --git a/infer/models/java/src/java/util/Scanner.java b/infer/models/java/src/java/util/Scanner.java index ca632d3db..72d9ddba8 100644 --- a/infer/models/java/src/java/util/Scanner.java +++ b/infer/models/java/src/java/util/Scanner.java @@ -9,7 +9,7 @@ package java.util; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; diff --git a/infer/models/java/src/java/util/Vector.java b/infer/models/java/src/java/util/Vector.java index 28dfa3461..f0da4db63 100644 --- a/infer/models/java/src/java/util/Vector.java +++ b/infer/models/java/src/java/util/Vector.java @@ -9,7 +9,7 @@ package java.util; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; public class Vector extends AbstractList { diff --git a/infer/models/java/src/java/util/concurrent/Lock.java b/infer/models/java/src/java/util/concurrent/Lock.java index e357ee486..60e5783ca 100644 --- a/infer/models/java/src/java/util/concurrent/Lock.java +++ b/infer/models/java/src/java/util/concurrent/Lock.java @@ -9,8 +9,8 @@ package java.util.concurrent.locks; import java.util.concurrent.TimeUnit; -import com.facebook.infer.models.InferBuiltins; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferBuiltins; +import com.facebook.infer.builtins.InferUndefined; /* Lock is in actuality an interface, but is implemented here as an abstract class for diff --git a/infer/models/java/src/java/util/concurrent/ReentrantLock.java b/infer/models/java/src/java/util/concurrent/ReentrantLock.java index 2106128f1..3b3fb07b7 100644 --- a/infer/models/java/src/java/util/concurrent/ReentrantLock.java +++ b/infer/models/java/src/java/util/concurrent/ReentrantLock.java @@ -19,8 +19,8 @@ */ package java.util.concurrent.locks; -import com.facebook.infer.models.InferBuiltins; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferBuiltins; +import com.facebook.infer.builtins.InferUndefined; public abstract class ReentrantLock extends Lock implements java.io.Serializable { diff --git a/infer/models/java/src/java/util/jar/JarInputStream.java b/infer/models/java/src/java/util/jar/JarInputStream.java index e08b3ba09..61d3a0a0d 100644 --- a/infer/models/java/src/java/util/jar/JarInputStream.java +++ b/infer/models/java/src/java/util/jar/JarInputStream.java @@ -9,7 +9,7 @@ package java.util.jar; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; import java.io.IOException; import java.io.InputStream; diff --git a/infer/models/java/src/java/util/jar/JarOutputStream.java b/infer/models/java/src/java/util/jar/JarOutputStream.java index 69abe2814..2fdd28818 100644 --- a/infer/models/java/src/java/util/jar/JarOutputStream.java +++ b/infer/models/java/src/java/util/jar/JarOutputStream.java @@ -9,7 +9,7 @@ package java.util.jar; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; import java.io.IOException; import java.io.OutputStream; diff --git a/infer/models/java/src/java/util/zip/CheckedInputStream.java b/infer/models/java/src/java/util/zip/CheckedInputStream.java index f4ca4b5f7..cbee94934 100644 --- a/infer/models/java/src/java/util/zip/CheckedInputStream.java +++ b/infer/models/java/src/java/util/zip/CheckedInputStream.java @@ -9,7 +9,7 @@ package java.util.zip; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; import java.io.FilterInputStream; import java.io.IOException; diff --git a/infer/models/java/src/java/util/zip/CheckedOutputStream.java b/infer/models/java/src/java/util/zip/CheckedOutputStream.java index be3ec675b..7539bbae2 100644 --- a/infer/models/java/src/java/util/zip/CheckedOutputStream.java +++ b/infer/models/java/src/java/util/zip/CheckedOutputStream.java @@ -9,7 +9,7 @@ package java.util.zip; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; import java.io.FilterOutputStream; import java.io.IOException; diff --git a/infer/models/java/src/java/util/zip/Deflater.java b/infer/models/java/src/java/util/zip/Deflater.java index 1f9f14179..feee07d59 100644 --- a/infer/models/java/src/java/util/zip/Deflater.java +++ b/infer/models/java/src/java/util/zip/Deflater.java @@ -9,7 +9,7 @@ package java.util.zip; -import com.facebook.infer.models.InferBuiltins; +import com.facebook.infer.builtins.InferBuiltins; public class Deflater { diff --git a/infer/models/java/src/java/util/zip/DeflaterInputStream.java b/infer/models/java/src/java/util/zip/DeflaterInputStream.java index 4333e8a67..7a93e2ad3 100644 --- a/infer/models/java/src/java/util/zip/DeflaterInputStream.java +++ b/infer/models/java/src/java/util/zip/DeflaterInputStream.java @@ -9,7 +9,7 @@ package java.util.zip; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; import java.io.FilterInputStream; import java.io.IOException; diff --git a/infer/models/java/src/java/util/zip/DeflaterOutputStream.java b/infer/models/java/src/java/util/zip/DeflaterOutputStream.java index 216b80983..a7e4be925 100644 --- a/infer/models/java/src/java/util/zip/DeflaterOutputStream.java +++ b/infer/models/java/src/java/util/zip/DeflaterOutputStream.java @@ -9,7 +9,7 @@ package java.util.zip; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; import java.io.FilterOutputStream; import java.io.IOException; diff --git a/infer/models/java/src/java/util/zip/GZIPInputStream.java b/infer/models/java/src/java/util/zip/GZIPInputStream.java index 398eaca95..a5a8520fb 100644 --- a/infer/models/java/src/java/util/zip/GZIPInputStream.java +++ b/infer/models/java/src/java/util/zip/GZIPInputStream.java @@ -9,7 +9,7 @@ package java.util.zip; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; import java.io.IOException; import java.io.InputStream; diff --git a/infer/models/java/src/java/util/zip/GZIPOutputStream.java b/infer/models/java/src/java/util/zip/GZIPOutputStream.java index ae6951408..a065553fe 100644 --- a/infer/models/java/src/java/util/zip/GZIPOutputStream.java +++ b/infer/models/java/src/java/util/zip/GZIPOutputStream.java @@ -9,7 +9,7 @@ package java.util.zip; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; import java.io.IOException; import java.io.OutputStream; diff --git a/infer/models/java/src/java/util/zip/Inflater.java b/infer/models/java/src/java/util/zip/Inflater.java index 271a7b5b8..4a4fbc51e 100644 --- a/infer/models/java/src/java/util/zip/Inflater.java +++ b/infer/models/java/src/java/util/zip/Inflater.java @@ -9,7 +9,7 @@ package java.util.zip; -import com.facebook.infer.models.InferBuiltins; +import com.facebook.infer.builtins.InferBuiltins; public class Inflater { diff --git a/infer/models/java/src/java/util/zip/InflaterInputStream.java b/infer/models/java/src/java/util/zip/InflaterInputStream.java index 10899efa4..b3de9f6aa 100644 --- a/infer/models/java/src/java/util/zip/InflaterInputStream.java +++ b/infer/models/java/src/java/util/zip/InflaterInputStream.java @@ -9,7 +9,7 @@ package java.util.zip; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; import java.io.FilterInputStream; import java.io.IOException; diff --git a/infer/models/java/src/java/util/zip/InflaterOutputStream.java b/infer/models/java/src/java/util/zip/InflaterOutputStream.java index d67e5662e..2990ecd7d 100644 --- a/infer/models/java/src/java/util/zip/InflaterOutputStream.java +++ b/infer/models/java/src/java/util/zip/InflaterOutputStream.java @@ -9,7 +9,7 @@ package java.util.zip; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; import java.io.FilterOutputStream; import java.io.IOException; diff --git a/infer/models/java/src/java/util/zip/ZipFile.java b/infer/models/java/src/java/util/zip/ZipFile.java index 64b5f1005..2b991523f 100644 --- a/infer/models/java/src/java/util/zip/ZipFile.java +++ b/infer/models/java/src/java/util/zip/ZipFile.java @@ -9,8 +9,8 @@ package java.util.zip; -import com.facebook.infer.models.InferBuiltins; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferBuiltins; +import com.facebook.infer.builtins.InferUndefined; import java.io.File; import java.io.IOException; diff --git a/infer/models/java/src/java/util/zip/ZipInputStream.java b/infer/models/java/src/java/util/zip/ZipInputStream.java index e9be64491..8a7ca32ee 100644 --- a/infer/models/java/src/java/util/zip/ZipInputStream.java +++ b/infer/models/java/src/java/util/zip/ZipInputStream.java @@ -9,7 +9,7 @@ package java.util.zip; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; import java.io.BufferedInputStream; import java.io.FileInputStream; diff --git a/infer/models/java/src/java/util/zip/ZipOutputStream.java b/infer/models/java/src/java/util/zip/ZipOutputStream.java index 4e1dfa906..47662c56e 100644 --- a/infer/models/java/src/java/util/zip/ZipOutputStream.java +++ b/infer/models/java/src/java/util/zip/ZipOutputStream.java @@ -14,7 +14,7 @@ import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; public class ZipOutputStream extends DeflaterOutputStream { diff --git a/infer/models/java/src/javax/crypto/CipherInputStream.java b/infer/models/java/src/javax/crypto/CipherInputStream.java index 4af0d4ece..ec9bab083 100644 --- a/infer/models/java/src/javax/crypto/CipherInputStream.java +++ b/infer/models/java/src/javax/crypto/CipherInputStream.java @@ -9,7 +9,7 @@ package javax.crypto; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; import java.io.FilterInputStream; import java.io.IOException; diff --git a/infer/models/java/src/javax/crypto/CipherOutputStream.java b/infer/models/java/src/javax/crypto/CipherOutputStream.java index 8593a4d69..deb7f0cab 100644 --- a/infer/models/java/src/javax/crypto/CipherOutputStream.java +++ b/infer/models/java/src/javax/crypto/CipherOutputStream.java @@ -9,7 +9,7 @@ package javax.crypto; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferUndefined; import java.io.FilterOutputStream; import java.io.IOException; diff --git a/infer/models/java/src/javax/net/SocketFactory.java b/infer/models/java/src/javax/net/SocketFactory.java index b590cfcac..f1cc6c9c7 100644 --- a/infer/models/java/src/javax/net/SocketFactory.java +++ b/infer/models/java/src/javax/net/SocketFactory.java @@ -13,7 +13,7 @@ import java.io.IOException; import java.net.InetAddress; import java.net.Socket; -import com.facebook.infer.models.InferBuiltins; +import com.facebook.infer.builtins.InferBuiltins; public class SocketFactory { diff --git a/infer/models/java/src/javax/net/ssl/HostnameVerifier.java b/infer/models/java/src/javax/net/ssl/HostnameVerifier.java index cda698bf0..d85ce4816 100644 --- a/infer/models/java/src/javax/net/ssl/HostnameVerifier.java +++ b/infer/models/java/src/javax/net/ssl/HostnameVerifier.java @@ -13,8 +13,8 @@ import java.net.Socket; import javax.net.SocketFactory; import javax.net.ssl.SSLSession; -import com.facebook.infer.models.InferBuiltins; -import com.facebook.infer.models.InferUndefined; +import com.facebook.infer.builtins.InferBuiltins; +import com.facebook.infer.builtins.InferUndefined; public class HostnameVerifier { diff --git a/infer/models/java/src/javax/net/ssl/HttpsURLConnection.java b/infer/models/java/src/javax/net/ssl/HttpsURLConnection.java index 231693e8b..6943e7095 100644 --- a/infer/models/java/src/javax/net/ssl/HttpsURLConnection.java +++ b/infer/models/java/src/javax/net/ssl/HttpsURLConnection.java @@ -9,7 +9,7 @@ package javax.net.ssl; -import com.facebook.infer.models.InferBuiltins; +import com.facebook.infer.builtins.InferBuiltins; import java.net.HttpURLConnection; import java.net.URL; diff --git a/infer/models/java/src/javax/net/ssl/SSLSocketFactory.java b/infer/models/java/src/javax/net/ssl/SSLSocketFactory.java index 2773c98f4..6b35a6d32 100644 --- a/infer/models/java/src/javax/net/ssl/SSLSocketFactory.java +++ b/infer/models/java/src/javax/net/ssl/SSLSocketFactory.java @@ -15,7 +15,7 @@ import java.net.Socket; import javax.net.SocketFactory; -import com.facebook.infer.models.InferBuiltins; +import com.facebook.infer.builtins.InferBuiltins; public class SSLSocketFactory extends SocketFactory { diff --git a/infer/models/java/src/junit/framework/Assert.java b/infer/models/java/src/junit/framework/Assert.java index f4aef69fc..b7e88a378 100644 --- a/infer/models/java/src/junit/framework/Assert.java +++ b/infer/models/java/src/junit/framework/Assert.java @@ -9,7 +9,7 @@ package junit.framework; -import com.facebook.infer.models.InferBuiltins; +import com.facebook.infer.builtins.InferBuiltins; public class Assert { diff --git a/infer/src/IR/Procname.re b/infer/src/IR/Procname.re index 2af6ca92a..1b4cee784 100644 --- a/infer/src/IR/Procname.re +++ b/infer/src/IR/Procname.re @@ -477,7 +477,7 @@ let is_class_initializer = let is_infer_undefined pn => switch pn { | Java j => - let regexp = Str.regexp "com.facebook.infer.models.InferUndefined"; + let regexp = Str.regexp "com.facebook.infer.builtins.InferUndefined"; Str.string_match regexp (java_get_class_name j) 0 | _ => /* TODO: add cases for obj-c, c, c++ */ diff --git a/infer/src/backend/taint.ml b/infer/src/backend/taint.ml index 611cd1424..72ad8f5b8 100644 --- a/infer/src/backend/taint.ml +++ b/infer/src/backend/taint.ml @@ -17,7 +17,7 @@ open PatternMatch let sources0 = [ (* for testing only *) { - classname = "com.facebook.infer.models.InferTaint"; + classname = "com.facebook.infer.builtins.InferTaint"; method_name = "inferSecretSource"; ret_type = JConfig.object_cl; params = []; @@ -26,7 +26,7 @@ let sources0 = [ language = Config.Java; }; { - classname = "com.facebook.infer.models.InferTaint"; + classname = "com.facebook.infer.builtins.InferTaint"; method_name = "inferSecretSourceUndefined"; ret_type = JConfig.object_cl; params = []; @@ -63,7 +63,7 @@ let sources0 = [ let sinks = [ (* for testing only *) ({ - classname = "com.facebook.infer.models.InferTaint"; + classname = "com.facebook.infer.builtins.InferTaint"; method_name = "inferSensitiveSink"; ret_type = "void"; params = [JConfig.object_cl]; @@ -72,7 +72,7 @@ let sinks = [ language = Config.Java }, [0]); ({ - classname = "com.facebook.infer.models.InferTaint"; + classname = "com.facebook.infer.builtins.InferTaint"; method_name = "inferSensitiveSinkUndefined"; ret_type = "void"; params = [JConfig.object_cl]; diff --git a/infer/src/java/jConfig.ml b/infer/src/java/jConfig.ml index e5b05f6e9..076cca195 100644 --- a/infer/src/java/jConfig.ml +++ b/infer/src/java/jConfig.ml @@ -13,7 +13,8 @@ open! Utils open Javalib_pack (** {2 Class names and types} *) -let builtins_package = "com.facebook.infer.models" + +let builtins_package = "com.facebook.infer.builtins" let infer_builtins_cl = builtins_package ^ ".InferBuiltins" diff --git a/infer/src/quandary/JavaTrace.ml b/infer/src/quandary/JavaTrace.ml index 77373d2c9..abb138153 100644 --- a/infer/src/quandary/JavaTrace.ml +++ b/infer/src/quandary/JavaTrace.ml @@ -70,7 +70,7 @@ module JavaSource = struct [0, make Intent site] | "android.content.SharedPreferences", "getString" -> [0, make SharedPreferences site] - | "com.facebook.infer.models.InferTaint", "inferSecretSource" -> + | "com.facebook.infer.builtins.InferTaint", "inferSecretSource" -> [0, make Other site] | _ -> [] @@ -176,7 +176,7 @@ module JavaSink = struct taint_nth 1 Intent site ~report_reachable:true | "android.util.Log", ("d" | "e" | "i" | "println" | "v" | "w" | "wtf") -> taint_all pname Logging site ~report_reachable:true - | "com.facebook.infer.models.InferTaint", "inferSensitiveSink" -> + | "com.facebook.infer.builtins.InferTaint", "inferSensitiveSink" -> [Sink.make_sink_param (make Other site) 0 ~report_reachable:false] | _ -> [] diff --git a/infer/tests/codetoanalyze/java/Makefile b/infer/tests/codetoanalyze/java/Makefile index ada3c8c99..0eb7b7468 100644 --- a/infer/tests/codetoanalyze/java/Makefile +++ b/infer/tests/codetoanalyze/java/Makefile @@ -15,9 +15,8 @@ BUTTERKNIFE = $(DEPENDENCIES_DIR)/java/butterknife/butterknife-7.0.1.jar JACKSON = $(DEPENDENCIES_DIR)/java/jackson/jackson-2.2.3.jar JSR305 = $(DEPENDENCIES_DIR)/java/jsr-305/jsr305.jar INJECT = $(DEPENDENCIES_DIR)/java/jsr-330/javax.inject.jar -MODELS = $(JAVA_LIB_DIR)/models.jar -CLASSPATH=$(ANDROID19):$(ANDROIDSUPPORT):$(ANNOTATIONS):$(BUTTERKNIFE):$(JACKSON):$(JSR305):$(INJECT):$(MODELS):. +CLASSPATH=$(ANDROID19):$(ANDROIDSUPPORT):$(ANNOTATIONS):$(BUTTERKNIFE):$(JACKSON):$(JSR305):$(INJECT):$(JAVA_BUILTINS_DIR):. INFERPRINT_OPTIONS = --issues-tests diff --git a/infer/tests/codetoanalyze/java/infer/Builtins.java b/infer/tests/codetoanalyze/java/infer/Builtins.java index 21026e924..e78be343a 100644 --- a/infer/tests/codetoanalyze/java/infer/Builtins.java +++ b/infer/tests/codetoanalyze/java/infer/Builtins.java @@ -9,7 +9,7 @@ package codetoanalyze.java.infer; -import com.facebook.infer.models.InferBuiltins; +import com.facebook.infer.builtins.InferBuiltins; public class Builtins { diff --git a/infer/tests/codetoanalyze/java/infer/TaintExample.java b/infer/tests/codetoanalyze/java/infer/TaintExample.java index 6e3d11bdb..931d0c0d5 100644 --- a/infer/tests/codetoanalyze/java/infer/TaintExample.java +++ b/infer/tests/codetoanalyze/java/infer/TaintExample.java @@ -24,7 +24,7 @@ import javax.net.ssl.SSLSocketFactory; import android.content.ContentValues; import android.content.SharedPreferences; -import com.facebook.infer.models.InferTaint; +import com.facebook.infer.builtins.InferTaint; import com.facebook.infer.annotation.IntegritySource; import com.facebook.infer.annotation.IntegritySink; import com.facebook.infer.annotation.PrivacySource; diff --git a/infer/tests/codetoanalyze/java/quandary/Arrays.java b/infer/tests/codetoanalyze/java/quandary/Arrays.java index dc3d3092b..8543db8da 100644 --- a/infer/tests/codetoanalyze/java/quandary/Arrays.java +++ b/infer/tests/codetoanalyze/java/quandary/Arrays.java @@ -9,7 +9,7 @@ package codetoanalyze.java.quandary; -import com.facebook.infer.models.InferTaint; +import com.facebook.infer.builtins.InferTaint; public class Arrays { diff --git a/infer/tests/codetoanalyze/java/quandary/Basics.java b/infer/tests/codetoanalyze/java/quandary/Basics.java index 13e57fdfd..56e705332 100644 --- a/infer/tests/codetoanalyze/java/quandary/Basics.java +++ b/infer/tests/codetoanalyze/java/quandary/Basics.java @@ -9,7 +9,7 @@ package codetoanalyze.java.quandary; -import com.facebook.infer.models.InferTaint; +import com.facebook.infer.builtins.InferTaint; /** testing basic intraprocedural functionality: assignment, ifs, loops, casts */ diff --git a/infer/tests/codetoanalyze/java/quandary/Exceptions.java b/infer/tests/codetoanalyze/java/quandary/Exceptions.java index 9aca37e13..04f9991bb 100644 --- a/infer/tests/codetoanalyze/java/quandary/Exceptions.java +++ b/infer/tests/codetoanalyze/java/quandary/Exceptions.java @@ -9,7 +9,7 @@ package codetoanalyze.java.quandary; -import com.facebook.infer.models.InferTaint; +import com.facebook.infer.builtins.InferTaint; class Exceptions { diff --git a/infer/tests/codetoanalyze/java/quandary/Fields.java b/infer/tests/codetoanalyze/java/quandary/Fields.java index c1f13759f..e7d95fed6 100644 --- a/infer/tests/codetoanalyze/java/quandary/Fields.java +++ b/infer/tests/codetoanalyze/java/quandary/Fields.java @@ -9,7 +9,7 @@ package codetoanalyze.java.quandary; -import com.facebook.infer.models.InferTaint; +import com.facebook.infer.builtins.InferTaint; public class Fields { diff --git a/infer/tests/codetoanalyze/java/quandary/Interprocedural.java b/infer/tests/codetoanalyze/java/quandary/Interprocedural.java index 35243ff29..32b8b5fbd 100644 --- a/infer/tests/codetoanalyze/java/quandary/Interprocedural.java +++ b/infer/tests/codetoanalyze/java/quandary/Interprocedural.java @@ -9,7 +9,7 @@ package codetoanalyze.java.quandary; -import com.facebook.infer.models.InferTaint; +import com.facebook.infer.builtins.InferTaint; class Interprocedural { diff --git a/infer/tests/codetoanalyze/java/quandary/Recursion.java b/infer/tests/codetoanalyze/java/quandary/Recursion.java index cd0451445..1ac9b5612 100644 --- a/infer/tests/codetoanalyze/java/quandary/Recursion.java +++ b/infer/tests/codetoanalyze/java/quandary/Recursion.java @@ -9,7 +9,7 @@ package codetoanalyze.java.quandary; -import com.facebook.infer.models.InferTaint; +import com.facebook.infer.builtins.InferTaint; public class Recursion {