Commit Graph

223 Commits

Author SHA1 Message Date
c0415d5f1e java: remove unnecessary constructor declarations
in the absence of any other constructors, the compiler will automatically
generate a public no-arg constructor

Change-Id: I70eca507cd8e16e33580b3398d41d70690bc2909
2014-08-20 12:12:15 +02:00
2922a967a1 java: Avoid naming non-fields with the prefix m_
found by PMD

Change-Id: I5955cfc9c4d777496a2e8e4b2c422a51764a8bc1
2014-08-20 10:35:53 +02:00
be1bb7b1cc java: use Boolean.valueOf instead of instantiating Boolean objects
Change-Id: Ie41d6b0170a035a694dd270c311a137fd1810e74
2014-08-19 14:57:16 +02:00
56ef5533fc java: classes in java.lang package do not need to be fully qualified
Change-Id: I7b18f62336c3a8ca4c538b30ce04c99f202a4756
2014-08-19 14:57:16 +02:00
ac5954d7c5 java: remove commented out code
Change-Id: I05c907a38b562231e968c17f14e09ef80e0a6ed1
2014-08-14 10:59:48 +02:00
68cd011c90 java: reduce scope, make some methods private
found by UCDetector

Change-Id: Ib1425edde146193a65c242dc159b7e3fbf0e4a2e
2014-08-13 08:49:23 +02:00
70f56bc22f java: reduce scope, make member classes private
found by UCDetector

Change-Id: Ief32d078090102b14b60b35fc36542f8d4fb252b
2014-08-13 08:49:23 +02:00
da677dfd59 java: reduce scope, make fields private
found by UCDetector

Change-Id: I7f97e15667159cf8ee776e8f32fdcdec8ec00ed6
2014-08-13 08:49:22 +02:00
14d1a11ec4 java: reduce scope, make constructors private
found by UCDetector

Change-Id: If05277fd2fe77ceabb4c7c87aeb8569e3406102d
2014-08-13 08:49:22 +02:00
1c496506bc java: remove useless javadoc tags
that are not conveying any useful information

Change-Id: Ic37934b8cc376fcdcb3d295232452f411dfd43b1
2014-08-12 09:41:31 +02:00
0477e6c39b java: add @Override annotation to overriding methods
Change-Id: I086964c6f6ce52c60c52b6dbc445d3c21d22c80a
2014-08-12 09:41:28 +02:00
616b3ad504 java: remove exceptions from throws clauses that are not
.. actually thrown

Change-Id: Ia326ac7f82e11b948ed0f34e20908a96e7adcd10
2014-08-08 09:48:20 +02:00
b58c053fed java: remove unnecessary semi-colons
Change-Id: Ibeeefc6e6ee8f7bed97a02f569f239ff035d38c4
2014-08-08 09:48:18 +02:00
d07539ea5e java: use an empty block rather than an empty statement
Change-Id: I05e60964521d6ec3694483816d91359fb12c8e4b
2014-08-08 09:48:18 +02:00
0c5f51ebbc java: remove commented out code
Change-Id: I44e2043e5da23bc9421c03e550ef1d8b7ebaad36
2014-08-05 11:31:50 +02:00
4f9b21248f simplify ternary conditions "xxx ? yyy : false"
Look for code like:
   xxx ? yyy : false;
Which can be simplified to:
   xxx && yyy

Change-Id: Ia33c0e452aa28af3f0658a5382895aaad0246b4d
2014-05-05 12:47:48 +02:00
139dcea46b loplugin:unreffun
Change-Id: Ia7b5ac5ca28d80c353f1ccdce4b69838e584d811
2014-04-22 22:07:21 +02:00
c79a5f87b1 remove executable bit
Change-Id: I91f6e861f6d0dbea1b57ac73857e0c706b27f681
2014-04-17 15:11:14 +02:00
b6a79b2c42 Remove dead code
Change-Id: I46ca823d4bfd6ccdb47ce4b4bb793ec81bcc35d9
2014-04-15 16:10:53 +02:00
5047891d04 typo: positon -> position 2014-04-14 12:33:12 +02:00
567ef6d578 Second batch of adding SAL_OVERRIDE to overriding function declarations
...mostly done with a rewriting Clang plugin, with just some manual tweaking
necessary to fix poor macro usage.

Change-Id: Ie656f9d653fc716f72ac175925272696d509038f
2014-03-27 18:12:18 +01:00
b41badb803 svtools: sal_Bool->bool
Change-Id: I37352e90a5304e75ce0c8ae922a167b1e70625e8
2014-03-24 08:12:10 +02:00
2f3be98732 dbaccess: simplify deprecated XTypeProvider.getImplementationId
Required some clean-up of getImplementationId vs. getUnoTunnelImplementationId
confusion.

Change-Id: I645dd80d24efe7ed5224b220911eed8ad880b7c0
2014-03-10 17:39:54 +01:00
2a33953f6e Remove visual noise from dbaccess
Change-Id: I1130439e5883672b4ca462838d72197acd6bc1f2
Reviewed-on: https://gerrit.libreoffice.org/8251
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-27 06:44:14 -06:00
775bf23fc6 Prevent SolarMutex deadlock in unit test
Seen once a deadlock between

d 12 (Thread 0x2af5a4c8a700 (LWP 7618)):
> #0  0x00002af58ac97ddd in __lll_lock_wait () from /lib64/libpthread.so.0
> #1  0x00002af58ac93bbc in _L_lock_839 () from /lib64/libpthread.so.0
> #2  0x00002af58ac93ad9 in pthread_mutex_lock () from /lib64/libpthread.so.0
> #3  0x00002af589e2383a in osl_acquireMutex (pMutex=0x9329b0) at sal/osl/unx/mutex.c:104
> #4  0x00002af598d577ec in vcl::SolarMutexObject::acquire (this=0x8dd120) at vcl/source/app/solarmutex.cxx:35
> #5  0x00002af599305c82 in SalYieldMutex::acquire (this=0x8dd120) at vcl/generic/app/geninst.cxx:49
> #6  0x00002af59e9bfb7b in framework::LockHelper::acquireReadAccess (this=0x2af5a2406088) at framework/source/fwi/threadhelp/lockhelper.cxx:150
> #7  0x00002af59ca29ccf in framework::ReadGuard::lock (this=0x2af5a4c894c0) at framework/inc/threadhelp/readguard.hxx:113
> #8  0x00002af59ca29c81 in framework::ReadGuard::ReadGuard (this=0x2af5a4c894c0, rLock=...) at framework/inc/threadhelp/readguard.hxx:79
> #9  0x00002af59cb52fce in (anonymous namespace)::Frame::getContainerWindow (this=0x2af5a2406010) at framework/source/services/frame.cxx:985
> #10 0x00002af5a32582d2 in tdoc_ucp::OfficeDocumentsManager::isWithoutOrInTopLevelFrame (this=0x2af5a24a1f18, xModel=uno::Reference to (dbaccess::ODatabaseDocument *) 0x2af5a4edc5a8) at ucb/source/ucp/tdoc/tdoc_docmgr.cxx:626
> #11 0x00002af5a325870f in tdoc_ucp::OfficeDocumentsManager::isOfficeDocument (this=0x2af5a24a1f18, xDoc=uno::Reference to (dbaccess::ODatabaseDocument *) 0x2af5a4edc558) at ucb/source/ucp/tdoc/tdoc_docmgr.cxx:697
> #12 0x00002af5a325651e in tdoc_ucp::OfficeDocumentsManager::notifyEvent (this=0x2af5a24a1f18, Event=...) at ucb/source/ucp/tdoc/tdoc_docmgr.cxx:305
> #13 0x00002af594251195 in cppu::OInterfaceContainerHelper::NotifySingleListener<com::sun::document::XEventListener, com::sun::document::EventObject>::operator() (this=0x2af5a4c89b20, listener=uno::Reference to (tdoc_ucp::OfficeDocumentsManager *) 0x2af5a24a1f40) at include/cppuhelper/interfacecontainer.h:262
> #14 0x00002af59425023e in cppu::OInterfaceContainerHelper::forEach<com::sun::document::XEventListener, cppu::OInterfaceContainerHelper::NotifySingleListener<com::sun::document::XEventListener, com::sun::document::EventObject> > (this=0x2af5a24a36a0, func=...) at include/cppuhelper/interfacecontainer.h:276
> #15 0x00002af59424f4da in cppu::OInterfaceContainerHelper::notifyEach<com::sun::document::XEventListener, com::sun::document::EventObject> (this=0x2af5a24a36a0, NotificationMethod=&virtual com::sun::document::XEventListener::notifyEvent(com::sun::document::EventObject const&), Event=...) at include/cppuhelper/interfacecontainer.h:289
> #16 0x00002af59424d864 in (anonymous namespace)::SfxGlobalEvents_Impl::implts_notifyListener (this=0x2af5a24a3628, aEvent=...) at sfx2/source/notify/globalevents.cxx:505
> #17 0x00002af59424c543 in (anonymous namespace)::SfxGlobalEvents_Impl::documentEventOccured (this=0x2af5a24a3628, _Event=...) at sfx2/source/notify/globalevents.cxx:315
> #18 0x00002af59016a5a5 in cppu::OInterfaceContainerHelper::NotifySingleListener<com::sun::document::XDocumentEventListener, com::sun::document::DocumentEvent>::operator() (this=0x2af5a4c89c90, listener=uno::Reference to ((anonymous namespace)::SfxGlobalEvents_Impl *) 0x2af5a24a3678) at include/cppuhelper/interfacecontainer.h:262
> #19 0x00002af59016a35e in cppu::OInterfaceContainerHelper::forEach<com::sun::document::XDocumentEventListener, cppu::OInterfaceContainerHelper::NotifySingleListener<com::sun::document::XDocumentEventListener, com::sun::document::DocumentEvent> > (this=0x11c0378, func=...) at include/cppuhelper/interfacecontainer.h:276
> #20 0x00002af590169ed6 in cppu::OInterfaceContainerHelper::notifyEach<com::sun::document::XDocumentEventListener, com::sun::document::DocumentEvent> (this=0x11c0378, NotificationMethod=&virtual com::sun::document::XDocumentEventListener::documentEventOccured(com::sun::document::DocumentEvent const&), Event=...) at include/cppuhelper/interfacecontainer.h:289
> #21 0x00002af5901690ed in dbaccess::DocumentEventNotifier_Impl::impl_notifyEvent_nothrow (this=0x11c0330, _rEvent=...) at dbaccess/source/core/dataaccess/documenteventnotifier.cxx:200
> #22 0x00002af5901693fa in dbaccess::DocumentEventNotifier_Impl::processEvent (this=0x11c0330, _rEvent=...) at dbaccess/source/core/dataaccess/documenteventnotifier.cxx:231
> #23 0x00002af58cba5de9 in comphelper::AsyncEventNotifier::execute (this=0x128c4e0) at comphelper/source/misc/asyncnotification.cxx:221
> #24 0x00002af58bcfe9c4 in salhelper::Thread::run (this=0x128c4e0) at salhelper/source/thread.cxx:40
> #25 0x00002af58bcfed8d in osl::threadFunc (param=0x128c4f0) at include/osl/thread.hxx:187
> #26 0x00002af589e2e2e7 in osl_thread_start_Impl (pData=0x128db40) at sal/osl/unx/thread.c:236
> #27 0x00002af58ac91c53 in start_thread () from /lib64/libpthread.so.0
> #28 0x00002af58a9bedbd in clone () from /lib64/libc.so.6

and

> Thread 1 (Thread 0x2af589931980 (LWP 7598)):
> #0  0x00002af58ac95565 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
> #1  0x00002af589e67146 in osl_waitCondition (Condition=0x11a22a0, pTimeout=0x0) at sal/osl/unx/conditn.cxx:275
> #2  0x00002af59e9c0866 in osl::Condition::wait (this=0x2af5a24060d0, pTimeout=0x0) at include/osl/conditn.hxx:82
> #3  0x00002af59e9c0bf5 in framework::Gate::wait (this=0x2af5a24060c0, pTimeOut=0x0) at framework/inc/threadhelp/gate.hxx:197
> #4  0x00002af59e9c0041 in framework::TransactionManager::setWorkingMode (this=0x2af5a24060b0, eMode=framework::E_BEFORECLOSE) at framework/source/fwi/threadhelp/transactionmanager.cxx:119
> #5  0x00002af59cb56c8f in (anonymous namespace)::Frame::dispose (this=0x2af5a2406010) at framework/source/services/frame.cxx:2229
> #6  0x00002af59cb55bec in (anonymous namespace)::Frame::close (this=0x2af5a2406010, bDeliverOwnership=0 '\000') at framework/source/services/frame.cxx:2002
> #7  0x00002af59010f9cc in dbaccess::ODatabaseDocument::impl_closeControllerFrames_nolck_throw (this=0x2af5a4edc538, _bDeliverOwnership=0 '\000') at dbaccess/source/core/dataaccess/databasedocument.cxx:1441
> #8  0x00002af59010fe24 in dbaccess::ODatabaseDocument::close (this=0x2af5a4edc538, _bDeliverOwnership=0 '\000') at dbaccess/source/core/dataaccess/databasedocument.cxx:1498
> #9  0x00002af58f6c59c6 in DialogSaveTest::test (this=0x922c10) at dbaccess/qa/extras/dialog-save.cxx:104
> #10 0x00002af58f6cc8d4 in CppUnit::TestCaller<DialogSaveTest>::runTest (this=0x879cc0) at workdir/UnpackedTarball/cppunit/include/cppunit/TestCaller.h:166
> #11 0x00002af589bb41b4 in CppUnit::TestCaseMethodFunctor::operator() (this=0x7fff58142f30) at TestCase.cpp:32
> #12 0x00002af58c8ab9e3 in (anonymous namespace)::Prot::protect (this=0x879da0, functor=...) at unotest/source/cpp/unobootstrapprotector/unobootstrapprotector.cxx:88
> #13 0x00002af589bac2ef in CppUnit::ProtectorChain::ProtectFunctor::operator() (this=0x922aa0) at ProtectorChain.cpp:20
> #14 0x00002af58b4b5536 in (anonymous namespace)::Prot::protect (this=0x879dc0, functor=..., context=...) at unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx:64
> #15 0x00002af589bac2ef in CppUnit::ProtectorChain::ProtectFunctor::operator() (this=0x922ca0) at ProtectorChain.cpp:20
> #16 0x00002af589b9dc64 in CppUnit::DefaultProtector::protect (this=0x8756a0, functor=..., context=...) at DefaultProtector.cpp:15
> #17 0x00002af589bac2ef in CppUnit::ProtectorChain::ProtectFunctor::operator() (this=0x922c70) at ProtectorChain.cpp:20
> #18 0x00002af589bac184 in CppUnit::ProtectorChain::protect (this=0x8753c0, functor=..., context=...) at ProtectorChain.cpp:77
> #19 0x00002af589bc339a in CppUnit::TestResult::protect (this=0x7fff58143450, functor=..., test=0x879cc0, shortDescription="") at TestResult.cpp:181
> #20 0x00002af589bb3c84 in CppUnit::TestCase::run (this=0x879cc0, result=0x7fff58143450) at TestCase.cpp:92
> #21 0x00002af589bb4a20 in CppUnit::TestComposite::doRunChildTests (this=0x922b50, controller=0x7fff58143450) at TestComposite.cpp:64
> #22 0x00002af589bb48aa in CppUnit::TestComposite::run (this=0x922b50, result=0x7fff58143450) at TestComposite.cpp:23
> #23 0x00002af589bb4a20 in CppUnit::TestComposite::doRunChildTests (this=0x922ad0, controller=0x7fff58143450) at TestComposite.cpp:64
> #24 0x00002af589bb48aa in CppUnit::TestComposite::run (this=0x922ad0, result=0x7fff58143450) at TestComposite.cpp:23
> #25 0x00002af589bca586 in CppUnit::TestRunner::WrappingSuite::run (this=0x879d30, result=0x7fff58143450) at TestRunner.cpp:47
> #26 0x00002af589bc30a4 in CppUnit::TestResult::runTest (this=0x7fff58143450, test=0x879d30) at TestResult.cpp:148
> #27 0x00002af589bca7e4 in CppUnit::TestRunner::run (this=0x7fff581432e0, controller=..., testPath="") at TestRunner.cpp:96
> #28 0x0000000000403ecf in (anonymous namespace)::ProtectedFixtureFunctor::run (this=0x7fff581433a0) at sal/cppunittester/cppunittester.cxx:150
> #29 0x0000000000404561 in sal_main () at sal/cppunittester/cppunittester.cxx:242
> #30 0x00000000004041a9 in main (argc=18, argv=0x7fff581436a8) at sal/cppunittester/cppunittester.cxx:166

and indeed UnoApiTest::setUp -> test::BootstrapFixture::setUp -> test_init_impl
-> InitVCL -> CreateSalInstance -> SalGenericInstance::AcquireYieldMutex causes
all such UnoApiTests to be run with the SolarMutex locked.

This reverts acdfb2593564ea23d4bbb999856922568d7ab2c3 "dbaccess: disable hanging
close() for now."

Change-Id: Ifac49da2c55b0b27b780a348074f69de86967aa1
2014-02-03 16:05:09 +01:00
acdfb25935 dbaccess: disable hanging close() for now
I don't know why it hangs, but seems even without closing, the test
still fails after reverting fc9080a0c60f263d00eb71111fcda72b3c0a2ebb
(fdo#67685 open xSourceLibrariesStor only when needed, 2013-08-02).

Once the test no longer hangs, of course feel free to add this back.

Change-Id: If124b7f57a8fa2d522ebdb448366aec6f1ff4987
2014-01-24 22:47:59 +01:00
62951cdd17 Introduce com.sun.star.frame.theGlobalEventBroadcaster singleton
...to supersede com.sun.star.frame.GlobalEventBroadcaster single-instance
service.

Change-Id: I74ecaadadb4c600d39979aa7c13b6389bed38fd7
2014-01-16 18:40:05 +01:00
1b85ffca7d factorise code; make DBTestBase a UnoApiTest
Change-Id: I29c131f60caa36c464d99b9b86a59e2e16ce94e3
2013-11-09 22:34:14 +01:00
7b9a9a4986 make firebird-sdbc an experimental feature
Change-Id: I0f2453e23d18597cfe1ad2a4cd4902b15f0a8f7d
2013-11-09 18:39:18 +01:00
f630c021ed nitpicks
Change-Id: I190a629a8c76f98b54295eebcf712b4c5b26ecff
2013-11-09 06:36:51 +01:00
a071a29d4f UnoApiTest don't require Calc
There is no reason for the generic UnoApiTest to require Calc
specifically. Calc tests can/should instantiate a Calc instance.
We can create a CalcUnoApiTest for that that inherits from
UnoApiTest; however this does not seem necessary, "make sc.clean"
succeeds.

Anyway, the ScGlobals::ensure mentioned in the comment does not
seem to exist.

This allows us to eliminate some code duplication in tests
that were reimplementing UnoApiTest minus the Calc instantiation.

Change-Id: I37bea9df41e3960df0458fe689cf6c046a243617
2013-11-09 06:36:45 +01:00
e937995ca3 dbaccess DialogSaveTest not a UnoApiTest
It overrides everything that UnoApiTest does anyway.

Change-Id: I531b2245626cbfd8d13a48a710d409e30ba2d20a
2013-11-09 06:35:56 +01:00
981b73c985 Add normal (non PreparedStatement) insert test.
Change-Id: I0f6220917d8a9e8ecce30acbabf8386e73372ed3
2013-09-27 18:09:18 +01:00
c058510595 Refactor performance test.
This is to allow for comparing the use of Prepared/Normal statements.

Change-Id: I6e120892f1c66f8b1c59bda309e88b2b7f39d230
2013-09-27 18:09:18 +01:00
7c87a5383a Implement firebird/hsqldb performance comparison test.
Change-Id: Iaf28b0fcb04ee713ccae6a593e56653eac6e2eba
2013-09-27 18:09:18 +01:00
2fe4dd1e8b Make our_sFilePath protected to allow reuse.
Change-Id: Id760cfd196bb25aa1d982efa0b2b47211680c77e
2013-09-27 18:09:18 +01:00
24320dca85 Implement hsqldb loading test.
Change-Id: I7dc6390b1061585054d1fa435414cae245122a1c
2013-09-27 18:09:18 +01:00
5063e39261 getURLFromWorkdir should actually return a URL
Change-Id: Id6d67f820226da15d90b95aa047767926583cc2e
2013-09-27 14:26:51 +02:00
a9a0933ec6 raah... getURLFromWorkdir does not put the URL scheme
Change-Id: I62162230b313c66872ef1b3e8b18070126169aa1
2013-09-27 13:07:44 +02:00
c24161acd6 get workdir URL directly
as opposed to buggily trying to build it ourselves from the path

Change-Id: Ibf44fac809a9cf12bc654a5a2f8ac8f00866b1a3
2013-09-27 12:52:42 +02:00
92c53b9d94 unittest for fdo#67685
Change-Id: I44500717109a026d7c71e6494daacbea1f224263
2013-09-27 11:38:08 +02:00
24f277a4ad Do not use int64 litteral without the proper wrapping
Change-Id: I879a47720f337b57038ac3207cb466aa42d0beeb
2013-09-12 20:37:54 -05:00
f7383e8b58 Split reusable parts of Firebird unit test into DBTestBase.
Change-Id: I6b2d131e0e4b53bb6b4cec69c5b0e99b8b9e74a7
2013-09-10 11:28:33 +01:00
3f114eb4a2 Implement firebird integer loading test.
This is mainly in order to determine whether the firebird ODS is safely
portable -- if testIntegerDatabase fails on non x64 / non Linux / non LE
platforms then this isn't the case.

Change-Id: I44eb7a774650cec27748b2058e9bb153f32742dc
2013-09-10 08:44:23 +01:00
65fc052b89 Add simple embedded firebird .odb loading test.
This opens an "empty" firebird-based .odb and tests that it is possible
for the firebird-sdbc driver to open the embedded database.

"empty" denotes that the .odb is marked as using embedded firebird
but doesn't in fact contain any .fdb file within. This is usual state
of a .odb directly after creation using the "New Database" dialog when
the sdbc driver first opens the database.

Change-Id: I83941c05b6328d8419dca49121988640c6f887bc
2013-09-10 08:44:23 +01:00
9a1aca007f fdo#57950: Remove some chained appends in dbaccess
Change-Id: If93b4a11ac15ede2b08ef42bb2fa4670f0d4cd24
Reviewed-on: https://gerrit.libreoffice.org/5481
Reviewed-by: Andrzej J.R. Hunt <andrzej@ahunt.org>
Tested-by: Andrzej J.R. Hunt <andrzej@ahunt.org>
2013-08-19 06:04:40 +00:00
6357299275 minor tweaks to existing unittests
Change-Id: I64769fee917c5d8c6450a19ad53fdf795e280c98
2013-08-03 21:00:41 +02:00
8bebd29976 Java cleanup, remove unnecessary @SuppressWarnings annotations
Change-Id: Ib5df091fc4a6233b526c44ae42dbdbacb0bef7c6
2013-05-06 11:45:58 +02:00
64e85a4cc8 Java cleanup, remove unused imports
Change-Id: I697017f196a7f7e5684011ae23941e54051c45dd
2013-04-26 08:29:38 +02:00
62badf3828 Move to MPLv2 license headers, with ESC decision and author's permission. 2013-04-22 09:37:38 +01:00