Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentTransform.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentTransform.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentTransform.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentTransform.java Sun Jul 5 10:01:19 2009 @@ -66,13 +66,16 @@ return new Writer(out) { + @Override public void write(char cbuf[], int off, int len) { } + @Override public void flush() throws IOException { out.flush(); } + @Override public void close() throws IOException { renderSubContent(); } Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentAsText.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentAsText.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentAsText.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentAsText.java Sun Jul 5 10:01:19 2009 @@ -126,13 +126,16 @@ return new Writer(out) { + @Override public void write(char cbuf[], int off, int len) { } + @Override public void flush() throws IOException { out.flush(); } + @Override public void close() throws IOException { List globalNodeTrail = (List)templateRoot.get("globalNodeTrail"); if (Debug.infoOn()) Debug.logInfo("Render close, globalNodeTrail(2a):" + ContentWorker.nodeTrailToCsv(globalNodeTrail), ""); Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentCacheTransform.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentCacheTransform.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentCacheTransform.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentCacheTransform.java Sun Jul 5 10:01:19 2009 @@ -126,13 +126,16 @@ return new Writer(out) { + @Override public void write(char cbuf[], int off, int len) { } + @Override public void flush() throws IOException { out.flush(); } + @Override public void close() throws IOException { List globalNodeTrail = (List)templateRoot.get("globalNodeTrail"); //if (Debug.infoOn()) Debug.logInfo("Render close, globalNodeTrail(2a):" + FreeMarkerWorker.nodeTrailToCsv(globalNodeTrail), ""); Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentTransform.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentTransform.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentTransform.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentTransform.java Sun Jul 5 10:01:19 2009 @@ -102,13 +102,16 @@ return new Writer(out) { + @Override public void write(char cbuf[], int off, int len) { } + @Override public void flush() throws IOException { out.flush(); } + @Override public void close() throws IOException { try { renderSubContent(); Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentCacheTransform.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentCacheTransform.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentCacheTransform.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentCacheTransform.java Sun Jul 5 10:01:19 2009 @@ -138,16 +138,19 @@ return new LoopWriter(out) { + @Override public void write(char cbuf[], int off, int len) { //StringBuilder ctxBuf = (StringBuilder) templateContext.get("buf"); //ctxBuf.append(cbuf, off, len); buf.append(cbuf, off, len); } + @Override public void flush() throws IOException { out.flush(); } + @Override public int onStart() throws TemplateModelException, IOException { //templateContext.put("buf", new StringBuilder()); List nodeTrail = null; @@ -200,6 +203,7 @@ } } + @Override public int afterBody() throws TemplateModelException, IOException { @@ -221,6 +225,7 @@ return TransformControl.END_EVALUATION; } + @Override public void close() throws IOException { FreeMarkerWorker.reloadValues(templateRoot, savedValuesUp, env); Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentTransform.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentTransform.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentTransform.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentTransform.java Sun Jul 5 10:01:19 2009 @@ -155,16 +155,19 @@ return new LoopWriter(out) { + @Override public void write(char cbuf[], int off, int len) { //StringBuilder ctxBuf = (StringBuilder) templateContext.get("buf"); //ctxBuf.append(cbuf, off, len); buf.append(cbuf, off, len); } + @Override public void flush() throws IOException { out.flush(); } + @Override public int onStart() throws TemplateModelException, IOException { //templateContext.put("buf", new StringBuilder()); List nodeTrail = FastList.newInstance(); @@ -201,6 +204,7 @@ } } + @Override public int afterBody() throws TemplateModelException, IOException { //out.write(buf.toString()); //buf.setLength(0); @@ -217,6 +221,7 @@ return TransformControl.END_EVALUATION; } + @Override public void close() throws IOException { String wrappedFTL = buf.toString(); Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/WrapSubContentCacheTransform.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/WrapSubContentCacheTransform.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/WrapSubContentCacheTransform.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/WrapSubContentCacheTransform.java Sun Jul 5 10:01:19 2009 @@ -137,14 +137,17 @@ 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 { FreeMarkerWorker.reloadValues(templateCtx, savedValues, env); //if (Debug.infoOn()) Debug.logInfo("in Wrap(2), savedValues ." + savedValues , module); Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderListState.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderListState.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderListState.java (original) +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderListState.java Sun Jul 5 10:01:19 2009 @@ -259,6 +259,7 @@ return orders; } + @Override public String toString() { StringBuilder buff = new StringBuilder("OrderListState:\n\t"); buff.append("viewIndex=").append(viewIndex).append(", viewSize=").append(viewSize).append("\n\t"); Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java (original) +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java Sun Jul 5 10:01:19 2009 @@ -471,6 +471,7 @@ } /** @deprecated */ + @Deprecated public GenericValue getShippingAddress() { try { GenericValue orderContactMech = EntityUtil.getFirst(orderHeader.getRelatedByAnd("OrderContactMech", UtilMisc.toMap( @@ -513,6 +514,7 @@ } /** @deprecated */ + @Deprecated public GenericValue getBillingAddress() { GenericValue billingAddress = null; try { Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductDisplayWorker.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductDisplayWorker.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductDisplayWorker.java (original) +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductDisplayWorker.java Sun Jul 5 10:01:19 2009 @@ -341,6 +341,7 @@ return ((Comparable) value).compareTo(value2); } + @Override public boolean equals(java.lang.Object obj) { if ((obj != null) && (obj instanceof ProductByMapComparator)) { ProductByMapComparator that = (ProductByMapComparator) obj; Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/test/PurchaseOrderTest.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/test/PurchaseOrderTest.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/applications/order/src/org/ofbiz/order/test/PurchaseOrderTest.java (original) +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/test/PurchaseOrderTest.java Sun Jul 5 10:01:19 2009 @@ -39,10 +39,12 @@ super(name); } + @Override protected void setUp() throws Exception { userLogin = delegator.findByPrimaryKey("UserLogin", UtilMisc.toMap("userLoginId", "system")); } + @Override protected void tearDown() throws Exception { } Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/test/SalesOrderTest.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/test/SalesOrderTest.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/applications/order/src/org/ofbiz/order/test/SalesOrderTest.java (original) +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/test/SalesOrderTest.java Sun Jul 5 10:01:19 2009 @@ -37,10 +37,12 @@ super(name); } + @Override protected void setUp() throws Exception { userLogin = delegator.findByPrimaryKey("UserLogin", UtilMisc.toMap("userLoginId", "system")); } + @Override protected void tearDown() throws Exception { } Modified: ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactMechWorker.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactMechWorker.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactMechWorker.java (original) +++ ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactMechWorker.java Sun Jul 5 10:01:19 2009 @@ -48,6 +48,7 @@ public static final String module = ContactMechWorker.class.getName(); /** @deprecated */ + @Deprecated public static void getPartyContactMechValueMaps(PageContext pageContext, String partyId, boolean showOld, String partyContactMechValueMapsAttr) { GenericDelegator delegator = (GenericDelegator) pageContext.getRequest().getAttribute("delegator"); List<Map<String, Object>> partyContactMechValueMaps = getPartyContactMechValueMaps(delegator, partyId, showOld); @@ -204,6 +205,7 @@ /** @deprecated */ + @Deprecated public static void getOrderContactMechValueMaps(PageContext pageContext, String orderId, String orderContactMechValueMapsAttr) { GenericDelegator delegator = (GenericDelegator) pageContext.getRequest().getAttribute("delegator"); List<Map<String, GenericValue>> maps = getOrderContactMechValueMaps(delegator, orderId); Modified: ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyWorker.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyWorker.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyWorker.java (original) +++ ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyWorker.java Sun Jul 5 10:01:19 2009 @@ -84,6 +84,7 @@ } /** @deprecated */ + @Deprecated public static void getPartyOtherValues(PageContext pageContext, String partyId, String partyAttr, String personAttr, String partyGroupAttr) { Map<String, GenericValue> partyMap = getPartyOtherValues(pageContext.getRequest(), partyId, partyAttr, personAttr, partyGroupAttr); for (Map.Entry<String, GenericValue> e: partyMap.entrySet()) { Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CatalogUrlServlet.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CatalogUrlServlet.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CatalogUrlServlet.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CatalogUrlServlet.java Sun Jul 5 10:01:19 2009 @@ -57,6 +57,7 @@ /** * @see javax.servlet.Servlet#init(javax.servlet.ServletConfig) */ + @Override public void init(ServletConfig config) throws ServletException { super.init(config); } @@ -64,6 +65,7 @@ /** * @see javax.servlet.http.HttpServlet#doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) */ + @Override public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doGet(request, response); } @@ -71,6 +73,7 @@ /** * @see javax.servlet.http.HttpServlet#doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) */ + @Override public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { GenericDelegator delegator = (GenericDelegator) getServletContext().getAttribute("delegator"); @@ -146,6 +149,7 @@ /** * @see javax.servlet.Servlet#destroy() */ + @Override public void destroy() { super.destroy(); } Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryWorker.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryWorker.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryWorker.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryWorker.java Sun Jul 5 10:01:19 2009 @@ -52,6 +52,7 @@ public static final String module = CategoryWorker.class.getName(); /** @deprecated */ + @Deprecated public static String getCatalogTopCategory(PageContext pageContext, String defaultTopCategory) { return getCatalogTopCategory(pageContext.getRequest(), defaultTopCategory); } @@ -84,6 +85,7 @@ } /** @deprecated */ + @Deprecated public static void getCategoriesWithNoParent(PageContext pageContext, String attributeName) { getCategoriesWithNoParent(pageContext.getRequest(), attributeName); } @@ -110,6 +112,7 @@ } /** @deprecated */ + @Deprecated public static void getRelatedCategories(PageContext pageContext, String attributeName, boolean limitView) { getRelatedCategories(pageContext.getRequest(), attributeName, limitView); } @@ -128,6 +131,7 @@ } /** @deprecated */ + @Deprecated public static void getRelatedCategories(PageContext pageContext, String attributeName, String parentId, boolean limitView) { getRelatedCategories(pageContext.getRequest(), attributeName, parentId, limitView); } @@ -144,6 +148,7 @@ } /** @deprecated */ + @Deprecated public static List<GenericValue> getRelatedCategoriesRet(PageContext pageContext, String attributeName, String parentId, boolean limitView) { return getRelatedCategoriesRet(pageContext.getRequest(), attributeName, parentId, limitView); } @@ -267,6 +272,7 @@ } /** @deprecated */ + @Deprecated public static void setTrail(PageContext pageContext, String currentCategory) { setTrail(pageContext.getRequest(), currentCategory); } @@ -349,6 +355,7 @@ } /** @deprecated */ + @Deprecated public static List<String> getTrail(PageContext pageContext) { return getTrail(pageContext.getRequest()); } @@ -360,6 +367,7 @@ } /** @deprecated */ + @Deprecated public static List<String> setTrail(PageContext pageContext, List<String> crumb) { return setTrail(pageContext.getRequest(), crumb); } @@ -371,6 +379,7 @@ } /** @deprecated */ + @Deprecated public static boolean checkTrailItem(PageContext pageContext, String category) { return checkTrailItem(pageContext.getRequest(), category); } @@ -386,6 +395,7 @@ } /** @deprecated */ + @Deprecated public static String lastTrailItem(PageContext pageContext) { return lastTrailItem(pageContext.getRequest()); } Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java Sun Jul 5 10:01:19 2009 @@ -202,6 +202,7 @@ return configId; } + @Override public boolean equals(Object obj) { if (!(obj instanceof ProductConfigWrapper)) { return false; @@ -223,6 +224,7 @@ return true; } + @Override public String toString() { return questions.toString(); } @@ -492,6 +494,7 @@ return null; } + @Override public boolean equals(Object obj) { if (obj == null || !(obj instanceof ConfigItem)) { return false; @@ -513,6 +516,7 @@ return true; } + @Override public String toString() { return configItem.getString("configItemId"); } @@ -740,6 +744,7 @@ return componentOptions; } + @Override public boolean equals(Object obj) { if (obj == null || !(obj instanceof ConfigOption)) { return false; @@ -752,6 +757,7 @@ return isSelected() == co.isSelected(); } + @Override public String toString() { return configOption.getString("configItemId") + "/" + configOption.getString("configOptionId") + (isSelected()? "*": ""); } Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductEvents.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductEvents.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductEvents.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductEvents.java Sun Jul 5 10:01:19 2009 @@ -37,7 +37,6 @@ import org.ofbiz.base.util.UtilDateTime; import org.ofbiz.base.util.UtilHttp; import org.ofbiz.base.util.UtilMisc; -import org.ofbiz.base.util.UtilParse; import org.ofbiz.base.util.UtilProperties; import org.ofbiz.base.util.UtilValidate; import org.ofbiz.entity.GenericDelegator; @@ -433,10 +432,10 @@ product.set("lastModifiedDate", nowTimestamp); product.setString("lastModifiedByUserLogin", userLogin.getString("userLoginId")); try { - product.set("productHeight", UtilParse.parseBigDecimalForEntity(request.getParameter("productHeight"))); - product.set("productWidth", UtilParse.parseBigDecimalForEntity(request.getParameter("productWidth"))); - product.set("productDepth", UtilParse.parseBigDecimalForEntity(request.getParameter("productDepth"))); - product.set("weight", UtilParse.parseBigDecimalForEntity(request.getParameter("weight"))); + product.set("productHeight", new BigDecimal(request.getParameter("productHeight"))); + product.set("productWidth", parseBigDecimalForEntity(request.getParameter("productWidth"))); + product.set("productDepth", parseBigDecimalForEntity(request.getParameter("productDepth"))); + product.set("weight", parseBigDecimalForEntity(request.getParameter("weight"))); // default unit settings for shipping parameters product.set("heightUomId", "LEN_in"); @@ -444,10 +443,10 @@ product.set("depthUomId", "LEN_in"); product.set("weightUomId", "WT_oz"); - BigDecimal floz = UtilParse.parseBigDecimalForEntity(request.getParameter("~floz")); - BigDecimal ml = UtilParse.parseBigDecimalForEntity(request.getParameter("~ml")); - BigDecimal ntwt = UtilParse.parseBigDecimalForEntity(request.getParameter("~ntwt")); - BigDecimal grams = UtilParse.parseBigDecimalForEntity(request.getParameter("~grams")); + BigDecimal floz = parseBigDecimalForEntity(request.getParameter("~floz")); + BigDecimal ml = parseBigDecimalForEntity(request.getParameter("~ml")); + BigDecimal ntwt = parseBigDecimalForEntity(request.getParameter("~ntwt")); + BigDecimal grams = parseBigDecimalForEntity(request.getParameter("~grams")); List<GenericValue> currentProductFeatureAndAppls = EntityUtil.filterByDate(delegator.findByAnd("ProductFeatureAndAppl", UtilMisc.toMap("productId", productId, "productFeatureApplTypeId", "STANDARD_FEATURE")), true); setOrCreateProdFeature(delegator, productId, currentProductFeatureAndAppls, "VLIQ_ozUS", "AMOUNT", floz); @@ -470,14 +469,14 @@ do { GenericValue product = delegator.findByPrimaryKey("Product", UtilMisc.toMap("productId", productId)); try { - product.set("productHeight", UtilParse.parseBigDecimalForEntity(request.getParameter("productHeight" + attribIdx))); - product.set("productWidth", UtilParse.parseBigDecimalForEntity(request.getParameter("productWidth" + attribIdx))); - product.set("productDepth", UtilParse.parseBigDecimalForEntity(request.getParameter("productDepth" + attribIdx))); - product.set("weight", UtilParse.parseBigDecimalForEntity(request.getParameter("weight" + attribIdx))); - BigDecimal floz = UtilParse.parseBigDecimalForEntity(request.getParameter("~floz" + attribIdx)); - BigDecimal ml = UtilParse.parseBigDecimalForEntity(request.getParameter("~ml" + attribIdx)); - BigDecimal ntwt = UtilParse.parseBigDecimalForEntity(request.getParameter("~ntwt" + attribIdx)); - BigDecimal grams = UtilParse.parseBigDecimalForEntity(request.getParameter("~grams" + attribIdx)); + product.set("productHeight", parseBigDecimalForEntity(request.getParameter("productHeight" + attribIdx))); + product.set("productWidth", parseBigDecimalForEntity(request.getParameter("productWidth" + attribIdx))); + product.set("productDepth", parseBigDecimalForEntity(request.getParameter("productDepth" + attribIdx))); + product.set("weight", parseBigDecimalForEntity(request.getParameter("weight" + attribIdx))); + BigDecimal floz = parseBigDecimalForEntity(request.getParameter("~floz" + attribIdx)); + BigDecimal ml = parseBigDecimalForEntity(request.getParameter("~ml" + attribIdx)); + BigDecimal ntwt = parseBigDecimalForEntity(request.getParameter("~ntwt" + attribIdx)); + BigDecimal grams = parseBigDecimalForEntity(request.getParameter("~grams" + attribIdx)); List<GenericValue> currentProductFeatureAndAppls = EntityUtil.filterByDate(delegator.findByAnd("ProductFeatureAndAppl", UtilMisc.toMap("productId", productId, "productFeatureApplTypeId", "STANDARD_FEATURE")), true); setOrCreateProdFeature(delegator, productId, currentProductFeatureAndAppls, "VLIQ_ozUS", "AMOUNT", floz); @@ -1041,12 +1040,7 @@ return "success"; } - /** - * Return nulls for empty strings, as the entity engine can deal with nulls. This will provide blanks - * in fields where doubles display. Blank meaning null, vs. 0 which means 0 - * @param doubleString - * @return a Double for the parsed value - */ + @Deprecated public static Double parseDoubleForEntity(String doubleString) throws NumberFormatException { if (doubleString == null) { return null; @@ -1058,4 +1052,23 @@ } return Double.valueOf(doubleString); } + + /** + * Return nulls for empty strings, as the entity engine can deal with nulls. This will provide blanks + * in fields where BigDecimal display. Blank meaning null, vs. 0 which means 0 + * @param bigDecimalString + * @return a BigDecimal for the parsed value + */ + public static BigDecimal parseBigDecimalForEntity(String bigDecimalString) throws NumberFormatException { + if (bigDecimalString == null) { + return null; + } + bigDecimalString = bigDecimalString.trim(); + bigDecimalString = bigDecimalString.replaceAll(",", ""); + if (bigDecimalString.length() < 1) { + return null; + } + return new BigDecimal(bigDecimalString); + } + } Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java Sun Jul 5 10:01:19 2009 @@ -829,6 +829,7 @@ this.productCategories = productCategories; } + @Override public void addConstraint(ProductSearchContext productSearchContext) { List<String> productCategoryIds = FastList.newInstance(); for (GenericValue category: productCategories) { @@ -854,6 +855,7 @@ } /** pretty print for log messages and even UI stuff */ + @Override public String prettyPrintConstraint(GenericDelegator delegator, boolean detailed, Locale locale) { GenericValue prodCatalog = null; try { @@ -869,6 +871,7 @@ return ppBuf.toString(); } + @Override public boolean equals(Object obj) { ProductSearchConstraint psc = (ProductSearchConstraint) obj; if (psc instanceof CatalogConstraint) { @@ -908,6 +911,7 @@ this.exclude = exclude; } + @Override public void addConstraint(ProductSearchContext productSearchContext) { Set<String> productCategoryIdSet = FastSet.newInstance(); if (includeSubCategories) { @@ -931,6 +935,7 @@ } /** pretty print for log messages and even UI stuff */ + @Override public String prettyPrintConstraint(GenericDelegator delegator, boolean detailed, Locale locale) { GenericValue productCategory = null; try { @@ -958,6 +963,7 @@ return ppBuf.toString(); } + @Override public boolean equals(Object obj) { ProductSearchConstraint psc = (ProductSearchConstraint) obj; if (psc instanceof CategoryConstraint) { @@ -997,6 +1003,7 @@ this.exclude = exclude; } + @Override public void addConstraint(ProductSearchContext productSearchContext) { // just add to global sets if (exclude == null) { @@ -1011,6 +1018,7 @@ productSearchContext.productSearchConstraintList.add(productSearchContext.getDelegator().makeValue("ProductSearchConstraint", UtilMisc.toMap("constraintName", constraintName, "infoString", this.productFeatureId))); } + @Override public String prettyPrintConstraint(GenericDelegator delegator, boolean detailed, Locale locale) { GenericValue productFeature = null; GenericValue productFeatureType = null; @@ -1039,6 +1047,7 @@ return (ppBuf.toString()); } + @Override public boolean equals(Object obj) { ProductSearchConstraint psc = (ProductSearchConstraint) obj; if (psc instanceof FeatureConstraint) { @@ -1076,6 +1085,7 @@ this.exclude = exclude; } + @Override public void addConstraint(ProductSearchContext productSearchContext) { // just add to global sets if (exclude == null) { @@ -1090,6 +1100,7 @@ productSearchContext.productSearchConstraintList.add(productSearchContext.getDelegator().makeValue("ProductSearchConstraint", UtilMisc.toMap("constraintName", constraintName, "infoString", this.productFeatureCategoryId))); } + @Override public String prettyPrintConstraint(GenericDelegator delegator, boolean detailed, Locale locale) { GenericValue productFeatureCategory = null; try { @@ -1117,6 +1128,7 @@ return (ppBuf.toString()); } + @Override public boolean equals(Object obj) { ProductSearchConstraint psc = (ProductSearchConstraint) obj; if (psc instanceof FeatureCategoryConstraint) { @@ -1153,6 +1165,7 @@ this.exclude = exclude; } + @Override public void addConstraint(ProductSearchContext productSearchContext) { // just add to global sets if (exclude == null) { @@ -1167,6 +1180,7 @@ productSearchContext.productSearchConstraintList.add(productSearchContext.getDelegator().makeValue("ProductSearchConstraint", UtilMisc.toMap("constraintName", constraintName, "infoString", this.productFeatureGroupId))); } + @Override public String prettyPrintConstraint(GenericDelegator delegator, boolean detailed, Locale locale) { GenericValue productFeatureGroup = null; try { @@ -1193,6 +1207,7 @@ return (ppBuf.toString()); } + @Override public boolean equals(Object obj) { ProductSearchConstraint psc = (ProductSearchConstraint) obj; if (psc instanceof FeatureGroupConstraint) { @@ -1231,6 +1246,7 @@ this.exclude = exclude; } + @Override public void addConstraint(ProductSearchContext productSearchContext) { // just add to global sets if (exclude == null) { @@ -1253,6 +1269,7 @@ productSearchContext.productSearchConstraintList.add(productSearchContext.getDelegator().makeValue("ProductSearchConstraint", UtilMisc.toMap("constraintName", constraintName, "infoString", featureIdInfo.toString()))); } + @Override public String prettyPrintConstraint(GenericDelegator delegator, boolean detailed, Locale locale) { StringBuilder infoOut = new StringBuilder(); try { @@ -1284,6 +1301,7 @@ return infoOut.toString(); } + @Override public boolean equals(Object obj) { ProductSearchConstraint psc = (ProductSearchConstraint) obj; if (psc instanceof FeatureConstraint) { @@ -1341,6 +1359,7 @@ return fullKeywordSet; } + @Override public void addConstraint(ProductSearchContext productSearchContext) { // just make the fixed keyword lists and put them in the context if (isAnd) { @@ -1381,6 +1400,7 @@ } /** pretty print for log messages and even UI stuff */ + @Override public String prettyPrintConstraint(GenericDelegator delegator, boolean detailed, Locale locale) { StringBuilder ppBuf = new StringBuilder(); ppBuf.append(UtilProperties.getMessage(resource, "ProductKeywords", locale)).append(": \""); @@ -1389,6 +1409,7 @@ return ppBuf.toString(); } + @Override public boolean equals(Object obj) { ProductSearchConstraint psc = (ProductSearchConstraint) obj; if (psc instanceof KeywordConstraint) { @@ -1431,16 +1452,19 @@ this.thruDate = thruDate; } + @Override public void addConstraint(ProductSearchContext productSearchContext) { // TODO: implement LastUpdatedRangeConstraint makeEntityCondition } /** pretty print for log messages and even UI stuff */ + @Override public String prettyPrintConstraint(GenericDelegator delegator, boolean detailed, Locale locale) { // TODO: implement the pretty print for log messages and even UI stuff return null; } + @Override public boolean equals(Object obj) { ProductSearchConstraint psc = (ProductSearchConstraint) obj; if (psc instanceof LastUpdatedRangeConstraint) { @@ -1482,6 +1506,7 @@ this.currencyUomId = currencyUomId; } + @Override public void addConstraint(ProductSearchContext context) { String entityAlias = "PSPP" + context.index; String prefix = "PSPP" + context.index; @@ -1504,6 +1529,7 @@ context.entityConditionList.add(EntityCondition.makeCondition(prefix + "FromDate", EntityOperator.LESS_THAN, context.nowTimestamp)); } + @Override public String prettyPrintConstraint(GenericDelegator delegator, boolean detailed, Locale locale) { StringBuilder buff = new StringBuilder(); buff.append("Product Store Mandatory Price Constraint: "); @@ -1513,6 +1539,7 @@ return buff.toString(); } + @Override public boolean equals(Object o) { if (o instanceof StoreGroupPriceConstraint) { StoreGroupPriceConstraint other = (StoreGroupPriceConstraint) o; @@ -1538,6 +1565,7 @@ this.currencyUomId = UtilValidate.isNotEmpty(currencyUomId) ? currencyUomId : "USD"; } + @Override public void addConstraint(ProductSearchContext productSearchContext) { // make index based values and increment String entityAlias = "PP" + productSearchContext.index; @@ -1574,6 +1602,7 @@ UtilMisc.toMap("constraintName", constraintName, "infoString", "low [" + this.lowPrice + "] high [" + this.highPrice + "] currency [" + this.currencyUomId + "]"))); } + @Override public String prettyPrintConstraint(GenericDelegator delegator, boolean detailed, Locale locale) { if (this.lowPrice == null && this.highPrice == null) { // dummy constraint, no values @@ -1600,6 +1629,7 @@ return msgBuf.toString(); } + @Override public boolean equals(Object obj) { ProductSearchConstraint psc = (ProductSearchConstraint) obj; if (psc instanceof ListPriceRangeConstraint) { @@ -1637,6 +1667,7 @@ this.supplierPartyId = supplierPartyId; } + @Override public void addConstraint(ProductSearchContext productSearchContext) { // make index based values and increment String entityAlias = "SP" + productSearchContext.index; @@ -1652,10 +1683,12 @@ productSearchContext.productSearchConstraintList.add(productSearchContext.getDelegator().makeValue("ProductSearchConstraint", UtilMisc.toMap("constraintName", constraintName, "infoString", this.supplierPartyId))); } + @Override public String prettyPrintConstraint(GenericDelegator delegator, boolean detailed, Locale locale) { return UtilProperties.getMessage(resource, "ProductSupplier", locale)+": " + PartyHelper.getPartyName(delegator, supplierPartyId, false); } + @Override public boolean equals(Object obj) { ProductSearchConstraint psc = (ProductSearchConstraint) obj; if (psc instanceof SupplierConstraint) { @@ -1682,6 +1715,7 @@ public ExcludeVariantsConstraint() { } + @Override public void addConstraint(ProductSearchContext productSearchContext) { productSearchContext.dynamicViewEntity.addAlias("PROD", "prodIsVariant", "isVariant", null, null, null, null); productSearchContext.entityConditionList.add(EntityCondition.makeCondition("prodIsVariant", EntityOperator.NOT_EQUAL, "Y")); @@ -1690,10 +1724,12 @@ productSearchContext.productSearchConstraintList.add(productSearchContext.getDelegator().makeValue("ProductSearchConstraint", UtilMisc.toMap("constraintName", constraintName, "infoString", ""))); } + @Override public String prettyPrintConstraint(GenericDelegator delegator, boolean detailed, Locale locale) { return UtilProperties.getMessage(resource, "ProductExcludeVariants", locale); } + @Override public boolean equals(Object obj) { ProductSearchConstraint psc = (ProductSearchConstraint) obj; if (psc instanceof ExcludeVariantsConstraint) { @@ -1710,6 +1746,7 @@ public AvailabilityDateConstraint() { } + @Override public void addConstraint(ProductSearchContext productSearchContext) { productSearchContext.dynamicViewEntity.addAlias("PROD", "prodIntroductionDate", "introductionDate", null, null, null, null); productSearchContext.entityConditionList.add(EntityCondition.makeCondition(EntityCondition.makeCondition("prodIntroductionDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition("prodIntroductionDate", EntityOperator.LESS_THAN_EQUAL_TO, productSearchContext.nowTimestamp))); @@ -1718,10 +1755,12 @@ productSearchContext.productSearchConstraintList.add(productSearchContext.getDelegator().makeValue("ProductSearchConstraint", UtilMisc.toMap("constraintName", constraintName, "infoString", ""))); } + @Override public String prettyPrintConstraint(GenericDelegator delegator, boolean detailed, Locale locale) { return UtilProperties.getMessage(resource, "ProductFilterByAvailabilityDates", locale); } + @Override public boolean equals(Object obj) { ProductSearchConstraint psc = (ProductSearchConstraint) obj; if (psc instanceof AvailabilityDateConstraint) { @@ -1744,6 +1783,7 @@ this.include = include; } + @Override public void addConstraint(ProductSearchContext productSearchContext) { if (UtilValidate.isNotEmpty(goodIdentificationTypeId) || UtilValidate.isNotEmpty(goodIdentificationValue) || @@ -1780,6 +1820,7 @@ } } + @Override public String prettyPrintConstraint(GenericDelegator delegator, boolean detailed, Locale locale) { if (UtilValidate.isEmpty(goodIdentificationTypeId) && UtilValidate.isEmpty(goodIdentificationValue) && @@ -1812,6 +1853,7 @@ return msgBuf.toString(); } + @Override public boolean equals(Object obj) { ProductSearchConstraint psc = (ProductSearchConstraint) obj; if (psc instanceof GoodIdentificationConstraint) { @@ -1840,6 +1882,7 @@ public SortKeywordRelevancy() { } + @Override public void setSortOrder(ProductSearchContext productSearchContext) { if (productSearchContext.includedKeywordSearch) { // we have to check this in order to be sure that there is a totalRelevancy to sort by... @@ -1848,14 +1891,17 @@ } } + @Override public String getOrderName() { return "KeywordRelevancy"; } + @Override public String prettyPrintSortOrder(boolean detailed, Locale locale) { return UtilProperties.getMessage(resource, "ProductKeywordRelevancy", locale); } + @Override public boolean isAscending() { return false; } @@ -1877,6 +1923,7 @@ this.ascending = ascending; } + @Override public void setSortOrder(ProductSearchContext productSearchContext) { if (productSearchContext.getDelegator().getModelEntity("Product").isField(fieldName)) { productSearchContext.dynamicViewEntity.addAlias("PROD", fieldName); @@ -1891,10 +1938,12 @@ productSearchContext.fieldsToSelect.add(fieldName); } + @Override public String getOrderName() { return "ProductField:" + this.fieldName; } + @Override public String prettyPrintSortOrder(boolean detailed, Locale locale) { if ("productName".equals(this.fieldName)) { return UtilProperties.getMessage(resource, "ProductProductName", locale); @@ -1908,6 +1957,7 @@ return this.fieldName; } + @Override public boolean isAscending() { return this.ascending; } @@ -1931,6 +1981,7 @@ this.ascending = ascending; } + @Override public void setSortOrder(ProductSearchContext productSearchContext) { if (this.currencyUomId == null) { this.currencyUomId = UtilProperties.getPropertyValue("general", "currency.uom.id.default", "USD"); @@ -1965,10 +2016,12 @@ productSearchContext.fieldsToSelect.add("sortPrice"); } + @Override public String getOrderName() { return "ProductPrice:" + productPriceTypeId; } + @Override public String prettyPrintSortOrder(boolean detailed, Locale locale) { String priceTypeName = null; if ("LIST_PRICE".equals(this.productPriceTypeId)) { @@ -1990,6 +2043,7 @@ return priceTypeName; } + @Override public boolean isAscending() { return this.ascending; } Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java Sun Jul 5 10:01:19 2009 @@ -964,10 +964,9 @@ /* scale Image in different sizes */ String viewNumber = String.valueOf(productContentTypeId.charAt(productContentTypeId.length() - 1)); - ScaleImage imageTransform = new ScaleImage(); Map<String, Object> resultResize = FastMap.newInstance(); try { - resultResize.putAll(imageTransform.scaleImageInAllSize(context, filenameToUse, "additional", viewNumber)); + resultResize.putAll(ScaleImage.scaleImageInAllSize(context, filenameToUse, "additional", viewNumber)); } catch (IOException e) { String errMsg = "Scale additional image in all different sizes is impossible : " + e.toString(); Debug.logError(e, errMsg, module); Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java Sun Jul 5 10:01:19 2009 @@ -60,6 +60,7 @@ public static final MathContext generalRounding = new MathContext(10); /** @deprecated */ + @Deprecated public static void getProduct(PageContext pageContext, String attributeName) { getProduct(pageContext, attributeName, null); } @@ -150,6 +151,7 @@ } /** @deprecated */ + @Deprecated public static void getProduct(PageContext pageContext, String attributeName, String productId) { GenericDelegator delegator = (GenericDelegator) pageContext.getRequest().getAttribute("delegator"); ServletRequest request = pageContext.getRequest(); @@ -291,6 +293,7 @@ } /** @deprecated */ + @Deprecated public static void getAssociatedProducts(PageContext pageContext, String productAttributeName, String assocPrefix) { GenericValue product = (GenericValue) pageContext.getAttribute(productAttributeName); Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/subscription/SubscriptionServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/subscription/SubscriptionServices.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/product/subscription/SubscriptionServices.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/product/subscription/SubscriptionServices.java Sun Jul 5 10:01:19 2009 @@ -119,7 +119,8 @@ calendar.add(times[0], (useTime.intValue() * times[1])); } else { Debug.logWarning("Don't know anything about useTimeUomId [" + useTimeUomId + "], defaulting to month", module); - calendar.add(Calendar.MONTH, (useTime.intValue() * times[1])); + // FIXME: times[] can only be null here + //calendar.add(Calendar.MONTH, (useTime.intValue() * times[1])); } thruDate = new Timestamp(calendar.getTimeInMillis()); Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/test/InventoryItemTransferTest.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/test/InventoryItemTransferTest.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/product/test/InventoryItemTransferTest.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/product/test/InventoryItemTransferTest.java Sun Jul 5 10:01:19 2009 @@ -39,10 +39,12 @@ super(name); } + @Override protected void setUp() throws Exception { userLogin = delegator.findByPrimaryKey("UserLogin", UtilMisc.toMap("userLoginId", "system")); } + @Override protected void tearDown() throws Exception { } Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/test/StockMovesTest.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/test/StockMovesTest.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/product/test/StockMovesTest.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/product/test/StockMovesTest.java Sun Jul 5 10:01:19 2009 @@ -41,10 +41,12 @@ super(name); } + @Override protected void setUp() throws Exception { userLogin = delegator.findByPrimaryKey("UserLogin", UtilMisc.toMap("userLoginId", "system")); } + @Override protected void tearDown() throws Exception { } Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java Sun Jul 5 10:01:19 2009 @@ -1006,10 +1006,12 @@ return quantity; } + @Override public Set entrySet() { return null; } + @Override public Object get(Object name) { if ("orderItem".equals(name.toString())) { return orderItem; @@ -1021,6 +1023,7 @@ return null; } + @Override public boolean equals(Object o) { if (o instanceof ItemDisplay) { ItemDisplay d = (ItemDisplay) o; Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsMockApiServlet.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsMockApiServlet.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsMockApiServlet.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsMockApiServlet.java Sun Jul 5 10:01:19 2009 @@ -31,13 +31,12 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.xml.parsers.ParserConfigurationException; +import javax.xml.transform.TransformerException; import org.ofbiz.base.util.UtilValidate; import org.ofbiz.base.util.UtilXml; import org.ofbiz.base.util.Debug; -import org.apache.xml.serialize.OutputFormat; -import org.apache.xml.serialize.XMLSerializer; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.xml.sax.SAXException; @@ -54,14 +53,17 @@ super(); } + @Override public void init(ServletConfig config) throws ServletException { super.init(config); } + @Override public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doGet(request, response); } + @Override public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // we're only testing the Rate API right now @@ -123,16 +125,9 @@ OutputStream os = new ByteArrayOutputStream(); - OutputFormat format = new OutputFormat(responseDocument); - format.setOmitDocumentType(true); - format.setOmitXMLDeclaration(false); - format.setIndenting(false); - - XMLSerializer serializer = new XMLSerializer(os, format); try { - serializer.asDOMSerializer(); - serializer.serialize(responseDocument.getDocumentElement()); - } catch (IOException e) { + UtilXml.writeXmlDocument(responseDocument, os, "UTF-8", true, false, 0); + } catch (TransformerException e) { Debug.log(e, module); return; } @@ -144,6 +139,7 @@ } } + @Override public void destroy() { super.destroy(); } Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java Sun Jul 5 10:01:19 2009 @@ -33,13 +33,12 @@ import java.util.Map; import javax.xml.parsers.ParserConfigurationException; +import javax.xml.transform.TransformerException; import javolution.util.FastList; import javolution.util.FastMap; import org.apache.commons.lang.StringUtils; -import org.apache.xml.serialize.OutputFormat; -import org.apache.xml.serialize.XMLSerializer; import org.ofbiz.base.util.Base64; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; @@ -1329,16 +1328,9 @@ OutputStream os = new ByteArrayOutputStream(); - OutputFormat format = new OutputFormat(requestDocument); - format.setOmitDocumentType(true); - format.setOmitXMLDeclaration(true); - format.setIndenting(false); - - XMLSerializer serializer = new XMLSerializer(os, format); try { - serializer.asDOMSerializer(); - serializer.serialize(requestDocument.getDocumentElement()); - } catch (IOException e) { + UtilXml.writeXmlDocument(requestDocument, os, "UTF-8", true, false, 0); + } catch (TransformerException e) { throw new UspsRequestException("Error serializing requestDocument: " + e.getMessage()); } Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServicesTests.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServicesTests.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServicesTests.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServicesTests.java Sun Jul 5 10:01:19 2009 @@ -48,9 +48,11 @@ super(name); } + @Override protected void setUp() throws Exception { } + @Override protected void tearDown() throws Exception { } Modified: ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/project/ProjectWorker.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/project/ProjectWorker.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/project/ProjectWorker.java (original) +++ ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/project/ProjectWorker.java Sun Jul 5 10:01:19 2009 @@ -43,6 +43,7 @@ public static final String module = ProjectWorker.class.getName(); /** @deprecated */ + @Deprecated public static void getAssignedProjects(PageContext pageContext, String projectsAttrName) { GenericDelegator delegator = (GenericDelegator) pageContext.getRequest().getAttribute("delegator"); GenericValue userLogin = (GenericValue) pageContext.getSession().getAttribute("userLogin"); @@ -71,6 +72,7 @@ } /** @deprecated */ + @Deprecated public static void getAllAssignedProjects(PageContext pageContext, String projectsAttrName) { GenericDelegator delegator = (GenericDelegator) pageContext.getRequest().getAttribute("delegator"); GenericValue userLogin = (GenericValue) pageContext.getSession().getAttribute("userLogin"); @@ -96,6 +98,7 @@ } /** @deprecated */ + @Deprecated public static void getAllProjectPhases(PageContext pageContext, String phasesAttrName) { GenericDelegator delegator = (GenericDelegator) pageContext.getRequest().getAttribute("delegator"); GenericValue userLogin = (GenericValue) pageContext.getSession().getAttribute("userLogin"); @@ -144,6 +147,7 @@ } /** @deprecated */ + @Deprecated public static void getAllPhaseTasks(PageContext pageContext, String tasksAttrName) { GenericDelegator delegator = (GenericDelegator) pageContext.getRequest().getAttribute("delegator"); GenericValue userLogin = (GenericValue) pageContext.getSession().getAttribute("userLogin"); @@ -191,6 +195,7 @@ } /** @deprecated */ + @Deprecated public static void getTaskNotes(PageContext pageContext, String notesAttrName) { GenericDelegator delegator = (GenericDelegator) pageContext.getRequest().getAttribute("delegator"); GenericValue userLogin = (GenericValue) pageContext.getSession().getAttribute("userLogin"); Modified: ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalWorker.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalWorker.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalWorker.java (original) +++ ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalWorker.java Sun Jul 5 10:01:19 2009 @@ -273,7 +273,6 @@ return true; } - @SuppressWarnings("unchecked") protected static void logInUser(HttpServletRequest request, HttpServletResponse response) throws GenericServiceException, GenericEntityException { Map<String, Object> serviceMap = (Map<String, Object>) WebDavUtil.getCredentialsFromRequest(request); if (serviceMap == null) { Modified: ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearch.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearch.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearch.java (original) +++ ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearch.java Sun Jul 5 10:01:19 2009 @@ -506,6 +506,7 @@ this.includeSubWorkEfforts = includeSubWorkEfforts; } + @Override public void addConstraint(WorkEffortSearchContext workEffortSearchContext) { Set<String> workEffortIdSet = FastSet.newInstance(); if (includeSubWorkEfforts) { @@ -573,6 +574,7 @@ /** pretty print for log messages and even UI stuff */ + @Override public String prettyPrintConstraint(GenericDelegator delegator, boolean detailed, Locale locale) { GenericValue workEffort = null; GenericValue workEffortAssocType = null; @@ -609,6 +611,7 @@ return ppBuf.toString(); } + @Override public boolean equals(Object obj) { WorkEffortSearchConstraint psc = (WorkEffortSearchConstraint) obj; if (psc instanceof WorkEffortAssocConstraint) { @@ -648,6 +651,7 @@ this.reviewTextString = reviewTextString; } + @Override public void addConstraint(WorkEffortSearchContext workEffortSearchContext) { String entityAlias = "WFR" + workEffortSearchContext.index; String prefix = "wfr" + workEffortSearchContext.index; @@ -663,6 +667,7 @@ /** pretty print for log messages and even UI stuff */ + @Override public String prettyPrintConstraint(GenericDelegator delegator, boolean detailed, Locale locale) { StringBuilder ppBuf = new StringBuilder(); ppBuf.append(UtilProperties.getMessage(resource, "WorkEffortReviews", locale) + ": \""); @@ -670,6 +675,7 @@ return ppBuf.toString(); } + @Override public boolean equals(Object obj) { WorkEffortSearchConstraint psc = (WorkEffortSearchConstraint) obj; if (psc instanceof WorkEffortReviewConstraint) { @@ -700,6 +706,7 @@ this.roleTypeId = roleTypeId; } + @Override public void addConstraint(WorkEffortSearchContext workEffortSearchContext) { // make index based values and increment String entityAlias = "WEPA" + workEffortSearchContext.index; @@ -724,6 +731,7 @@ workEffortSearchContext.workEffortSearchConstraintList.add(workEffortSearchContext.getDelegator().makeValue("WorkEffortSearchConstraint", UtilMisc.toMap("constraintName", constraintName, "infoString", this.partyId + "," + this.roleTypeId))); } + @Override public String prettyPrintConstraint(GenericDelegator delegator, boolean detailed, Locale locale) { GenericValue partyNameView = null; GenericValue roleType = null; @@ -768,6 +776,7 @@ return ppBuf.toString(); } + @Override public boolean equals(Object obj) { WorkEffortSearchConstraint psc = (WorkEffortSearchConstraint) obj; if (psc instanceof PartyAssignmentConstraint) { @@ -805,6 +814,7 @@ this.productIdSet = UtilMisc.makeSetWritable(productIdSet); } + @Override public void addConstraint(WorkEffortSearchContext workEffortSearchContext) { // make index based values and increment String entityAlias = "WEGS" + workEffortSearchContext.index; @@ -835,6 +845,7 @@ workEffortSearchContext.workEffortSearchConstraintList.add(workEffortSearchContext.getDelegator().makeValue("WorkEffortSearchConstraint", UtilMisc.toMap("constraintName", constraintName, "infoString", productIdInfo.toString()))); } + @Override public String prettyPrintConstraint(GenericDelegator delegator, boolean detailed, Locale locale) { StringBuilder infoOut = new StringBuilder(); try { @@ -861,6 +872,7 @@ return infoOut.toString(); } + @Override public boolean equals(Object obj) { WorkEffortSearchConstraint psc = (WorkEffortSearchConstraint) obj; if (psc instanceof ProductSetConstraint) { @@ -918,6 +930,7 @@ return fullKeywordSet; } + @Override public void addConstraint(WorkEffortSearchContext workEffortSearchContext) { // just make the fixed keyword lists and put them in the context if (isAnd) { @@ -958,6 +971,7 @@ } /** pretty print for log messages and even UI stuff */ + @Override public String prettyPrintConstraint(GenericDelegator delegator, boolean detailed, Locale locale) { StringBuilder ppBuf = new StringBuilder(); ppBuf.append(UtilProperties.getMessage(resource, "WorkEffortKeywords", locale)).append(": \""); @@ -966,6 +980,7 @@ return ppBuf.toString(); } + @Override public boolean equals(Object obj) { WorkEffortSearchConstraint psc = (WorkEffortSearchConstraint) obj; if (psc instanceof KeywordConstraint) { @@ -1008,6 +1023,7 @@ this.thruDate = thruDate; } + @Override public void addConstraint(WorkEffortSearchContext workEffortSearchContext) { workEffortSearchContext.dynamicViewEntity.addAlias("WEFF", "lastModifiedDate", "lastModifiedDate", null, null, null, null); @@ -1042,6 +1058,7 @@ } /** pretty print for log messages and even UI stuff */ + @Override public String prettyPrintConstraint(GenericDelegator delegator, boolean detailed, Locale locale) { StringBuilder ppBuf = new StringBuilder(); ppBuf.append(UtilProperties.getMessage(resource, "WorkEffortLastModified", locale)).append(": \""); @@ -1050,6 +1067,7 @@ } + @Override public boolean equals(Object obj) { WorkEffortSearchConstraint psc = (WorkEffortSearchConstraint) obj; if (psc instanceof LastUpdatedRangeConstraint) { @@ -1097,6 +1115,7 @@ public SortKeywordRelevancy() { } + @Override public void setSortOrder(WorkEffortSearchContext workEffortSearchContext) { if (workEffortSearchContext.includedKeywordSearch) { // we have to check this in order to be sure that there is a totalRelevancy to sort by... @@ -1105,14 +1124,17 @@ } } + @Override public String getOrderName() { return "KeywordRelevancy"; } + @Override public String prettyPrintSortOrder(boolean detailed, Locale locale) { return UtilProperties.getMessage(resource, "WorkEffortKeywordRelevancy", locale); } + @Override public boolean isAscending() { return false; } @@ -1134,6 +1156,7 @@ this.ascending = ascending; } + @Override public void setSortOrder(WorkEffortSearchContext workEffortSearchContext) { if (workEffortSearchContext.getDelegator().getModelEntity("WorkEffort").isField(fieldName)) { workEffortSearchContext.dynamicViewEntity.addAlias("WEFF", fieldName); @@ -1146,10 +1169,12 @@ workEffortSearchContext.fieldsToSelect.add(fieldName); } + @Override public String getOrderName() { return "WorkEffortField:" + this.fieldName; } + @Override public String prettyPrintSortOrder(boolean detailed, Locale locale) { if ("workEffortName".equals(this.fieldName)) { return UtilProperties.getMessage(resource, "WorkEffortName", locale); @@ -1163,6 +1188,7 @@ return this.fieldName; } + @Override public boolean isAscending() { return this.ascending; } Modified: ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortWorker.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortWorker.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortWorker.java (original) +++ ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortWorker.java Sun Jul 5 10:01:19 2009 @@ -50,6 +50,7 @@ public static final String module = WorkEffortWorker.class.getName(); /** @deprecated */ + @Deprecated public static void getWorkEffort(PageContext pageContext, String workEffortIdAttrName, String workEffortAttrName, String partyAssignsAttrName, String canViewAttrName, String tryEntityAttrName, String currentStatusAttrName) { GenericDelegator delegator = (GenericDelegator) pageContext.getRequest().getAttribute("delegator"); @@ -134,14 +135,17 @@ } /** @deprecated */ + @Deprecated public static void getMonthWorkEffortEvents(PageContext pageContext, String attributeName) {} /** @deprecated */ + @Deprecated public static void getActivityContext(PageContext pageContext, String workEffortId) { getActivityContext(pageContext, workEffortId, "activityContext"); } /** @deprecated */ + @Deprecated public static void getActivityContext(PageContext pageContext, String workEffortId, String attribute) { LocalDispatcher dispatcher = (LocalDispatcher) pageContext.getRequest().getAttribute("dispatcher"); GenericValue userLogin = (GenericValue) pageContext.getSession().getAttribute("userLogin"); Modified: ofbiz/trunk/framework/appserver/src/org/ofbiz/appservers/GenerateContainer.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/appserver/src/org/ofbiz/appservers/GenerateContainer.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/appserver/src/org/ofbiz/appservers/GenerateContainer.java (original) +++ ofbiz/trunk/framework/appserver/src/org/ofbiz/appservers/GenerateContainer.java Sun Jul 5 10:01:19 2009 @@ -77,7 +77,7 @@ */ public void init(String[] args, String configFile) { ofbizHome = System.getProperty("ofbiz.home"); - configFile = configFile; + this.configFile = configFile; this.args = args; isGeronimo = args[0].toLowerCase().contains("geronimo") || args[0].toLowerCase().contains("wasce"); if (isGeronimo) { Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/component/ComponentResourceHandler.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/component/ComponentResourceHandler.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/component/ComponentResourceHandler.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/component/ComponentResourceHandler.java Sun Jul 5 10:01:19 2009 @@ -89,6 +89,7 @@ return ComponentConfig.getFullLocation(componentName, loaderName, location); } + @Override public boolean equals(Object obj) { if (obj instanceof ComponentResourceHandler) { ComponentResourceHandler other = (ComponentResourceHandler) obj; @@ -102,11 +103,13 @@ return false; } + @Override public int hashCode() { // the hashCode will weight by a combination componentName and the combination of loaderName and location return (this.componentName.hashCode() + ((this.loaderName.hashCode() + this.location.hashCode()) >> 1)) >> 1; } + @Override public String toString() { return "ComponentResourceHandler from XML file [" + this.componentName + "] with loaderName [" + loaderName + "] and location [" + location + "]"; } Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/config/ClasspathLoader.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/config/ClasspathLoader.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/config/ClasspathLoader.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/config/ClasspathLoader.java Sun Jul 5 10:01:19 2009 @@ -28,6 +28,7 @@ */ public class ClasspathLoader extends ResourceLoader implements java.io.Serializable { + @Override public URL getURL(String location) throws GenericConfigException { String fullLocation = fullLocation(location); URL url = UtilURL.fromResource(fullLocation); @@ -37,6 +38,7 @@ return url; } + @Override public InputStream loadResource(String location) throws GenericConfigException { URL url = getURL(location); try { Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/config/FileLoader.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/config/FileLoader.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/config/FileLoader.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/config/FileLoader.java Sun Jul 5 10:01:19 2009 @@ -28,6 +28,7 @@ */ public class FileLoader extends ResourceLoader implements java.io.Serializable { + @Override public URL getURL(String location) throws GenericConfigException { String fullLocation = fullLocation(location); URL fileUrl = null; @@ -39,6 +40,7 @@ return fileUrl; } + @Override public InputStream loadResource(String location) throws GenericConfigException { URL fileUrl = getURL(location); try { Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/config/MainResourceHandler.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/config/MainResourceHandler.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/config/MainResourceHandler.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/config/MainResourceHandler.java Sun Jul 5 10:01:19 2009 @@ -95,6 +95,7 @@ return loader.fullLocation(location); } + @Override public boolean equals(Object obj) { if (obj instanceof MainResourceHandler) { MainResourceHandler other = (MainResourceHandler) obj; @@ -108,11 +109,13 @@ return false; } + @Override public int hashCode() { // the hashCode will weight by a combination xmlFilename and the combination of loaderName and location return (this.xmlFilename.hashCode() + ((this.loaderName.hashCode() + this.location.hashCode()) >> 1)) >> 1; } + @Override public String toString() { return "ResourceHandler from XML file [" + this.xmlFilename + "] with loaderName [" + loaderName + "] and location [" + location + "]"; } Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/config/UrlLoader.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/config/UrlLoader.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/config/UrlLoader.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/config/UrlLoader.java Sun Jul 5 10:01:19 2009 @@ -27,6 +27,7 @@ */ public class UrlLoader extends ResourceLoader implements java.io.Serializable { + @Override public URL getURL(String location) throws GenericConfigException { String fullLocation = fullLocation(location); @@ -44,6 +45,7 @@ return url; } + @Override public InputStream loadResource(String location) throws GenericConfigException { URL url = getURL(location); Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/splash/SplashScreen.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/splash/SplashScreen.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/splash/SplashScreen.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/splash/SplashScreen.java Sun Jul 5 10:01:19 2009 @@ -87,6 +87,7 @@ setVisible(true); } + @Override public void paint(Graphics graphics) { if (fImage != null) { graphics.drawImage(fImage, 0, 0, this); Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/CachedClassLoader.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/CachedClassLoader.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/CachedClassLoader.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/CachedClassLoader.java Sun Jul 5 10:01:19 2009 @@ -150,14 +150,17 @@ this(url, parent, "__globalContext"); } + @Override public String toString() { return "org.ofbiz.base.util.CachedClassLoader(" + contextName + ") / " + getParent().toString(); } + @Override public Class<?> loadClass(String name) throws ClassNotFoundException { return loadClass(name, false); } + @Override protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException { //check glocal common classes, ie for all instances Class<?> theClass = globalClassNameClassMap.get(name); @@ -202,6 +205,7 @@ return theClass; } + @Override public URL getResource(String name) { //check glocal common resources, ie for all instances URL theResource = globalResourceMap.get(name); Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/DateRange.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/DateRange.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/DateRange.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/DateRange.java Sun Jul 5 10:01:19 2009 @@ -60,10 +60,12 @@ } } + @Override public boolean equals(Object obj) { return obj instanceof DateRange && ((DateRange)obj).start.equals(this.start) && ((DateRange)obj).end.equals(this.end); } + @Override public String toString() { return this.start + " - " + this.end; } Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/GeneralException.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/GeneralException.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/GeneralException.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/GeneralException.java Sun Jul 5 10:01:19 2009 @@ -110,6 +110,7 @@ } /** Returns the detail message, including the message from the nested exception if there is one. */ + @Override public String getMessage() { Throwable nested = getCause(); if (nested != null) { @@ -142,16 +143,19 @@ } /** Prints the composite message to System.err. */ + @Override public void printStackTrace() { super.printStackTrace(); } /** Prints the composite message and the embedded stack trace to the specified stream ps. */ + @Override public void printStackTrace(PrintStream ps) { super.printStackTrace(ps); } /** Prints the composite message and the embedded stack trace to the specified print writer pw. */ + @Override public void printStackTrace(PrintWriter pw) { super.printStackTrace(pw); } Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/GeneralRuntimeException.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/GeneralRuntimeException.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/GeneralRuntimeException.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/GeneralRuntimeException.java Sun Jul 5 10:01:19 2009 @@ -63,6 +63,7 @@ } /** Returns the detail message, including the message from the nested exception if there is one. */ + @Override public String getMessage() { if (nested != null) return super.getMessage() + " (" + nested.getMessage() + ")"; @@ -81,18 +82,21 @@ } /** Prints the composite message to System.err. */ + @Override public void printStackTrace() { super.printStackTrace(); if (nested != null) nested.printStackTrace(); } /** Prints the composite message and the embedded stack trace to the specified stream ps. */ + @Override public void printStackTrace(PrintStream ps) { super.printStackTrace(ps); if (nested != null) nested.printStackTrace(ps); } /** Prints the composite message and the embedded stack trace to the specified print writer pw. */ + @Override public void printStackTrace(PrintWriter pw) { super.printStackTrace(pw); if (nested != null) nested.printStackTrace(pw); Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/Log4jLoggerWriter.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/Log4jLoggerWriter.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/Log4jLoggerWriter.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/Log4jLoggerWriter.java Sun Jul 5 10:01:19 2009 @@ -52,6 +52,7 @@ this.priority = priority; } + @Override public void write(char[] cbuf, int off, int len) throws IOException { if (closed) { throw new IOException("Writer is closed"); @@ -68,12 +69,14 @@ } } + @Override public void flush() throws IOException { if (closed) { throw new IOException("Writer is closed"); } } + @Override public void close() { closed = true; } Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/MessageString.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/MessageString.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/MessageString.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/MessageString.java Sun Jul 5 10:01:19 2009 @@ -247,6 +247,7 @@ this.isError = isError; } + @Override public String toString() { return this.message; } Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ObjectInputStream.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ObjectInputStream.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ObjectInputStream.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ObjectInputStream.java Sun Jul 5 10:01:19 2009 @@ -39,6 +39,7 @@ /** * @see java.io.ObjectInputStream#resolveClass(java.io.ObjectStreamClass) */ + @Override protected Class resolveClass(ObjectStreamClass classDesc) throws IOException, ClassNotFoundException { return ObjectType.loadClass(classDesc.getName(), classloader); } @@ -46,6 +47,7 @@ /** * @see java.io.ObjectInputStream#resolveProxyClass(java.lang.String[]) */ + @Override protected Class resolveProxyClass(String[] interfaces) throws IOException, ClassNotFoundException { Class[] cinterfaces = new Class[interfaces.length]; for (int i = 0; i < interfaces.length; i++) Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ObjectType.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ObjectType.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ObjectType.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ObjectType.java Sun Jul 5 10:01:19 2009 @@ -1239,10 +1239,12 @@ public static final class NullObject { public NullObject() { } + @Override public String toString() { return "ObjectType.NullObject"; } + @Override public boolean equals(Object other) { if (other instanceof NullObject) { // should do equality of object? don't think so, just same type |
Free forum by Nabble | Edit this page |