Commit Graph
235 Commits
Author SHA1 Message Date
Suraj Khurana a5619831eb Improved: Added missing Javadocs for remaining methods in framework component, this is required for all classes which looks like designed for extension (can be subclassed).
(OFBIZ-11947)
Thanks Jacques for review.
2020-09-13 11:28:00 +05:30
Suraj Khurana bc5e945ded Improved: Corrected line is longer than 150 characters checkstyle issues in framework component.
(OFBIZ-11921)
Also fixed some other extra space and naming related checkstyle issues observed.
Thanks Jacques for review.
2020-09-04 12:25:12 +05:30
Suraj Khurana f357b997c0 Improved: Corrected class names, method names, data members of class and variables names in framework component.
(OFBIZ-11926)
Also corrected some formatting and line length related checkstyle issues.
2020-08-26 21:40:40 +05:30
Suraj Khurana 9689201b84 Improved: Make data members of class as private and added accessor methods for the same, also corrected occurences of the same in framework component.
(OFBIZ-11963)
Also made some related checkstyle code enhancements.
Thanks jacques for finalizing Javadoc pattern during this effort.
2020-08-22 13:20:39 +05:30
Suraj Khurana 8c10d4ae72 Improved: Added missing Javadocs for some methods, this is required for all classes which looks like designed for extension (can be subclassed).
(OFBIZ-11947)
This is done for framework component. Also corrected some variables as per naming convention best practices.
Thanks Jacques for review.
2020-08-17 12:30:26 +05:30
Suraj Khurana 7d82b17c72 Improved: Corrected some line is longer than 150 characters checkstyle issues in framework component. Also fixed some extra spaces and naming conventions related checkstyle issues.
(OFBIZ-11921)
2020-08-03 10:11:40 +05:30
Suraj Khurana 8b1e0dbd85 Improved: Corrected all checkstyle formatting issues: 'typecast' is not followed by whitespace in framework component.
(OFBIZ-11887)
2020-07-18 12:26:42 +05:30
Suraj Khurana dd4da77d76 Improved: Corrected checkstyle formatting issues, 'is preceded/not preceded with whitespace' for framework component.
(OFBIZ-11874)
This fixes following checkstyle issues:
'{' is not preceded with whitespace.
'{' is not followed by whitespace.
'}' is not followed by whitespace.
'}' is not preceded with whitespace.
'typecast' is not followed by whitespace.
'try' is not followed by whitespace.
';' is preceded with whitespace.
2020-07-11 14:33:47 +05:30
Suraj Khurana fc6b8a6ca3 Improved: Corrected remaining ', is not followed by whitespace' checkstyle errors in framework component.
(OFBIZ-11805)
2020-07-07 15:08:17 +05:30
Suraj Khurana 4f53828bea Improved: Corrected all 'if is not followed by whitespace' checkstyle errors. Also corrected few ', is not followed by whitespace' checkstyle errors in framework component.
(OFBIZ-11805)
Thanks Jacques Le Roux and Ritesh Kumar for review.
2020-07-06 15:29:58 +05:30
Michael Brohl dfbcf595ca Fixed: Adds missing AJP connector property introduced for Tomcat 9.0.31
(OFBIZ-11848)
2020-07-03 17:34:47 +02:00
Suraj Khurana abc7836dde Improved: Made MODULE as private data member of class instead of public in all framework components.
(OFBIZ-11739)
This will reduce checkstlye issues. Thanks Jacques for review.
2020-05-29 13:20:46 +05:30
Jacques Le Roux df52f733b3 Improved: Update build.gradle to the latest dependencies
(OFBIZ-11603)

Checkstyle is a game where you can't never win.
And the result (formatting) is sometimes ugly, it's a pain!
2020-04-21 17:31:27 +02:00
Jacques Le Roux ef097c7a9a Improved: Update build.gradle to the latest dependencies
(OFBIZ-11603)

Replaces deprecated calls
2020-04-21 15:49:00 +02:00
Jacques Le Roux ddb8f4273a Improved: replaces module by MODULE everywhere 2020-04-05 19:46:34 +02:00
Michael Brohl f5a8479c46 Documented: Upgrades the documentation references in
catalina/ofbiz-component.xml to the 9.0 documentation.
2020-02-23 12:45:21 +01:00
Michael Brohl 0d623c077f Upgrade Tomcat from 9.0.29 to 9.0.31
(OFBIZ-11407)

Overriding the new default property secretRequired to be not required
and added the default property "secret" in the commented out section.
2020-02-23 12:23:43 +01:00
Mathieu Lirzin aae1c8a8f5 Reverted: "Improved: Use ‘depends-on’ attribute instead of “component-load.xml”"
(OFBIZ-11296)

This reverts commit eeabe69813.
2019-12-18 12:09:20 +01:00
Mathieu Lirzin df5dde37d5 Improved: Replace getLocation with location in ‘ComponentConfig.WebappInfo’
(OFBIZ-11192)

Use Path instead of String + File.
2019-12-08 00:12:52 +01:00
Samuel Trégouët e7bec48f16 Fixed: Use ‘WebAppUtil#parseWebXmlFile’ when handling “web.xml” files
(OFBIZ-6993)
2019-12-07 22:51:09 +01:00
Mathieu Lirzin eeabe69813 Improved: Use ‘depends-on’ attribute instead of “component-load.xml” (OFBIZ-11296)
We currently have two ways to define component loading order. Either
by using ‘depends-on’ attribute in “component-config.xml” or by adding
a “component-load.xml” file at the root of a component directory.

“depends-on” is more flexible because it handles partial ordering when
“component-load.xml” defines a total order which is not necessarily
meaningful, so it is better to rely only “depends-on”.

This removes the usage of “component-load.xml” to use ‘depends-on’
instead. The dependency declarations correspond to the total ordering
previously defined but will need to be refined in the future to relax
unnecessary dependency declarations.

Only “framework/base/config/component-load.xml” which defines the
top-level directories order (framework, applications, themes and
plugins) is kept.
2019-11-25 15:28:54 +01:00
Mathieu Lirzin 2c686c4655 Improved: Avoid unecessary breakage in ‘ContainerConfig’
(OFBIZ-11256)

This restores ‘public’ modifiers on fields and move the ‘Property’
inner class back to ‘Configuration’ to avoid breakage of client code
extending the ‘Container’ interface.

In order to smooth the transition towards using getters instead of
direct field accesss, the public modifiers on fields are now marked as
deprecated.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868628 13f79535-47bb-0310-9956-ffa450edef68
2019-10-19 14:27:01 +00:00
Mathieu Lirzin 7e7ccba7b3 Improved: Refactor ‘ContainerConfig’ class
(OFBIZ-11256)

This removes some code duplication, make things immutable and add some javadoc.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868601 13f79535-47bb-0310-9956-ffa450edef68
2019-10-18 19:46:32 +00:00
Mathieu Lirzin 60f7041c3d Improved: Use ‘Path’ for component config ‘rootLocation’ attribute
(OFBIZ-11192)

The method ‘ComponentConfig#getRootLocation’ has been removed
and replaced by ‘ComponentConfig#rootLocation’.

The callers have been adapted.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868028 13f79535-47bb-0310-9956-ffa450edef68
2019-10-05 16:20:32 +00:00
Mathieu Lirzin 16ee111ec3 Improved: Deprecate ‘ContainerConfig#getConfiguration(String, String)’
(OFBIZ-11100)

Since there is no global container configuration file anymore this
method should not be used.  It has been superseded by an overload
which do not require to pass the file name of the configuration file.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1863020 13f79535-47bb-0310-9956-ffa450edef68
2019-07-13 21:38:51 +00:00
Mathieu Lirzin ffe2e7ffdf Improved: Add missing ‘static’ modifier for private methods
(OFBIZ-11098)

In order to make it clear when a method is not depending on the
internal state of an object, it is a good practice to declare it as
static.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860937 13f79535-47bb-0310-9956-ffa450edef68
2019-06-10 12:27:40 +00:00
Michael Brohl 32c1ad1280 Fixed: Failed registration for virtual hosts with similar mount points
(OFBIZ-10765)

The default host is now retrieved using the API instead of simply
retrieving the 1st host through Tomcat.getHost().

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1858347 13f79535-47bb-0310-9956-ffa450edef68
2019-04-29 08:41:39 +00:00
Mathieu Lirzin b37e315aef Improved: Use the ‘@Override’ annotation
(OFBIZ-10939)

The ‘@Override’ annotation helps readers understand that the method at
hand is overriding a super class or implementing an interface.
Additionally it allows the compiler to check if the methods annotated
with ‘@Override’ are actually implementing an abstract method.

Using that annotation makes ‘@see foo.bar.ParentClass#myMethod’
comments useless, so those they have been removed for the newly
annotated methods.

Thanks Jacques Le Roux and Swapnil M Mane for acknowledging the commit.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1858295 13f79535-47bb-0310-9956-ffa450edef68
2019-04-27 19:34:25 +00:00
Mathieu Lirzin 5982be8161 Improved: Remove unnecessary declared exceptions for ‘ContainerException’
(OFBIZ-10938)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857913 13f79535-47bb-0310-9956-ffa450edef68
2019-04-21 14:22:36 +00:00
Deepak Dixit 7b9ea305d7 Preparation for JDK11 update, Updated following code to fix warning with respect to JDK11
- Replaced Class::newInstance occurrences 
- Removed deprecated override method Object::finalize
(OFBIZ-10757)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1854683 13f79535-47bb-0310-9956-ffa450edef68
2019-03-03 10:27:29 +00:00
Jacopo Cappellato 7fb91f15ef Implemented: Added ability to configure the embedded Tomcat instance to
communicate using the HTTP/2 protocol, when the client supports it.

With this commit HTTP/2 is enabled by default, by setting upgradeProtocol=true 
in the http and https connectors of Tomcat; however the connectors will continue 
to support HTTP/1.1 (the switch to HTTP/2 is negotiated with the client using 
the "HTTP Upgrade Protocol"); if the new "upgradeProtocol" property, introduced 
in this commit for this specific purpose, is not set (as it would be the case in 
custom configuration files) then the new protocol will not be enabled.

Additional Tomcat specific configuration options are available (see 
https://tomcat.apache.org/tomcat-9.0-doc/config/http2.html) but this commit 
doesn't implement the ability to set them (this is left to a future enhancement, 
if there will be a requirement to change the default values).


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1854532 13f79535-47bb-0310-9956-ffa450edef68
2019-02-28 15:12:20 +00:00
Michael Brohl 8f448f6b63 Fixed: Failed registration for virtual hosts with similar mount points
(OFBIZ-10765)

The name is now registered with the webbapp name prior to the context.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850953 13f79535-47bb-0310-9956-ffa450edef68
2019-01-10 16:07:02 +00:00
Jacques Le Roux 13f8b82f51 Improved: Replace Callable objects with lambda expressions
(OFBIZ-10488)

Since Java 8 it is possible to instantiate functional interfaces 
(interfaces with one non-static method) with lambda expressions instead 
of anonymous classes.

This replaces the creation of callable objects with lambda expressions.

Thanks: Mathieu Lirzin

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1848514 13f79535-47bb-0310-9956-ffa450edef68
2018-12-09 13:04:23 +00:00
Deepak Dixit 99220516cb Improved: Use application/javascript instead of text/javascript
(OFBIZ-10492)
Updated compressibleMimeType list and use application/javascript in place of text/javascript

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1836871 13f79535-47bb-0310-9956-ffa450edef68
2018-07-28 06:26:48 +00:00
Deepak Dixit 2f6618753c Fixed: compressableMimeType is not a valid attribute of apache http connector
(OFBIZ-10487)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1836144 13f79535-47bb-0310-9956-ffa450edef68
2018-07-18 06:42:10 +00:00
Jacques Le Roux 94ec9094c4 Improved: Add session tracking mode and make cookie secure
(OFBIZ-6655)

In CrossSubdomainSessionValve::replaceCookie sets HttpOnly if it was in replaced
cookie

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1832591 13f79535-47bb-0310-9956-ffa450edef68
2018-05-31 09:27:32 +00:00
Jacopo Cappellato 59f97f6549 Implemented: Upgraded to latest Tomcat (9.0.7).
(OFBIZ-10036)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1831074 13f79535-47bb-0310-9956-ffa450edef68
2018-05-07 06:41:47 +00:00
Jacques Le Roux dbc3c80b44 Improved: Use Tomcat default ciphers
(OFBIZ-10223)

Tomcat provides a default ciphers definition better to use it and let Tomcat 
handles that for us, we know Tomcat security is strong

Thanks: Paul Foxworthy for the help understanding the syntax :)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1824316 13f79535-47bb-0310-9956-ffa450edef68
2018-02-15 14:38:51 +00:00
Jacques Le Roux d3108a67e5 Fixed: Add WebSocket support in OFBiz
(OFBIZ-7073)

This was my bad at OFBIZ-7776

Thanks: Deepak for help on dev ML (good remembering)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1819811 13f79535-47bb-0310-9956-ffa450edef68
2018-01-02 12:22:17 +00:00
James Yong ba2e822f27 Implemented: Tomcat SSO
(OFBIZ-10047)

This allow developers the option to use Tomcat SSO, instead of externalLoginKey, for SSO.

Thanks: Jacques and Michael for the reviews

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1819133 13f79535-47bb-0310-9956-ffa450edef68
2017-12-23 10:39:44 +00:00
Jacques Le Roux 8cb1011755 No functional change, reverts changes that inadvertently slipped in with
r1818580

Thanks Michael for make me noticing it

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818595 13f79535-47bb-0310-9956-ffa450edef68
2017-12-18 17:39:29 +00:00
Jacques Le Roux 1b9094d4b2 Improved: Upgrade Jquery 1.11.0 to JQuery 3.2.1
(OFBIZ-9978)

Updates JGrowl  from 1.4.1 to 1.4.6

Thanks: Aditya

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818580 13f79535-47bb-0310-9956-ffa450edef68
2017-12-18 14:48:04 +00:00
Jacques Le Roux 19d46a232a Fixed: Prevent the possible return of the Robot attack
(OFBIZ-10085)

After reading https://robotattack.org/ and testing 
https://robotattack.org/check/?h=demo-trunk.ofbiz.apache.org which returned 
(same for stable and old)

    This host is not vulnerable. 
    However it still allows connections with the problematic RSA encryption 
    ciphers.

I concluded that we should remove RSA encryption ciphers from our Tomcat config.
See https://tomcat.apache.org/tomcat-8.5-doc/config/http.html

This removes RSA from ciphers and also sslProtocol which is now TLS by default

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818402 13f79535-47bb-0310-9956-ffa450edef68
2017-12-16 13:46:35 +00:00
Jacques Le Roux e0d2057456 Improved: Always check if debug verbose is on when using Debug.logVerbose()
(OFBIZ-10052)

We discussed on this point: http://markmail.org/message/mplvusuqn7oshl4v 
and we agreed about better doing a check when using Debug.logVerbose().

I checked there are 300+ cases like that. Since it's an easy S/R 
This implements it

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818005 13f79535-47bb-0310-9956-ffa450edef68
2017-12-13 12:43:05 +00:00
Michael Brohl 76622f323e Improved: General refactoring and code improvements, package
org.apache.ofbiz.catalina.container.
(OFBIZ-9871)

Thanks Dennis Balkir for reporting and providing the patches.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817749 13f79535-47bb-0310-9956-ffa450edef68
2017-12-11 07:49:49 +00:00
Jacques Le Roux 59f2542350 No functional security change,
Adds org.apache.catalina.connector.RECYCLE_FACADES=true
This is recommended by 
https://tomcat.apache.org/tomcat-8.5-doc/security-howto.html#System_Properties


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1812612 13f79535-47bb-0310-9956-ffa450edef68
2017-10-19 10:14:19 +00:00
Deepak Dixit 1620e4e0ca Improved: No functional change, Only added license header
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1812309 13f79535-47bb-0310-9956-ffa450edef68
2017-10-16 18:43:14 +00:00
Michael Brohl 05697cee3d Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.catalina.container.
(OFBIZ-9639)

Thanks Dennis Balkir for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1811432 13f79535-47bb-0310-9956-ffa450edef68
2017-10-07 14:49:16 +00:00
Jacques Le Roux 39e75f3a46 No functional change.
Clarifies in log when a weppabb is not mounted (overriding another)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1809747 13f79535-47bb-0310-9956-ffa450edef68
2017-09-26 13:29:10 +00:00
Jacques Le Roux bfd533ccc3 Improved: [DEPRECATION] Replace BigDecimal.ROUND_* by RoundingMode.*
(OFBIZ-9571)

No functional change.

We read at http://docs.oracle.com/javase/7/docs/api/java/math/BigDecimal.html : 
<<Using the integer fields in this class (such as ROUND_HALF_UP) to represent 
rounding mode is largely obsolete; the enumeration values of the RoundingMode 
enum, (such as RoundingMode.HALF_UP) should be used instead.>>

That's an easy global replacement. But it also needs to import the RoundingMode 
class. It was 26 files so I decided to rather clean all the imports in all files
 with the help of Eclipse.

This is a 1st step. I will need to closely look at 2 special class: UtilNumber
and Calculate.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804953 13f79535-47bb-0310-9956-ffa450edef68
2017-08-14 08:32:21 +00:00