Skip to content
Permalink
Browse files

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
  • Loading branch information
mthl committed Apr 27, 2019
1 parent 948d739 commit b37e315aef9d75d446ec981b04c38c347e87fa43
Showing with 925 additions and 249 deletions.
  1. +1 −0 applications/accounting/src/main/java/org/apache/ofbiz/accounting/payment/BillingAccountWorker.java
  2. +23 −0 applications/content/src/main/java/org/apache/ofbiz/content/content/ContentMapFacade.java
  3. +2 −0 applications/content/src/main/java/org/apache/ofbiz/content/ftp/SimpleFtpClient.java
  4. +2 −0 applications/content/src/main/java/org/apache/ofbiz/content/view/SimpleContentViewHandler.java
  5. +1 −0 applications/order/src/main/java/org/apache/ofbiz/order/order/OrderContentWrapper.java
  6. +1 −0 ...cations/order/src/main/java/org/apache/ofbiz/order/shoppingcart/product/ProductDisplayWorker.java
  7. +1 −0 applications/party/src/main/java/org/apache/ofbiz/party/content/PartyContentWrapper.java
  8. +1 −3 applications/product/src/main/java/org/apache/ofbiz/product/category/CatalogUrlSeoFilter.java
  9. +1 −0 applications/product/src/main/java/org/apache/ofbiz/product/category/CategoryContentWrapper.java
  10. +1 −3 applications/product/src/main/java/org/apache/ofbiz/product/category/ControlServlet.java
  11. +2 −3 applications/product/src/main/java/org/apache/ofbiz/product/category/SeoContextFilter.java
  12. +2 −3 applications/product/src/main/java/org/apache/ofbiz/product/category/SeoControlServlet.java
  13. +3 −0 ...ations/product/src/main/java/org/apache/ofbiz/product/category/ftl/CatalogAltUrlSeoTransform.java
  14. +3 −0 applications/product/src/main/java/org/apache/ofbiz/product/category/ftl/SeoTransform.java
  15. +3 −0 applications/product/src/main/java/org/apache/ofbiz/product/category/ftl/UrlRegexpTransform.java
  16. +1 −0 ...ations/workeffort/src/main/java/org/apache/ofbiz/workeffort/content/WorkEffortContentWrapper.java
  17. +1 −0 applications/workeffort/src/main/java/org/apache/ofbiz/workeffort/workeffort/ICalHandlerFactory.java
  18. +7 −0 framework/base/src/main/java/org/apache/ofbiz/base/component/ComponentResourceHandler.java
  19. +5 −0 framework/base/src/main/java/org/apache/ofbiz/base/concurrent/ConstantFuture.java
  20. +6 −0 framework/base/src/main/java/org/apache/ofbiz/base/concurrent/ExecutionPool.java
  21. +7 −0 framework/base/src/main/java/org/apache/ofbiz/base/config/MainResourceHandler.java
  22. +4 −6 framework/base/src/main/java/org/apache/ofbiz/base/container/ComponentContainer.java
  23. +4 −0 framework/base/src/main/java/org/apache/ofbiz/base/container/NamingServiceContainer.java
  24. +5 −0 framework/base/src/main/java/org/apache/ofbiz/base/conversion/AbstractConverter.java
  25. +2 −0 framework/base/src/main/java/org/apache/ofbiz/base/conversion/AbstractLocalizedConverter.java
  26. +5 −0 framework/base/src/main/java/org/apache/ofbiz/base/conversion/BooleanConverters.java
  27. +10 −0 framework/base/src/main/java/org/apache/ofbiz/base/conversion/CollectionConverters.java
  28. +6 −0 framework/base/src/main/java/org/apache/ofbiz/base/conversion/Converters.java
  29. +48 −0 framework/base/src/main/java/org/apache/ofbiz/base/conversion/DateTimeConverters.java
  30. +1 −0 framework/base/src/main/java/org/apache/ofbiz/base/conversion/GenericSingletonToList.java
  31. +1 −0 framework/base/src/main/java/org/apache/ofbiz/base/conversion/GenericSingletonToSet.java
  32. +5 −0 framework/base/src/main/java/org/apache/ofbiz/base/conversion/JSONConverters.java
  33. +26 −0 framework/base/src/main/java/org/apache/ofbiz/base/conversion/MiscConverters.java
  34. +9 −0 framework/base/src/main/java/org/apache/ofbiz/base/conversion/NetConverters.java
  35. +24 −0 framework/base/src/main/java/org/apache/ofbiz/base/conversion/NumberConverters.java
  36. +1 −0 framework/base/src/main/java/org/apache/ofbiz/base/conversion/test/MiscTests.java
  37. +2 −0 framework/base/src/main/java/org/apache/ofbiz/base/lang/ComparableRange.java
  38. +1 −0 framework/base/src/main/java/org/apache/ofbiz/base/location/ClasspathLocationResolver.java
  39. +1 −0 framework/base/src/main/java/org/apache/ofbiz/base/location/ComponentLocationResolver.java
  40. +1 −0 framework/base/src/main/java/org/apache/ofbiz/base/location/OFBizHomeLocationResolver.java
  41. +1 −0 framework/base/src/main/java/org/apache/ofbiz/base/location/StandardUrlLocationResolver.java
  42. +6 −0 framework/base/src/main/java/org/apache/ofbiz/base/util/AliasKeyManager.java
  43. +3 −0 framework/base/src/main/java/org/apache/ofbiz/base/util/MultiTrustManager.java
  44. +5 −0 framework/base/src/main/java/org/apache/ofbiz/base/util/SSLUtil.java
  45. +12 −0 framework/base/src/main/java/org/apache/ofbiz/base/util/ScriptUtil.java
  46. +1 −0 framework/base/src/main/java/org/apache/ofbiz/base/util/URLConnector.java
  47. +25 −0 framework/base/src/main/java/org/apache/ofbiz/base/util/UtilCodec.java
  48. +6 −0 framework/base/src/main/java/org/apache/ofbiz/base/util/UtilDateTime.java
  49. +2 −0 framework/base/src/main/java/org/apache/ofbiz/base/util/UtilProperties.java
  50. +4 −0 framework/base/src/main/java/org/apache/ofbiz/base/util/UtilXml.java
  51. +1 −0 framework/base/src/main/java/org/apache/ofbiz/base/util/cache/SoftRefCacheLine.java
  52. +3 −0 framework/base/src/main/java/org/apache/ofbiz/base/util/cache/test/UtilCacheTests.java
  53. +1 −0 framework/base/src/main/java/org/apache/ofbiz/base/util/collections/FlexibleMapAccessor.java
  54. +10 −0 framework/base/src/main/java/org/apache/ofbiz/base/util/collections/GenericMap.java
  55. +11 −0 framework/base/src/main/java/org/apache/ofbiz/base/util/collections/GenericMapCollection.java
  56. +3 −0 framework/base/src/main/java/org/apache/ofbiz/base/util/collections/GenericMapEntry.java
  57. +2 −0 framework/base/src/main/java/org/apache/ofbiz/base/util/collections/GenericMapEntrySet.java
  58. +1 −0 framework/base/src/main/java/org/apache/ofbiz/base/util/collections/GenericMapKeySet.java
  59. +2 −0 framework/base/src/main/java/org/apache/ofbiz/base/util/collections/GenericMapValues.java
  60. +3 −0 framework/base/src/main/java/org/apache/ofbiz/base/util/collections/IteratorWrapper.java
  61. +2 −3 framework/base/src/main/java/org/apache/ofbiz/base/util/collections/MapComparator.java
  62. +3 −0 framework/base/src/main/java/org/apache/ofbiz/base/util/collections/ReadOnlyMapEntry.java
  63. +24 −37 framework/base/src/main/java/org/apache/ofbiz/base/util/collections/ResourceBundleMapWrapper.java
  64. +4 −0 framework/base/src/main/java/org/apache/ofbiz/base/util/collections/test/GenericMapTest.java
  65. +1 −0 framework/base/src/main/java/org/apache/ofbiz/base/util/string/FlexibleStringExpander.java
  66. +1 −0 framework/base/src/main/java/org/apache/ofbiz/base/util/string/test/FlexibleStringExpanderTests.java
  67. +3 −0 framework/base/src/main/java/org/apache/ofbiz/base/util/test/ReferenceCleanerTests.java
  68. +1 −0 framework/base/src/main/java/org/apache/ofbiz/base/util/test/StringUtilTests.java
  69. +2 −0 framework/base/src/main/java/org/apache/ofbiz/base/util/test/UtilObjectTests.java
  70. +3 −0 framework/catalina/src/main/java/org/apache/ofbiz/catalina/container/CatalinaContainer.java
  71. +1 −0 framework/common/src/main/java/org/apache/ofbiz/common/authentication/AuthHelper.java
  72. +1 −0 framework/common/src/main/java/org/apache/ofbiz/common/authentication/AuthenticationComparator.java
  73. +9 −0 ...rk/common/src/main/java/org/apache/ofbiz/common/authentication/example/TestFailAuthenticator.java
  74. +8 −0 framework/common/src/main/java/org/apache/ofbiz/common/email/EmailServices.java
  75. +11 −0 framework/common/src/main/java/org/apache/ofbiz/common/scripting/ScriptHelperImpl.java
  76. +1 −0 framework/entity/src/main/java/org/apache/ofbiz/entity/DelegatorFactory.java
  77. +1 −0 framework/entity/src/main/java/org/apache/ofbiz/entity/DelegatorFactoryImpl.java
  78. +1 −6 framework/entity/src/main/java/org/apache/ofbiz/entity/GenericDelegator.java
  79. +15 −2 framework/entity/src/main/java/org/apache/ofbiz/entity/GenericEntity.java
  80. +7 −0 framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityConditionBuilder.java
  81. +4 −0 framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityFunction.java
  82. +1 −0 framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityOperator.java
  83. +1 −0 framework/entity/src/main/java/org/apache/ofbiz/entity/condition/OrderByItem.java
  84. +1 −0 framework/entity/src/main/java/org/apache/ofbiz/entity/condition/OrderByList.java
  85. +2 −0 framework/entity/src/main/java/org/apache/ofbiz/entity/connection/DBCPConnectionFactory.java
  86. +13 −0 framework/entity/src/main/java/org/apache/ofbiz/entity/datasource/GenericHelperDAO.java
  87. +13 −0 framework/entity/src/main/java/org/apache/ofbiz/entity/datasource/ReadOnlyHelperDAO.java
  88. +11 −0 framework/entity/src/main/java/org/apache/ofbiz/entity/finder/EntityFinderUtil.java
  89. +1 −0 framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/CursorConnection.java
  90. +1 −0 framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/CursorResultSet.java
  91. +1 −0 framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/CursorStatement.java
  92. +4 −0 framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/DatabaseUtil.java
  93. +1 −0 framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelEntity.java
  94. +6 −0 framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelViewEntity.java
  95. +20 −0 framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/DumbTransactionFactory.java
  96. +10 −31 framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/GenericXaResource.java
  97. +5 −6 framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/GeronimoTransactionFactory.java
  98. +5 −0 framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/JNDITransactionFactory.java
  99. +4 −0 framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/TransactionUtil.java
  100. +8 −0 framework/entity/src/main/java/org/apache/ofbiz/entity/util/Converters.java
  101. +10 −0 framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityListIterator.java
  102. +7 −0 framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntitySaxReader.java
  103. +6 −0 framework/entityext/src/main/java/org/apache/ofbiz/entityext/cache/EntityCacheServices.java
  104. +3 −0 framework/entityext/src/main/java/org/apache/ofbiz/entityext/eca/DelegatorEcaHandler.java
  105. +1 −0 framework/entityext/src/main/java/org/apache/ofbiz/entityext/eca/EntityEcaAction.java
  106. +24 −0 framework/entityext/src/main/java/org/apache/ofbiz/entityext/permission/EntityPermissionChecker.java
  107. +2 −0 framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/conditional/CompareCondition.java
  108. +2 −0 ...rk/minilang/src/main/java/org/apache/ofbiz/minilang/method/conditional/CompareFieldCondition.java
  109. +2 −0 framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/conditional/EmptyCondition.java
  110. +1 −0 ...k/minilang/src/main/java/org/apache/ofbiz/minilang/method/conditional/HasPermissionCondition.java
  111. +2 −0 framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/conditional/MasterIf.java
  112. +1 −0 .../minilang/src/main/java/org/apache/ofbiz/minilang/method/conditional/ValidateMethodCondition.java
  113. +4 −0 framework/security/src/main/java/org/apache/ofbiz/security/SecurityFactory.java
  114. +24 −42 framework/service/src/main/java/org/apache/ofbiz/service/GenericAbstractDispatcher.java
  115. +2 −6 framework/service/src/main/java/org/apache/ofbiz/service/GenericResultWaiter.java
  116. +6 −0 framework/service/src/main/java/org/apache/ofbiz/service/ModelService.java
  117. +1 −0 framework/service/src/main/java/org/apache/ofbiz/service/RunningService.java
  118. +1 −0 framework/service/src/main/java/org/apache/ofbiz/service/calendar/TemporalExpression.java
  119. +4 −12 framework/service/src/main/java/org/apache/ofbiz/service/engine/GenericAsyncEngine.java
  120. +7 −12 framework/service/src/main/java/org/apache/ofbiz/service/engine/InterfaceEngine.java
  121. +4 −8 framework/service/src/main/java/org/apache/ofbiz/service/jms/AbstractJmsListener.java
  122. +1 −0 framework/service/src/main/java/org/apache/ofbiz/service/jms/JmsListenerFactory.java
  123. +2 −0 framework/service/src/main/java/org/apache/ofbiz/service/jms/JmsQueueListener.java
  124. +4 −12 framework/service/src/main/java/org/apache/ofbiz/service/jms/JmsServiceEngine.java
  125. +2 −0 framework/service/src/main/java/org/apache/ofbiz/service/jms/JmsTopicListener.java
  126. +1 −0 framework/service/src/main/java/org/apache/ofbiz/service/job/JobPoller.java
  127. +1 −0 framework/service/src/main/java/org/apache/ofbiz/service/mail/MimeMessageWrapper.java
  128. +15 −0 framework/service/src/main/java/org/apache/ofbiz/service/rmi/RemoteDispatcherImpl.java
  129. +2 −0 framework/service/src/main/java/org/apache/ofbiz/service/rmi/RmiServiceContainer.java
  130. +1 −0 framework/service/src/main/java/org/apache/ofbiz/service/rmi/socket/ssl/SSLClientSocketFactory.java
  131. +1 −0 framework/service/src/main/java/org/apache/ofbiz/service/rmi/socket/ssl/SSLServerSocketFactory.java
  132. +1 −0 framework/service/src/main/java/org/apache/ofbiz/service/xmlrpc/AliasSupportedTransportFactory.java
  133. +7 −0 framework/testtools/src/main/java/org/apache/ofbiz/testtools/TestRunContainer.java
  134. +3 −9 framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ContextFilter.java
  135. +2 −0 framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ControlActivationEventListener.java
  136. +2 −0 framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ControlEventListener.java
  137. +2 −0 framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/LoginEventListener.java
  138. +1 −0 framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/FileUploadProgressListener.java
  139. +2 −0 framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/GroovyEventHandler.java
  140. +1 −0 framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/JSONRequestBodyMapHandler.java
  141. +2 −7 framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/JavaEventHandler.java
  142. +2 −4 framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/RomeEventHandler.java
  143. +2 −7 framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/SOAPEventHandler.java
  144. +2 −7 framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/ServiceEventHandler.java
  145. +2 −6 framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/ServiceMultiEventHandler.java
  146. +2 −7 framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/SimpleEventHandler.java
  147. +12 −4 framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/XmlRpcEventHandler.java
  148. +2 −0 framework/webapp/src/main/java/org/apache/ofbiz/webapp/ftl/FreeMarkerViewHandler.java
  149. +3 −0 framework/webapp/src/main/java/org/apache/ofbiz/webapp/ftl/LoopWriter.java
  150. +4 −0 framework/webapp/src/main/java/org/apache/ofbiz/webapp/ftl/OfbizCacheStorage.java
  151. +2 −0 framework/webapp/src/main/java/org/apache/ofbiz/webapp/view/AbstractViewHandler.java
  152. +1 −0 framework/webapp/src/main/java/org/apache/ofbiz/webapp/view/ApacheFopWorker.java
  153. +2 −0 framework/webapp/src/main/java/org/apache/ofbiz/webapp/view/HttpViewHandler.java
  154. +2 −0 framework/webapp/src/main/java/org/apache/ofbiz/webapp/view/JspViewHandler.java
  155. +1 −0 framework/webtools/src/main/java/org/apache/ofbiz/webtools/artifactinfo/ArtifactInfoBase.java
  156. +1 −0 framework/widget/src/main/java/org/apache/ofbiz/widget/model/AbstractModelCondition.java
  157. +1 −0 framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelGrid.java
  158. +2 −0 framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelScreenWidget.java
  159. +1 −0 framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelSingleForm.java
  160. +1 −0 framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelWidgetCondition.java
  161. +1 −0 framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/MenuWrapTransform.java
  162. +1 −0 framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/VisualTheme.java
  163. +58 −0 framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/fo/FoFormRenderer.java
  164. +8 −3 framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/html/HtmlMenuRenderer.java
  165. +7 −0 framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/html/HtmlTreeRenderer.java
  166. +58 −0 framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroFormRenderer.java
  167. +28 −0 framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroScreenRenderer.java
  168. +2 −0 framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroScreenViewHandler.java
  169. +7 −0 framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroTreeRenderer.java
@@ -209,6 +209,7 @@ public static BigDecimal availableToCapture(GenericValue billingAccount) throws

@SuppressWarnings("serial")
protected static class BillingAccountComparator implements Comparator<Map<String, Object>>, Serializable{
@Override
public int compare(Map<String, Object> billingAccount1, Map<String, Object> billingAccount2) {
return ((BigDecimal)billingAccount1.get("accountBalance")).compareTo((BigDecimal)billingAccount2.get("accountBalance"));
}
@@ -136,49 +136,60 @@ public void setIsDecorated(boolean isDecorated) {
}

// interface methods
@Override
public int size() {
return 1;
}

@Override
public boolean isEmpty() {
return false;
}

@Override
public boolean containsKey(Object object) {
return false;
}

@Override
public boolean containsValue(Object object) {
return false;
}

@Override
public Object put(Object name, Object value) {
Debug.logWarning("This [put()] method is not implemented in ContentMapFacade", module);
return null;
}

@Override
public Object remove(Object object) {
Debug.logWarning("This [remove()] method is not implemented in ContentMapFacade", module);
return null;
}

@Override
public void putAll(Map<?, ?> map) {
Debug.logWarning("This method [putAll()] is not implemented in ContentMapFacade", module);
}

@Override
public void clear() {
Debug.logWarning("This method [clear()] is not implemented in ContentMapFacade", module);
}

@Override
public Set<Object> keySet() {
return UtilGenerics.checkSet(mapKeySet);
}

@Override
public Collection<Object> values() {
Debug.logWarning("This method [values()] is not implemented in ContentMapFacade", module);
return null;
}

@Override
public Set<Map.Entry<Object, Object>> entrySet() {
Debug.logWarning("This method [entrySet()] is not implemented in ContentMapFacade", module);
return null;
@@ -215,6 +226,7 @@ public void setDecoratedContent(ContentMapFacade decoratedContent) {
}

// implemented get method
@Override
public Object get(Object obj) {
if (!(obj instanceof String)) {
Debug.logWarning("Key parameters must be a string", module);
@@ -354,50 +366,61 @@ public String toString() {
}

abstract class AbstractInfo implements Map<Object, Object> {
@Override
public int size() {
return 1;
}

@Override
public boolean isEmpty() {
return false;
}

@Override
public boolean containsKey(Object object) {
return false;
}

@Override
public boolean containsValue(Object object) {
return false;
}

@Override
public Object put(Object name, Object value) {
Debug.logWarning("This [put()] method is not implemented in ContentMapFacade.AbstractInfo", module);
return null;
}

@Override
public Object remove(Object object) {
Debug.logWarning("This [remove()] method is not implemented in ContentMapFacade.AbstractInfo", module);
return null;
}

@Override
public void putAll(Map<?, ?> map) {
Debug.logWarning("This method [putAll()] is not implemented in ContentMapFacade.AbstractInfo", module);
}

@Override
public void clear() {
Debug.logWarning("This method [clear()] is not implemented in ContentMapFacade.AbstractInfo", module);
}

@Override
public Set<Object> keySet() {
Debug.logWarning("This method [keySet()] is not implemented in ContentMapFacade.AbstractInfo", module);
return null;
}

@Override
public Collection<Object> values() {
Debug.logWarning("This method [values()] is not implemented in ContentMapFacade.AbstractInfo", module);
return null;
}

@Override
public Set<Map.Entry<Object, Object>> entrySet() {
Debug.logWarning("This method [entrySet()] is not implemented in ContentMapFacade.AbstractInfo", module);
return null;
@@ -72,6 +72,7 @@ public void connect(String hostname, String username, String password, Long port
return fileNames;
}

@Override
public void setBinaryTransfer(boolean isBinary) throws IOException {
if (isBinary) {
client.setFileType(FTP.BINARY_FILE_TYPE);
@@ -80,6 +81,7 @@ public void setBinaryTransfer(boolean isBinary) throws IOException {
}
}

@Override
public void setPassiveMode(boolean isPassive) {
if (isPassive) {
client.enterLocalPassiveMode();
@@ -57,13 +57,15 @@
private String rootDir = null;
private String https = null;

@Override
public void init(ServletContext context) throws ViewHandlerException {
rootDir = context.getRealPath("/");
https = (String) context.getAttribute("https");
}
/**
* @see org.apache.ofbiz.webapp.view.ViewHandler#render(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
*/
@Override
public void render(String name, String page, String info, String contentType, String encoding, HttpServletRequest request, HttpServletResponse response) throws ViewHandlerException {

LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher");
@@ -76,6 +76,7 @@ public OrderContentWrapper(GenericValue order, HttpServletRequest request) {
this.mimeTypeId = EntityUtilProperties.getPropertyValue("content", "defaultMimeType", "text/html; charset=utf-8", (Delegator) request.getAttribute("delegator"));
}

@Override
public StringUtil.StringWrapper get(String orderContentTypeId, String encoderType) {
return StringUtil.makeStringWrapper(getOrderContentAsText(order, orderContentTypeId, locale, mimeTypeId, order.getDelegator(), dispatcher, encoderType));
}
@@ -322,6 +322,7 @@ private ProductDisplayWorker() {}
this.descending = descending;
}

@Override
public int compare(java.lang.Object prod1, java.lang.Object prod2) {
int result = compareAsc((GenericEntity) prod1, (GenericEntity) prod2);

@@ -83,6 +83,7 @@ public String get(String contentTypeId, boolean useCache, String encoderType) {
return getPartyContentAsText(party, contentTypeId, locale, mimeTypeId, party.getDelegator(), dispatcher, useCache, encoderType);
}

@Override
public StringUtil.StringWrapper get(String contentTypeId, String encoderType) {
return StringUtil.makeStringWrapper(get(contentTypeId, true, encoderType));
}
@@ -40,9 +40,7 @@
protected String defaultLocaleString = null;
protected String redirectUrl = null;

/**
* @see javax.servlet.Filter#doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)
*/
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
HttpServletRequest httpRequest = (HttpServletRequest) request;
HttpServletResponse httpResponse = (HttpServletResponse) response;
@@ -79,6 +79,7 @@ public CategoryContentWrapper(GenericValue productCategory, HttpServletRequest r
this.mimeTypeId = EntityUtilProperties.getPropertyValue("content", "defaultMimeType", "text/html; charset=utf-8", (Delegator) request.getAttribute("delegator"));
}

@Override
public StringUtil.StringWrapper get(String prodCatContentTypeId, String encoderType) {
return StringUtil.makeStringWrapper(getProductCategoryContentAsText(productCategory, prodCatContentTypeId, locale, mimeTypeId, productCategory.getDelegator(), dispatcher, encoderType));
}
@@ -40,9 +40,7 @@ public ControlServlet() {
super();
}

/**
* @see javax.servlet.Servlet#init(javax.servlet.ServletConfig)
*/
@Override
public void init(ServletConfig config) throws ServletException {
super.init(config);

@@ -66,6 +66,7 @@
private String errorCode = "";
private List<String> allowedPathList = new ArrayList<>();

@Override
public void init(FilterConfig config) throws ServletException {
this.config = config;
allowedPaths = config.getInitParameter("allowedPaths");
@@ -89,9 +90,7 @@ public void init(FilterConfig config) throws ServletException {
}
}

/**
* @see javax.servlet.Filter#doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)
*/
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
HttpServletRequest httpRequest = (HttpServletRequest) request;
HttpServletResponse httpResponse = (HttpServletResponse) response;
@@ -50,9 +50,7 @@ public SeoControlServlet() {
super();
}

/**
* @see javax.servlet.Servlet#init(javax.servlet.ServletConfig)
*/
@Override
public void init(ServletConfig config) throws ServletException {
super.init(config);

@@ -72,6 +70,7 @@ public void init(ServletConfig config) throws ServletException {
SeoConfigUtil.init();
}

@Override
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String uri = URLEncoder.encode(request.getRequestURI(), "UTF-8");
if (request.getAttribute(REQUEST_IN_ALLOW_LIST) != null || request.getAttribute("_jsp_" + uri) != null) {
@@ -88,14 +88,17 @@ public Writer getWriter(Writer out, @SuppressWarnings("rawtypes") Map args)

return new Writer(out) {

@Override
public void write(char[] cbuf, int off, int len) throws IOException {
buf.append(cbuf, off, len);
}

@Override
public void flush() throws IOException {
out.flush();
}

@Override
public void close() throws IOException {
try {
Environment env = Environment.getCurrentEnvironment();
@@ -71,14 +71,17 @@ public Writer getWriter(Writer out, @SuppressWarnings("rawtypes") Map args) {

return new Writer(out) {

@Override
public void write(char cbuf[], int off, int len) {
buf.append(cbuf, off, len);
}

@Override
public void flush() throws IOException {
out.flush();
}

@Override
public void close() throws IOException {
try {
Environment env = Environment.getCurrentEnvironment();
@@ -71,14 +71,17 @@ public Writer getWriter(final Writer out, @SuppressWarnings("rawtypes") Map args

return new Writer(out) {

@Override
public void write(char cbuf[], int off, int len) {
buf.append(cbuf, off, len);
}

@Override
public void flush() throws IOException {
out.flush();
}

@Override
public void close() throws IOException {
try {
Environment env = Environment.getCurrentEnvironment();
@@ -86,6 +86,7 @@ public String get(String workEffortContentId, boolean useCache, String encoderTy
* @param contentTypeId Type of content to return
* @return String containing the content data
*/
@Override
public StringUtil.StringWrapper get(String contentTypeId, String encoderType) {
return StringUtil.makeStringWrapper(get(contentTypeId, true, encoderType));
}
@@ -59,6 +59,7 @@ public ICalHandlerFactory() {
handlerMap.put("UNLOCK", ICalHandlerFactory::doNothing);
}

@Override
public RequestHandler getHandler(String method) {
RequestHandler handler = handlerMap.get(method);
if (handler == null) {
@@ -59,14 +59,17 @@ public ComponentResourceHandler(String componentName, String loaderName, String
}
}

@Override
public String getLoaderName() {
return this.loaderName;
}

@Override
public String getLocation() {
return this.location;
}

@Override
public Document getDocument() throws GenericConfigException {
try {
return UtilXml.readXmlDocument(this.getStream(), this.getFullLocation(), true);
@@ -75,18 +78,22 @@ public Document getDocument() throws GenericConfigException {
}
}

@Override
public InputStream getStream() throws GenericConfigException {
return ComponentConfig.getStream(componentName, loaderName, location);
}

@Override
public URL getURL() throws GenericConfigException {
return ComponentConfig.getURL(componentName, loaderName, location);
}

@Override
public boolean isFileResource() throws GenericConfigException {
return ComponentConfig.isFileResourceLoader(componentName, loaderName);
}

@Override
public String getFullLocation() throws GenericConfigException {
return ComponentConfig.getFullLocation(componentName, loaderName, location);
}

0 comments on commit b37e315

Please sign in to comment.
You can’t perform that action at this time.