Home
last modified time | relevance | path

Searched refs:NULL (Results 1 – 25 of 66) sorted by relevance

123

/libcore/luni/src/main/native/
Dorg_apache_harmony_xml_ExpatParser.cpp45 InternedString() : interned(NULL), bytes(NULL) { in InternedString()
78 if (newArray == NULL) { in push()
79 jniThrowOutOfMemoryError(env, NULL); in push()
93 return (size == 0) ? NULL : array[--size]; in pop()
109 : env(NULL), object(object), buffer(NULL), bufferSize(-1) { in ParsingContext()
111 internedStrings[i] = NULL; in ParsingContext()
124 while ((current = *(bucket++)) != NULL) { in ~ParsingContext()
145 if (javaBuffer == NULL) return NULL; in ensureCapacity()
149 if (javaBuffer == NULL) return NULL; in ensureCapacity()
159 if (buffer != NULL) { in freeBuffer()
[all …]
Dlibcore_io_Linux.cpp83 if ((NAME) == NULL) return NULL;
94 if (p != NULL) { // bionic's freeaddrinfo(3) crashes when passed NULL. in operator ()()
108 return sa != NULL && sa->sa_family == AF_INET6 && in isIPv4MappedAddress()
128 if ((java_addr) == NULL && (null_addr_ok)) { \
135 sockaddr* _sa = _salen ? reinterpret_cast<sockaddr*>(&_ss) : NULL; \
236 jthrowable cause = NULL; in throwException()
243 if (detailMessage.get() == NULL) { in throwException()
250 if (cause != NULL) { in throwException()
307 if (offsets.get() == NULL) { in init()
311 if (byteCounts.get() == NULL) { in init()
[all …]
DZipUtilities.cpp27 jniThrowOutOfMemoryError(env, NULL); in throwExceptionForZlibError()
28 } else if (stream != NULL && stream->stream.msg != NULL) { in throwExceptionForZlibError()
48 if (dictionaryBytes.get() == NULL) { in setDictionary()
49 jniThrowOutOfMemoryError(env, NULL); in setDictionary()
61 throwExceptionForZlibError(env, "java/lang/IllegalArgumentException", err, NULL); in setDictionary()
69 if (input.get() == NULL) { in setInput()
71 jniThrowOutOfMemoryError(env, NULL); in setInput()
75 if (buf != NULL) { in setInput()
DExecStrings.cpp28 : env_(env), java_array_(java_string_array), array_(NULL) { in ExecStrings()
29 if (java_array_ == NULL) { in ExecStrings()
35 array_[length] = NULL; in ExecStrings()
39 char* string = const_cast<char*>(env_->GetStringUTFChars(java_string.get(), NULL)); in ExecStrings()
45 if (array_ == NULL) { in ~ExecStrings()
51 if (pending_exception != NULL) { in ~ExecStrings()
63 if (pending_exception != NULL) { in ~ExecStrings()
DNetworkUtilities.cpp71 return NULL; in sockaddrToInetAddress()
73 if (port != NULL) { in sockaddrToInetAddress()
78 if (byteArray.get() == NULL) { in sockaddrToInetAddress()
79 return NULL; in sockaddrToInetAddress()
86 if (getByAddressMethod == NULL) { in sockaddrToInetAddress()
87 return NULL; in sockaddrToInetAddress()
90 NULL, byteArray.get(), scope_id); in sockaddrToInetAddress()
97 if (inetAddress == NULL) { in inetAddressToSockaddr()
98 jniThrowNullPointerException(env, NULL); in inetAddressToSockaddr()
104 if (holderFid == NULL) { in inetAddressToSockaddr()
[all …]
DAsynchronousCloseMonitor.cpp61 static AsynchronousCloseMonitorImpl* blockedThreadList = NULL;
85 int rc = sigaction(BLOCKED_THREAD_SIGNAL, &sa, NULL); in init()
93 for (AsynchronousCloseMonitorImpl* it = blockedThreadList; it != NULL; it = it->mNext) { in signalBlockedThreads()
113 mPrev = NULL; in AsynchronousCloseMonitorImpl()
115 if (mNext != NULL) { in AsynchronousCloseMonitorImpl()
124 if (mNext != NULL) { in ~AsynchronousCloseMonitorImpl()
127 if (mPrev == NULL) { in ~AsynchronousCloseMonitorImpl()
Djava_math_NativeBN.cpp152 if (chars.c_str() == NULL) { in NativeBN_BN_dec2bn()
166 if (chars.c_str() == NULL) { in NativeBN_BN_hex2bn()
180 if (bytes.get() == NULL) { in NativeBN_BN_bin2bn()
197 if (scopedArray.get() == NULL) { in NativeBN_litEndInts2bn()
218 if (bytes.get() == NULL) { in NativeBN_twosComp2bn()
279 if (!oneValidHandle(env, a)) return NULL; in NativeBN_BN_bn2dec()
281 if (tmpStr == NULL) { in NativeBN_BN_bn2dec()
283 return NULL; in NativeBN_BN_bn2dec()
292 if (!oneValidHandle(env, a)) return NULL; in NativeBN_BN_bn2hex()
294 if (tmpStr == NULL) { in NativeBN_BN_bn2hex()
[all …]
/libcore/ojluni/src/main/native/
DObjectInputStream.c69 if (src == NULL) { in Java_java_io_ObjectInputStream_bytesToFloats()
70 JNU_ThrowNullPointerException(env, NULL); in Java_java_io_ObjectInputStream_bytesToFloats()
73 bytes = (*env)->GetPrimitiveArrayCritical(env, src, NULL); in Java_java_io_ObjectInputStream_bytesToFloats()
74 if (bytes == NULL) /* exception thrown */ in Java_java_io_ObjectInputStream_bytesToFloats()
78 if (dst == NULL) { in Java_java_io_ObjectInputStream_bytesToFloats()
80 JNU_ThrowNullPointerException(env, NULL); in Java_java_io_ObjectInputStream_bytesToFloats()
83 floats = (*env)->GetPrimitiveArrayCritical(env, dst, NULL); in Java_java_io_ObjectInputStream_bytesToFloats()
84 if (floats == NULL) { /* exception thrown */ in Java_java_io_ObjectInputStream_bytesToFloats()
137 if (src == NULL) { in Java_java_io_ObjectInputStream_bytesToDoubles()
138 JNU_ThrowNullPointerException(env, NULL); in Java_java_io_ObjectInputStream_bytesToDoubles()
[all …]
DObjectOutputStream.c69 if (src == NULL) { in Java_java_io_ObjectOutputStream_floatsToBytes()
70 JNU_ThrowNullPointerException(env, NULL); in Java_java_io_ObjectOutputStream_floatsToBytes()
73 floats = (*env)->GetPrimitiveArrayCritical(env, src, NULL); in Java_java_io_ObjectOutputStream_floatsToBytes()
74 if (floats == NULL) /* exception thrown */ in Java_java_io_ObjectOutputStream_floatsToBytes()
78 if (dst == NULL) { in Java_java_io_ObjectOutputStream_floatsToBytes()
80 JNU_ThrowNullPointerException(env, NULL); in Java_java_io_ObjectOutputStream_floatsToBytes()
83 bytes = (*env)->GetPrimitiveArrayCritical(env, dst, NULL); in Java_java_io_ObjectOutputStream_floatsToBytes()
84 if (bytes == NULL) { /* exception thrown */ in Java_java_io_ObjectOutputStream_floatsToBytes()
141 if (src == NULL) { in Java_java_io_ObjectOutputStream_doublesToBytes()
142 JNU_ThrowNullPointerException(env, NULL); in Java_java_io_ObjectOutputStream_doublesToBytes()
[all …]
Dio_util.h91 if (_##var##str == NULL) { \
92 JNU_ThrowNullPointerException((env), NULL); \
95 var = JNU_GetStringPlatformChars((env), _##var##str, NULL); \
96 if (var == NULL) goto _##var##end;
100 ((object == NULL) \
101 ? NULL \
108 } else ((void)NULL)
119 if (_##var##str == NULL) { \
120 JNU_ThrowNullPointerException((env), NULL); \
123 var = (*(env))->GetStringChars((env), _##var##str, NULL); \
[all …]
DUNIXProcess_md.c207 if (sigaction(SIGCHLD, &sa, NULL) < 0) in setSIGCHLDHandler()
215 if (p == NULL) in xmalloc()
216 JNU_ThrowOutOfMemoryError(env, NULL); in xmalloc()
244 return (s != NULL) ? s : defaultPath(); in effectivePath()
265 pathv[count] = NULL; in splitPath()
443 if ((dp = opendir(FD_DIR)) == NULL) in closeDescriptors()
449 while ((dirp = readdir64(dp)) != NULL) { in closeDescriptors()
452 (fd = strtol(dirp->d_name, NULL, 10)) >= from_fd + 2) in closeDescriptors()
475 return arr == NULL ? NULL : in getBytes()
476 (const char*) (*env)->GetByteArrayElements(env, arr, NULL); in getBytes()
[all …]
Dio_util.c54 JNU_ThrowByName(env, "java/io/InterruptedIOException", NULL); in readSingle()
82 char *buf = NULL; in readBytes()
86 JNU_ThrowNullPointerException(env, NULL); in readBytes()
91 JNU_ThrowByName(env, "java/lang/IndexOutOfBoundsException", NULL); in readBytes()
99 if (buf == NULL) { in readBytes()
100 JNU_ThrowOutOfMemoryError(env, NULL); in readBytes()
118 JNU_ThrowByName(env, "java/io/InterruptedIOException", NULL); in readBytes()
148 JNU_ThrowByName(env, "java/io/InterruptedIOException", NULL); in writeSingle()
158 char *buf = NULL; in writeBytes()
162 JNU_ThrowNullPointerException(env, NULL); in writeBytes()
[all …]
DSystem.c52 if ((*env)->ExceptionOccurred(env)) return NULL; \
66 if ((*env)->ExceptionOccurred(env)) return NULL; \
75 if ((*env)->ExceptionOccurred(env)) return NULL; \
83 if ((*env)->ExceptionOccurred(env)) return NULL; \
154 if (libname == NULL) { in System_mapLibraryName()
156 return NULL; in System_mapLibraryName()
161 return NULL; in System_mapLibraryName()
174 jobjectArray result = (*env)->NewObjectArray(env, 4, stringClass, NULL); in System_specialProperties()
182 return NULL; in System_specialProperties()
186 return NULL; in System_specialProperties()
[all …]
DLinuxNativeDispatcher.c44 fgetxattr_func* my_fgetxattr_func = NULL;
45 fsetxattr_func* my_fsetxattr_func = NULL;
46 fremovexattr_func* my_fremovexattr_func = NULL;
47 flistxattr_func* my_flistxattr_func = NULL;
57 if (x != NULL) { in throwUnixException()
90 if (my_fgetxattr_func == NULL) { in Java_sun_nio_fs_LinuxNativeDispatcher_fgetxattr0()
109 if (my_fsetxattr_func == NULL) { in Java_sun_nio_fs_LinuxNativeDispatcher_fsetxattr0()
126 if (my_fremovexattr_func == NULL) { in Java_sun_nio_fs_LinuxNativeDispatcher_fremovexattr0()
143 if (my_flistxattr_func == NULL) { in Java_sun_nio_fs_LinuxNativeDispatcher_flistxattr()
158 FILE* fp = NULL; in Java_sun_nio_fs_LinuxNativeDispatcher_setmntent0()
[all …]
DProcessEnvironment_md.c60 if (strchr(environ[i], '=') != NULL) in ProcessEnvironment_environ()
65 if (result == NULL) return NULL; in ProcessEnvironment_environ()
70 if (varEnd != NULL) { in ProcessEnvironment_environ()
76 if (var == NULL) return NULL; in ProcessEnvironment_environ()
78 if (val == NULL) return NULL; in ProcessEnvironment_environ()
Dzip_util.c124 NULL, /* Security attributes */ in ZFILE_Open()
127 NULL); in ZFILE_Open()
225 if (((zip = calloc(1, sizeof(jzfile))) != NULL) && in allocZip()
226 ((zip->name = strdup(name)) != NULL) && in allocZip()
227 ((zip->lock = MCREATE()) != NULL)) { in allocZip()
232 if (zip != NULL) { in allocZip()
236 return NULL; in allocZip()
247 if (zip->lock != NULL) MDESTROY(zip->lock); in freeZip()
253 if (zip->maddr != NULL) in freeZip()
260 if (zip->comment != NULL) in freeZip()
[all …]
DUnixNativeDispatcher.c87 } while((_result == NULL) && (errno == EINTR)); \
130 static openat64_func* my_openat64_func = NULL;
131 static fstatat64_func* my_fstatat64_func = NULL;
132 static unlinkat_func* my_unlinkat_func = NULL;
133 static renameat_func* my_renameat_func = NULL;
134 static futimesat_func* my_futimesat_func = NULL;
135 static fdopendir_func* my_fdopendir_func = NULL;
172 if (x != NULL) { in throwUnixException()
263 if (my_fstatat64_func == NULL) in Java_sun_nio_fs_UnixNativeDispatcher_init()
272 if (my_futimesat_func != NULL) in Java_sun_nio_fs_UnixNativeDispatcher_init()
[all …]
DObjectStreamClass.c39 if (cl == NULL) { /* exception thrown */ in ObjectStreamClass_initNative()
61 jclass superCl = NULL; in ObjectStreamClass_hasStaticInitializer()
62 jmethodID superClinitId = NULL; in ObjectStreamClass_hasStaticInitializer()
69 if (clinitId == NULL) { /* error thrown */ in ObjectStreamClass_hasStaticInitializer()
96 if ((superCl = (*env)->GetSuperclass(env, clazz)) == NULL) { in ObjectStreamClass_hasStaticInitializer()
101 if (superClinitId == NULL) { /* error thrown */ in ObjectStreamClass_hasStaticInitializer()
DUnixFileSystem_md.c87 jstring rv = NULL; in Java_java_io_UnixFileSystem_canonicalize0()
307 DIR *dir = NULL; in Java_java_io_UnixFileSystem_list0()
316 CHECK_NULL_RETURN(str_class, NULL); in Java_java_io_UnixFileSystem_list0()
322 if (dir == NULL) return NULL; in Java_java_io_UnixFileSystem_list0()
337 rv = (*env)->NewObjectArray(env, maxlen, str_class, NULL); in Java_java_io_UnixFileSystem_list0()
338 if (rv == NULL) goto error; in Java_java_io_UnixFileSystem_list0()
343 while ((ptr = readdir64(dir)) != NULL) { in Java_java_io_UnixFileSystem_list0()
349 rv = (*env)->NewObjectArray(env, maxlen <<= 1, str_class, NULL); in Java_java_io_UnixFileSystem_list0()
350 if (rv == NULL) goto error; in Java_java_io_UnixFileSystem_list0()
359 if (name == NULL) goto error; in Java_java_io_UnixFileSystem_list0()
[all …]
Dnet_util_md.c75 getaddrinfo_f getaddrinfo_ptr = NULL;
76 freeaddrinfo_f freeaddrinfo_ptr = NULL;
77 gai_strerror_f gai_strerror_ptr = NULL;
78 getnameinfo_f getnameinfo_ptr = NULL;
95 static jclass ni_class = NULL;
97 if (ni_class == NULL) {
117 static jclass ni_class = NULL;
119 if (ni_class == NULL) {
121 if (c == NULL) return 0;
123 if (c == NULL) return 0;
[all …]
DDatagramChannelImpl.c66 if (isa_class == NULL) { in Java_sun_nio_ch_DatagramChannelImpl_initIDs()
67 JNU_ThrowOutOfMemoryError(env, NULL); in Java_sun_nio_ch_DatagramChannelImpl_initIDs()
199 (*env)->SetObjectField(env, this, dci_senderID, NULL); in Java_sun_nio_ch_DatagramChannelImpl_receive0()
209 if (senderAddr != NULL) { in Java_sun_nio_ch_DatagramChannelImpl_receive0()
212 senderAddr = NULL; in Java_sun_nio_ch_DatagramChannelImpl_receive0()
216 senderAddr = NULL; in Java_sun_nio_ch_DatagramChannelImpl_receive0()
220 if (senderAddr == NULL) { in Java_sun_nio_ch_DatagramChannelImpl_receive0()
221 jobject isa = NULL; in Java_sun_nio_ch_DatagramChannelImpl_receive0()
228 if (ia != NULL) { in Java_sun_nio_ch_DatagramChannelImpl_receive0()
Dnet_util.c85 CHECK_NULL_RETURN(holder, NULL); in getInet6Address_scopeifname()
152 if (addr == NULL) { in setInet6Address_ipaddress()
223 CHECK_NULL_RETURN(c, NULL); in NET_SockaddrToInetAddress()
225 CHECK_NULL_RETURN(inet4Cls, NULL); in NET_SockaddrToInetAddress()
229 CHECK_NULL_RETURN(iaObj, NULL); in NET_SockaddrToInetAddress()
239 CHECK_NULL_RETURN(c, NULL); in NET_SockaddrToInetAddress()
241 CHECK_NULL_RETURN(inet6Cls, NULL); in NET_SockaddrToInetAddress()
245 CHECK_NULL_RETURN(iaObj, NULL); in NET_SockaddrToInetAddress()
249 if (ret == JNI_FALSE) return NULL; in NET_SockaddrToInetAddress()
263 CHECK_NULL_RETURN(c, NULL); in NET_SockaddrToInetAddress()
[all …]
DZipFile.c72 jstring s = NULL; in ThrowZipException()
75 if (msg != NULL) { in ThrowZipException()
81 if (x != NULL) { in ThrowZipException()
256 jbyteArray jba = NULL; in ZipFile_getCommentBytes()
258 if (zip->comment != NULL) { in ZipFile_getCommentBytes()
259 if ((jba = (*env)->NewByteArray(env, zip->clen)) == NULL) in ZipFile_getCommentBytes()
260 return NULL; in ZipFile_getCommentBytes()
271 jbyteArray jba = NULL; in ZipFile_getEntryBytes()
276 if (len == 0 || (jba = (*env)->NewByteArray(env, len)) == NULL) in ZipFile_getEntryBytes()
285 if (len <= 0 || (jba = (*env)->NewByteArray(env, len)) == NULL) in ZipFile_getEntryBytes()
[all …]
Djni_util.c165 if (s != NULL) { in JNU_ThrowByNameWithLastError()
168 if (x != NULL) { in JNU_ThrowByNameWithLastError()
362 jobject obj = NULL; in JNU_NewObjectByName()
377 if (cls_initMID == NULL) { in JNU_NewObjectByName()
943 if (cls != NULL) { in JNU_IsInstanceOfByName()
954 static jmethodID mid = NULL; in JNU_Equals()
955 if (mid == NULL) { in JNU_Equals()
974 if (object == NULL) { in JNU_MonitorWait()
978 if (Object_waitMID == NULL) { in JNU_MonitorWait()
980 if (cls == NULL) { in JNU_MonitorWait()
[all …]
/libcore/luni/src/test/native/
Dlibcore_libcore_icu_LocaleDataTest.cpp53 if (bundle_ != NULL) { in ~ScopedResourceBundle()
64 ures_getStringByKey(bundle_, key, NULL, &status); in hasKey()
77 return NULL; in valueOf()
81 return NULL; in valueOf()
93 if (integerValue.get() == NULL) return false; in setIntegerField()
111 …Ref<jobjectArray> result(env, env->NewObjectArray(size, env->FindClass("java/lang/String"), NULL)); in setStringArrayField()
129 UResourceBundle* currentBundle = ures_getByIndex(bundle, index, NULL, &status); in setStringField()
235 ScopedResourceBundle root(ures_open(NULL, locale_name, &status)); in getAmPmMarkersNarrow()
239 ScopedResourceBundle calendar(ures_getByKey(root.get(), "calendar", NULL, &status)); in getAmPmMarkersNarrow()
243 ScopedResourceBundle gregorian(ures_getByKey(calendar.get(), "gregorian", NULL, &status)); in getAmPmMarkersNarrow()
[all …]

123