]> git.mxchange.org Git - pizzaservice-war.git/commitdiff
toArray(T[]) must be used
authorRoland Haeder <roland@mxchange.org>
Tue, 11 Aug 2015 09:26:06 +0000 (11:26 +0200)
committerRoland Haeder <roland@mxchange.org>
Tue, 11 Aug 2015 09:32:08 +0000 (11:32 +0200)
Signed-off-by:Roland Häder <roland@mxchange.org>

src/java/org/mxchange/pizzaapplication/application/PizzaServiceApplication.java
web/index.jsp

index 647ab17969d945a8a9ad13845011632fb8d9a81e..445228b40a04ce4920142f401fbaf154ccde480f 100644 (file)
@@ -352,7 +352,7 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P
                // Output it
                while (it.hasNext()) {
                        Map.Entry<Field, Object> entry = it.next();
-                       this.getLogger().debug(MessageFormat.format("entry {0}={1}", entry.getKey(), entry.getValue()));
+                       this.getLogger().debug(MessageFormat.format("entry {0}={1}", entry.getKey(), entry.getValue())); //NOI18N
                }
        }
 
@@ -977,25 +977,25 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P
        @Override
        public Object getPrintableValeFromSession (final HttpSession session, final String key) {
                // Trace message
-               this.getLogger().trace(MessageFormat.format("session={0},key={1} - CALLED", session, key));
+               this.getLogger().trace(MessageFormat.format("session={0},key={1} - CALLED", session, key)); //NOI18N
 
                // Are both parameter not null?
                if (session == null) {
                        // Abort here
-                       throw new NullPointerException("session is null");
+                       throw new NullPointerException("session is null"); //NOI18N
                } else  if (key == null) {
                        // Abort here
-                       throw new NullPointerException("key is null");
+                       throw new NullPointerException("key is null"); //NOI18N
                }
 
                // Now get it
                Object value = this.getValueFromSession(session, key);
 
                // Debug message
-               this.getLogger().debug(MessageFormat.format("value={0}", value));
+               this.getLogger().debug(MessageFormat.format("value={0}", value)); //NOI18N
 
                // Trace message
-               this.getLogger().trace(MessageFormat.format("Calling this.convertNullToEmpty({0}) ... - EXIT!", value));
+               this.getLogger().trace(MessageFormat.format("Calling this.convertNullToEmpty({0}) ... - EXIT!", value)); //NOI18N
 
                // Return actual value
                return this.convertNullToEmpty(value);
@@ -1028,7 +1028,7 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P
         */
        @Override
        public Product[] getProducts () {
-               return (Product[]) this.products.values().toArray();
+               return this.products.values().toArray(new Product[this.products.size()]);
        }
 
        /**
@@ -1053,7 +1053,7 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P
 
                // Mark it as ordered by setting flag
                this.getLogger().debug(MessageFormat.format("Marking product={0} as choosen.", product.getName())); //NOI18N
-               this.setValueInSession(product, session, HTTP_PARAM_CHOOSE, "1");
+               this.setValueInSession(product, session, HTTP_PARAM_CHOOSE, "1"); //NOI18N
 
                // Trace message
                this.getLogger().trace("EXIT!"); //NOI18N
index b72daf9af70c407d7d3907636fb364be96555b55..ab34c0855e7447ec68707603b4d1cdbb420604cd 100644 (file)
@@ -58,7 +58,7 @@
 
                                        <tbody class="table_body">
                                                <%
-                                               // Much smaller loop
+                                               // "Walk" through all products and unmark them as ordered
                                                for (final Product product : app.getUnmarkedProducts(session)) {
                                                        %>
                                                        <tr>