You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by bo...@apache.org on 2007/03/08 21:55:10 UTC

svn commit: r516172 - /myfaces/tobago/trunk/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/model/solar/SolarObject.java

Author: bommel
Date: Thu Mar  8 12:55:09 2007
New Revision: 516172

URL: http://svn.apache.org/viewvc?view=rev&rev=516172
Log:
some cleanups

Modified:
    myfaces/tobago/trunk/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/model/solar/SolarObject.java

Modified: myfaces/tobago/trunk/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/model/solar/SolarObject.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/model/solar/SolarObject.java?view=diff&rev=516172&r1=516171&r2=516172
==============================================================================
--- myfaces/tobago/trunk/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/model/solar/SolarObject.java (original)
+++ myfaces/tobago/trunk/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/model/solar/SolarObject.java Thu Mar  8 12:55:09 2007
@@ -53,28 +53,28 @@
     this.number = strings[1];
     this.orbit = strings[2];
     try {
-      this.distance = new Integer(strings[3]);
+      this.distance = Integer.valueOf(strings[3]);
     } catch (NumberFormatException e) {
       new Integer(0);
     }
     try {
-      this.period = new Double(strings[4]);
+      this.period = Double.valueOf(strings[4]);
     } catch (NumberFormatException e) {
       new Double(0);
     }
     try {
-      this.incl = new Double(strings[5]);
+      this.incl = Double.valueOf(strings[5]);
     } catch (NumberFormatException e) {
       new Double(0);
     }
     try {
-      this.eccen = new Double(strings[6]);
+      this.eccen = Double.valueOf(strings[6]);
     } catch (NumberFormatException e) {
       new Double(0);
     }
     this.discoverer = strings[7];
     try {
-      this.discoverYear = new Integer(strings[8]);
+      this.discoverYear = Integer.valueOf(strings[8]);
     } catch (NumberFormatException e) {
       new Integer(0);
     }
@@ -190,9 +190,9 @@
     public static List<SolarObject> getSatellites(String center) {
     List<SolarObject> collect = new ArrayList<SolarObject>();
     SolarObject[] all = getArray();
-    for (int i = 0; i < all.length; i++) {
-      if (all[i].getOrbit().equals(center)) {
-        collect.add(all[i]);
+    for (SolarObject anAll : all) {
+      if (anAll.getOrbit().equals(center)) {
+        collect.add(anAll);
       }
     }
     return collect;