Index: subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNRepos.cpp =================================================================== --- subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNRepos.cpp (revision 1344562) +++ subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNRepos.cpp (working copy) @@ -55,11 +55,7 @@ { JNIEntry(SVNRepos, dispose); SVNRepos *cl = SVNRepos::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return; - } + CPPADDR_NULL_PTR(cl, ); cl->dispose(jthis); } @@ -80,11 +76,7 @@ { JNIEntry(SVNRepos, create); SVNRepos *cl = SVNRepos::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return; - } + CPPADDR_NULL_PTR(cl, ); File path(jpath); if (JNIUtil::isExceptionThrown()) @@ -109,11 +101,7 @@ { JNIEntry(SVNRepos, deltify); SVNRepos *cl = SVNRepos::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return; - } + CPPADDR_NULL_PTR(cl, ); File path(jpath); if (JNIUtil::isExceptionThrown()) @@ -138,11 +126,7 @@ { JNIEntry(SVNRepos, dump); SVNRepos *cl = SVNRepos::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return; - } + CPPADDR_NULL_PTR(cl, ); File path(jpath); if (JNIUtil::isExceptionThrown()) @@ -174,11 +158,7 @@ { JNIEntry(SVNRepos, hotcopy); SVNRepos *cl = SVNRepos::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return; - } + CPPADDR_NULL_PTR(cl, ); File path(jpath); if (JNIUtil::isExceptionThrown()) @@ -197,11 +177,7 @@ { JNIEntry(SVNRepos, listDBLogs); SVNRepos *cl = SVNRepos::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return; - } + CPPADDR_NULL_PTR(cl, ); File path(jpath); if (JNIUtil::isExceptionThrown()) @@ -220,11 +196,7 @@ { JNIEntry(SVNRepos, listUnusedDBLogs); SVNRepos *cl = SVNRepos::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return; - } + CPPADDR_NULL_PTR(cl, ); File path(jpath); if (JNIUtil::isExceptionThrown()) @@ -245,11 +217,7 @@ { JNIEntry(SVNRepos, load); SVNRepos *cl = SVNRepos::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return; - } + CPPADDR_NULL_PTR(cl, ); File path(jpath); if (JNIUtil::isExceptionThrown()) @@ -277,11 +245,7 @@ { JNIEntry(SVNRepos, lstxns); SVNRepos *cl = SVNRepos::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return; - } + CPPADDR_NULL_PTR(cl, ); File path(jpath); if (JNIUtil::isExceptionThrown()) @@ -300,11 +264,7 @@ { JNIEntry(SVNRepos, recover); SVNRepos *cl = SVNRepos::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return -1; - } + CPPADDR_NULL_PTR(cl, -1); File path(jpath); if (JNIUtil::isExceptionThrown()) @@ -321,11 +281,7 @@ { JNIEntry(SVNRepos, rmtxns); SVNRepos *cl = SVNRepos::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return; - } + CPPADDR_NULL_PTR(cl, ); File path(jpath); if (JNIUtil::isExceptionThrown()) @@ -346,11 +302,7 @@ { JNIEntry(SVNRepos, setRevProp); SVNRepos *cl = SVNRepos::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return; - } + CPPADDR_NULL_PTR(cl, ); File path(jpath); if (JNIUtil::isExceptionThrown()) @@ -380,11 +332,7 @@ { JNIEntry(SVNRepos, verify); SVNRepos *cl = SVNRepos::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return; - } + CPPADDR_NULL_PTR(cl, ); File path(jpath); if (JNIUtil::isExceptionThrown()) @@ -412,11 +360,7 @@ { JNIEntry(SVNRepos, lslocks); SVNRepos *cl = SVNRepos::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return NULL; - } + CPPADDR_NULL_PTR(cl, NULL); File path(jpath); if (JNIUtil::isExceptionThrown()) @@ -431,11 +375,7 @@ { JNIEntry(SVNRepos, rmlocks); SVNRepos *cl = SVNRepos::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return; - } + CPPADDR_NULL_PTR(cl, ); File path(jpath); if (JNIUtil::isExceptionThrown()) @@ -454,11 +394,7 @@ { JNIEntry(SVNRepos, upgrade); SVNRepos *cl = SVNRepos::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return; - } + CPPADDR_NULL_PTR(cl, ); File path(jpath); if (JNIUtil::isExceptionThrown()) @@ -475,11 +411,7 @@ { JNIEntry(SVNRepos, pack); SVNRepos *cl = SVNRepos::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return; - } + CPPADDR_NULL_PTR(cl, ); File path(jpath); if (JNIUtil::isExceptionThrown()) @@ -496,10 +428,6 @@ { JNIEntry(SVNRepos, cancelOperation); SVNRepos *cl = SVNRepos::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError("bad C++ this"); - return; - } + CPPADDR_NULL_PTR(cl, ); cl->cancelOperation(); } Index: subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp =================================================================== --- subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp (revision 1344562) +++ subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp (working copy) @@ -70,11 +70,7 @@ { JNIEntry(SVNClient, dispose); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return; - } + CPPADDR_NULL_PTR(cl, ); cl->dispose(jthis); } @@ -94,11 +90,7 @@ { JNIEntry(SVNClient, getAdminDirectoryName); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return NULL; - } + CPPADDR_NULL_PTR(cl, NULL); return cl->getAdminDirectoryName(); } @@ -108,11 +100,7 @@ { JNIEntry(SVNClient, isAdminDirectory); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return JNI_FALSE; - } + CPPADDR_NULL_PTR(cl, JNI_FALSE); JNIStringHolder name(jname); if (JNIUtil::isExceptionThrown()) return JNI_FALSE; @@ -126,11 +114,7 @@ { JNIEntry(SVNClient, getLastPath); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return NULL; - } + CPPADDR_NULL_PTR(cl, NULL); const char *ret = cl->getLastPath(); return JNIUtil::makeJString(ret); } @@ -196,11 +180,7 @@ { JNIEntry(SVNClient, username); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return; - } + CPPADDR_NULL_PTR(cl, ); if (jusername == NULL) { JNIUtil::raiseThrowable("java/lang/IllegalArgumentException", @@ -220,11 +200,7 @@ { JNIEntry(SVNClient, password); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return; - } + CPPADDR_NULL_PTR(cl, ); if (jpassword == NULL) { JNIUtil::raiseThrowable("java/lang/IllegalArgumentException", @@ -244,11 +220,7 @@ { JNIEntry(SVNClient, setPrompt); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return; - } + CPPADDR_NULL_PTR(cl, ); Prompter *prompter = Prompter::makeCPrompter(jprompter); if (JNIUtil::isExceptionThrown()) return; @@ -265,11 +237,7 @@ { JNIEntry(SVNClient, logMessages); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return; - } + CPPADDR_NULL_PTR(cl, ); Revision pegRevision(jpegRevision, true); if (JNIUtil::isExceptionThrown()) return; @@ -316,11 +284,7 @@ { JNIEntry(SVNClient, checkout); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return -1; - } + CPPADDR_NULL_PTR(cl, -1); Revision revision(jrevision, true); if (JNIUtil::isExceptionThrown()) return -1; @@ -351,11 +315,7 @@ { JNIEntry(SVNClient, remove); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return; - } + CPPADDR_NULL_PTR(cl, ); SVN::Pool tmpPool; StringArray targetsArr(jtargets); Targets targets(targetsArr, tmpPool); @@ -382,11 +342,7 @@ { JNIEntry(SVNClient, revert); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return; - } + CPPADDR_NULL_PTR(cl, ); JNIStringHolder path(jpath); if (JNIUtil::isExceptionThrown()) return; @@ -405,11 +361,7 @@ { JNIEntry(SVNClient, add); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return; - } + CPPADDR_NULL_PTR(cl, ); JNIStringHolder path(jpath); if (JNIUtil::isExceptionThrown()) return; @@ -426,11 +378,7 @@ { JNIEntry(SVNClient, update); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return NULL; - } + CPPADDR_NULL_PTR(cl, NULL); Revision revision(jrevision); if (JNIUtil::isExceptionThrown()) return NULL; @@ -456,11 +404,7 @@ { JNIEntry(SVNClient, commit); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return; - } + CPPADDR_NULL_PTR(cl, ); SVN::Pool tmpPool; StringArray targetsArr(jtargets); Targets targets(targetsArr, tmpPool); @@ -496,11 +440,7 @@ JNIEntry(SVNClient, copy); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return; - } + CPPADDR_NULL_PTR(cl, ); Array copySrcArray(jcopySources); if (JNIUtil::isExceptionThrown()) return; @@ -536,11 +476,7 @@ JNIEntry(SVNClient, move); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return; - } + CPPADDR_NULL_PTR(cl, ); SVN::Pool tmpPool; StringArray srcPathArr(jsrcPaths); Targets srcPaths(srcPathArr, tmpPool); @@ -571,11 +507,7 @@ { JNIEntry(SVNClient, mkdir); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return; - } + CPPADDR_NULL_PTR(cl, ); SVN::Pool tmpPool; StringArray targetsArr(jtargets); Targets targets(targetsArr, tmpPool); @@ -601,11 +533,7 @@ { JNIEntry(SVNClient, cleanup); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return; - } + CPPADDR_NULL_PTR(cl, ); JNIStringHolder path(jpath); if (JNIUtil::isExceptionThrown()) return; @@ -619,11 +547,7 @@ { JNIEntry(SVNClient, resolve); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return; - } + CPPADDR_NULL_PTR(cl, ); JNIStringHolder path(jpath); if (JNIUtil::isExceptionThrown()) return; @@ -640,11 +564,7 @@ { JNIEntry(SVNClient, doExport); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return -1; - } + CPPADDR_NULL_PTR(cl, -1); Revision revision(jrevision); if (JNIUtil::isExceptionThrown()) return -1; @@ -679,11 +599,7 @@ { JNIEntry(SVNClient, doSwitch); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return -1; - } + CPPADDR_NULL_PTR(cl, -1); Revision revision(jrevision); if (JNIUtil::isExceptionThrown()) return -1; @@ -716,11 +632,7 @@ { JNIEntry(SVNClient, doImport); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return; - } + CPPADDR_NULL_PTR(cl, ); JNIStringHolder path(jpath); if (JNIUtil::isExceptionThrown()) return; @@ -750,11 +662,7 @@ { JNIEntry(SVNClient, suggestMergeSources); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return NULL; - } + CPPADDR_NULL_PTR(cl, NULL); JNIStringHolder path(jpath); if (JNIUtil::isExceptionThrown()) @@ -776,11 +684,7 @@ { JNIEntry(SVNClient, merge); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return; - } + CPPADDR_NULL_PTR(cl, ); Revision revision1(jrevision1); if (JNIUtil::isExceptionThrown()) return; @@ -815,11 +719,7 @@ { JNIEntry(SVNClient, merge); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return; - } + CPPADDR_NULL_PTR(cl, ); JNIStringHolder path(jpath); if (JNIUtil::isExceptionThrown()) @@ -864,11 +764,7 @@ { JNIEntry(SVNClient, mergeReintegrate); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return; - } + CPPADDR_NULL_PTR(cl, ); JNIStringHolder path(jpath); if (JNIUtil::isExceptionThrown()) @@ -894,11 +790,7 @@ { JNIEntry(SVNClient, properties); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return; - } + CPPADDR_NULL_PTR(cl, ); JNIStringHolder path(jpath); if (JNIUtil::isExceptionThrown()) return; @@ -928,11 +820,7 @@ { JNIEntry(SVNClient, propertySet); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return; - } + CPPADDR_NULL_PTR(cl, ); JNIStringHolder path(jpath); if (JNIUtil::isExceptionThrown()) return; @@ -966,11 +854,7 @@ { JNIEntry(SVNClient, propertySet); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return; - } + CPPADDR_NULL_PTR(cl, ); SVN::Pool tmpPool; StringArray targetsArr(jtargets); Targets targets(targetsArr, tmpPool); @@ -999,11 +883,7 @@ { JNIEntry(SVNClient, revProperty); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return NULL; - } + CPPADDR_NULL_PTR(cl, NULL); JNIStringHolder path(jpath); if (JNIUtil::isExceptionThrown()) return NULL; @@ -1025,11 +905,7 @@ { JNIEntry(SVNClient, revProperty); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return NULL; - } + CPPADDR_NULL_PTR(cl, NULL); JNIStringHolder path(jpath); if (JNIUtil::isExceptionThrown()) return NULL; @@ -1048,11 +924,7 @@ { JNIEntry(SVNClient, setRevProperty); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return; - } + CPPADDR_NULL_PTR(cl, ); JNIStringHolder path(jpath); if (JNIUtil::isExceptionThrown()) return; @@ -1084,11 +956,7 @@ { JNIEntry(SVNClient, propertyGet); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return NULL; - } + CPPADDR_NULL_PTR(cl, NULL); JNIStringHolder path(jpath); if (JNIUtil::isExceptionThrown()) return NULL; @@ -1114,11 +982,7 @@ { JNIEntry(SVNClient, getMergeinfo); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return NULL; - } + CPPADDR_NULL_PTR(cl, NULL); JNIStringHolder target(jtarget); if (JNIUtil::isExceptionThrown()) return NULL; @@ -1136,11 +1000,7 @@ { JNIEntry(SVNClient, getMergeinfoLog); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return; - } + CPPADDR_NULL_PTR(cl, ); Revision pegRevision(jpegRevision, true); if (JNIUtil::isExceptionThrown()) @@ -1180,11 +1040,7 @@ { JNIEntry(SVNClient, diff); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return; - } + CPPADDR_NULL_PTR(cl, ); JNIStringHolder target1(jtarget1); if (JNIUtil::isExceptionThrown()) return; @@ -1231,11 +1087,7 @@ { JNIEntry(SVNClient, diff); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return; - } + CPPADDR_NULL_PTR(cl, ); JNIStringHolder target(jtarget); if (JNIUtil::isExceptionThrown()) return; @@ -1281,11 +1133,7 @@ JNIEntry(SVNClient, diffSummarize); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return; - } + CPPADDR_NULL_PTR(cl, ); JNIStringHolder target1(jtarget1); if (JNIUtil::isExceptionThrown()) return; @@ -1325,11 +1173,7 @@ JNIEntry(SVNClient, diffSummarize); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return; - } + CPPADDR_NULL_PTR(cl, ); JNIStringHolder target(jtarget); if (JNIUtil::isExceptionThrown()) return; @@ -1362,11 +1206,7 @@ { JNIEntry(SVNClient, streamFileContent); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return; - } + CPPADDR_NULL_PTR(cl, ); JNIStringHolder path(jpath); if (JNIUtil::isExceptionThrown()) return; @@ -1393,11 +1233,7 @@ { JNIEntry(SVNClient, getVersionInfo); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return NULL; - } + CPPADDR_NULL_PTR(cl, NULL); JNIStringHolder path(jpath); if (JNIUtil::isExceptionThrown()) return NULL; @@ -1411,11 +1247,7 @@ { JNIEntry(SVNClient, upgrade); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return; - } + CPPADDR_NULL_PTR(cl, ); JNIStringHolder path(jpath); if (JNIUtil::isExceptionThrown()) return; @@ -1472,11 +1304,7 @@ { JNIEntry(SVNClient, relocate); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return; - } + CPPADDR_NULL_PTR(cl, ); JNIStringHolder from(jfrom); if (JNIUtil::isExceptionThrown()) return; @@ -1501,11 +1329,7 @@ { JNIEntry(SVNClient, blame); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return; - } + CPPADDR_NULL_PTR(cl, ); JNIStringHolder path(jpath); if (JNIUtil::isExceptionThrown()) return; @@ -1534,11 +1358,7 @@ { JNIEntry(SVNClient, setConfigDirectory); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return; - } + CPPADDR_NULL_PTR(cl, ); JNIStringHolder configDir(jconfigDir); if (JNIUtil::isExceptionThrown()) @@ -1553,11 +1373,7 @@ { JNIEntry(SVNClient, getConfigDirectory); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError(_("bad C++ this")); - return NULL; - } + CPPADDR_NULL_PTR(cl, NULL); const char *configDir = cl->getClientContext().getConfigDirectory(); return JNIUtil::makeJString(configDir); @@ -1569,11 +1385,7 @@ { JNIEntry(SVNClient, cancelOperation); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError("bad C++ this"); - return; - } + CPPADDR_NULL_PTR(cl, ); cl->getClientContext().cancelOperation(); } @@ -1584,11 +1396,7 @@ { JNIEntry(SVNClient, addToChangelist); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError("bad C++ this"); - return; - } + CPPADDR_NULL_PTR(cl, ); SVN::Pool tmpPool; StringArray targetsArr(jtargets); Targets targets(targetsArr, tmpPool); @@ -1614,11 +1422,7 @@ { JNIEntry(SVNClient, removeFromChangelist); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError("bad C++ this"); - return; - } + CPPADDR_NULL_PTR(cl, ); SVN::Pool tmpPool; StringArray targetsArr(jtargets); Targets targets(targetsArr, tmpPool); @@ -1639,11 +1443,7 @@ { JNIEntry(SVNClient, getChangelist); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError("bad C++ this"); - return; - } + CPPADDR_NULL_PTR(cl, ); JNIStringHolder root_path(jroot_path); if (JNIUtil::isExceptionThrown()) @@ -1665,11 +1465,7 @@ { JNIEntry(SVNClient, lock); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError("bad C++ this"); - return; - } + CPPADDR_NULL_PTR(cl, ); SVN::Pool tmpPool; StringArray targetsArr(jtargets); Targets targets(targetsArr, tmpPool); @@ -1689,11 +1485,7 @@ { JNIEntry(SVNClient, unlock); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError("bad C++ this"); - return; - } + CPPADDR_NULL_PTR(cl, ); SVN::Pool tmpPool; StringArray targetsArr(jtargets); @@ -1713,11 +1505,7 @@ { JNIEntry(SVNClient, info2); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError("bad C++ this"); - return; - } + CPPADDR_NULL_PTR(cl, ); JNIStringHolder path(jpath); if (JNIUtil::isExceptionThrown()) return; @@ -1747,11 +1535,7 @@ { JNIEntry(SVNClient, patch); SVNClient *cl = SVNClient::getCppObject(jthis); - if (cl == NULL) - { - JNIUtil::throwError("bad C++ this"); - return; - } + CPPADDR_NULL_PTR(cl, ); JNIStringHolder patchPath(jpatchPath); if (JNIUtil::isExceptionThrown())