Deploys nightly Demo and publishes nightly to sourceforge
Commits
Comparison is available only for releases created from the same branch as this release.
Author
Commit
Message
Commit date
teleivo <mrteleivo@gmail.com>
3a8da742cef130c997e1f430a8638d35f20192fb
Show ModuleFileParser allows empty conditionalResource elements
the ModuleFileParser currently allows
<conditionalResource>
</conditionalResource>
which leads to a ModuleConditionalResource which has no path and no
version. This also shows that the ModuleConditionalResource is flawed
since it only has a default constructor which leads to a state that
should not be allowed
Ivo Ulrich <teleivo@users.noreply.github.com>
f773bb911f806f9667ba3b7071796a096a09ee8f
Merge pull request #2644 from teleivo/TRUNK-5385 TRUNK-5385 Use try-with-resource and remove duplication in ModuleFileParser
teleivo <mrteleivo@gmail.com>
fcf28d56d0a9484bf57f78b381744994aea39660
TRUNK-5385 Fix ModuleFileParser test parsing GP without description
it does not get ignored
teleivo <mrteleivo@gmail.com>
d0822eb753009531d181ada9166ff9962f522a83
TRUNK-5385 Harmonize method parameter order
put Element first in extractModulesWithVersionAttribute as all other
methods which take more than one parameter with on of them of type Element
have it first
teleivo <mrteleivo@gmail.com>
2683d61b35c8f43441b6e67ff01ba9739b5e01a0
TRUNK-5385 Harmonize extractConditionalResource tests
move tests for extractConditionalResource into ModuleFileParserTest to
use same style of tests against the public methods instead of package
private one to prepare making it private
after refactorings where dependencies of ModuleFileParser will be put
into its constructor ModuleFileParser(MessageSourceService), the tests
can be written as BaseContextMockTests without use of a database
teleivo <mrteleivo@gmail.com>
9cf26f9713f85cf83fc1694c87bc0941ade268c8
TRUNK-5385 Move extractConditionalResources in call order
since its called after extractMandatory move it below it
teleivo <mrteleivo@gmail.com>
b9cdc8aac0354cd0690a125ed111e2565d98fe4e
TRUNK-5385 Rename rootNode to configRoot
to signal that the root is the root element of the module config which
might be obvious but its still easier to read and no need to always make
the mental connection
teleivo <mrteleivo@gmail.com>
26be20d520a603ffec8078166c90cf62dd253ff9
TRUNK-5385 Debug log global property with format string
teleivo <mrteleivo@gmail.com>
5552fb757d787c922e9fdb7678446caeb56b4558
TRUNK-5385 Harmonize method names extracting from xml
to be called extractGlobalProperties, extractConditionalResources
and group them together in createModule
teleivo <mrteleivo@gmail.com>
52c2c4fbc90cc694e2a20206d351a1f5dee4ba46
TRUNK-5385 Extract constants for module file extension
teleivo <mrteleivo@gmail.com>
c7f7c640e6e1e6980c3a6585d215c806ca69d2ad
TRUNK-5385 Extract createGlobalPropertyWithDatatype
to hide details of how the GP is created when datatypeClassname is not
empty
teleivo <mrteleivo@gmail.com>
32ccdb01e0a78549eaa403760e93ba9234f1d2d8
TRUNK-5385 Refactor extracting advice
using the same pattern
* reduce nesting with a guard clause
* rely on getElementsByTag which returns actual Element
we are looking for
* use helper getElementTrimmed to hide getting element, defaulting to
empty string if not present, trimming it
teleivo <mrteleivo@gmail.com>
412aff620af27b2c718671381bc75c5f17490428
TRUNK-5385 Rely on Element in getModuleToVersionMap
when using getElementsByTagName we know we get Element's and can thus
cast and simplify code because we know we only get 'modules' or 'module'
Element's
reduce nesting with a guard clause at the beginning of the method
teleivo <mrteleivo@gmail.com>
ee9d65eb57ba76dc172651a8c56269526da8b3ec
TRUNK-5385 Refactor extracting extension and privilege
using the same pattern
* reduce nesting with a guard clause
* rely on getElementsByTag which returns actual Element
we are looking for
* use helper getElementTrimmed to hide getting element, defaulting to
empty string if not present, trimming it
teleivo <mrteleivo@gmail.com>
3dce1b6be819e4b3753b4df8e29e676ecb92c3de
TRUNK-5385 Extract method for creating GlobalProperty
teleivo <mrteleivo@gmail.com>
32078b52337af9521071c9f8b56c5cb48e001969
TRUNK-5385 Rename getGlobalProperties
to extractGlobalProperties to separate it from a normal getter
teleivo <mrteleivo@gmail.com>
3c380e37c5ac4823d6317062a0201a922449bd97
TRUNK-5385 Use Element when extracting globalProperty
getElementsByTagName returns type Node but they are all Element's
since we look for <globalProperty>, thus cast to Element
this enables us to only get child Element's we need without the need to
loop through all Node's
teleivo <mrteleivo@gmail.com>
2157ed7290f965249b209a8d912de33305495cdf
TRUNK-5385 Make guard clause for empty property
this makes it easier to read that we exit if <globalProperty> doesnt
have a <property> child with a value
teleivo <mrteleivo@gmail.com>
176d80a33d49a0879dda378db1b0b387d4f7d37c
TRUNK-5385 Debug log globalProperty using format strings
no need to do string concatenation
teleivo <mrteleivo@gmail.com>
c31a88b0e3ed09dbdd18ed25f5b8e5916afba9e1
TRUNK-5385 Use junit ExpectedException in ModuleFileParserUnitTest
expecting on the substring of the exception messages links the test more
to its particular case. Since all 3 tests expect the same Exception it
would not surface if they test the same case, which already happened in
another class.
teleivo <mrteleivo@gmail.com>
18ae159d7f5b5cca0274ca578922d8bd06f48b8c
TRUNK-5385 Extract removeTabsAndTrim
so we can simply wrap the string returned from getElementTrimmed and
clean it from tabs. The returned string from getElementTrimmed is never
null so no need to check. also added test to assert we can handle it.
teleivo <mrteleivo@gmail.com>
907e5c939acbfa7cda2bc6253f37665d86967fda
TRUNK-5385 Remove nesting when reading globalProperties
teleivo <mrteleivo@gmail.com>
02eee464483404ccd24d055b366b56f7b64b9d87
TRUNK-5385 Test that globalProperty text nodes are ignored
teleivo <mrteleivo@gmail.com>
2dc4fef47acd113d5f1276436bd49ccb3618a710
TRUNK-5385 Extract extractGlobalProperty
for readability and further refactoring
teleivo <mrteleivo@gmail.com>
30850f4ee5d2bdc57865cd5de5022c240e4af10e
TRUNK-5385 Use try-with-resource in ModuleFileParser(InputStream)
to auto close the OutputStream where the InputStream is written to
and extract private methods to improve readability
teleivo <mrteleivo@gmail.com>
c01de3763eadb8eb88e3be85fe312de82ab64a0b
TRUNK-5385 Add test parsing invalid module config.xml
teleivo <mrteleivo@gmail.com>
883dbca33d01c705843a5d4b43f6f109e23c1aff
TRUNK-5385 Extract creation of module from document
method is concerned with creating an instance of Module
with values from the config xml Document
teleivo <mrteleivo@gmail.com>
f9e69f6468b3d669d221bb7520a3a2b2923a8f75
TRUNK-5385 Move creation of Module outside of config jar/stream logic
getting the jarfile, jarentry for config.xml and parsing the config
stream into an xml document is separate from creating the module from
the xml document thus move the creation below it
teleivo <mrteleivo@gmail.com>
75c0970e867987aebf388b8dfe1d8aefe77f453d
TRUNK-5385 Extract ensureNonEmptyName
so createModule simply reads as getXXXElementsContent and module.setXXX
if ones concerned with details, dig deeper into helper methods
TRUNK-5385 Remove unused parameters from ModuleFileParser's private methods
configVersion and jarFile were often not used in private methods
thus now removed
teleivo <mrteleivo@gmail.com>
d5ce10de6ac0b6f5fd412fa9e129703de42b171d
TRUNK-5385 Rearrange ModuleFileParser fields
and remove unnecessary set to null
teleivo <mrteleivo@gmail.com>
2800a1ca15090cc66bcd22f159a85537aecda8e1
TRUNK-5385 Extract constant for module config.xml filename
teleivo <mrteleivo@gmail.com>
c415bc53bd4bbea3da51221345137f8df76eb07b
TRUNK-5385 Remove duplication in getting an element or fail
extract duplicate code into method
teleivo <mrteleivo@gmail.com>
57bef02a04c8adbfcfae3cdfa9f2c45b2333f38c
TRUNK-5385 Extract validateConfigVersion method
to increase readability of method, we do not need to read the details of
it when just looking at the creation of an instance of Module
teleivo <mrteleivo@gmail.com>
2b18ed7d586215fc1588b150de242a0394b1a3dd
TRUNK-5385 Extract method getElementTrimmed
since its often done
teleivo <mrteleivo@gmail.com>
8a52e4caf5674db9e9be66c2eed89e612677c34b
TRUNK-5385 Use try-with-resource on config xml InputStream
move getting the inputstream of the config jarentry into a
try-with-resource block since the InputStream is autocloseable the
stream will be closed for us and the closing logic in the finally can be
removed
teleivo <mrteleivo@gmail.com>
a64d6f172c56656a579b58b34f6d3f0cb9792e68
TRUNK-5385 Rename configDoc to config
we know its a Document from its type
TRUNK-5385 Declare module when created
declare the variable when its used
teleivo <mrteleivo@gmail.com>
30563c00b1ad385cb1c28d2fd95134ad981d549e
TRUNK-5385 Extract newDocumentBuilder
to keep level of abstraction in parseConfigXmlStream
teleivo <mrteleivo@gmail.com>
ff81902c6797b298b9e358b37428e32f82a7a30a
TRUNK-5385 Extract getting the xml config document into helper
and rearrange private methods in call order for readability
teleivo <mrteleivo@gmail.com>
f512bcdd964e64ef4c8159e1880baea5c042f29b
TRUNK-5385 Extract parsing of stream to xml document
to reduce the method size and move the same level of abstraction into a
method, also a step to prepare the use of try-with-resource