tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sl...@apache.org
Subject svn commit: r662220 - in /incubator/tuscany/sandbox/travelsample/gettingstarted/src: currencyconverter/CurrencyConverterImpl.java trip/TripImpl.java
Date Sun, 01 Jun 2008 14:35:24 GMT
Author: slaws
Date: Sun Jun  1 07:35:24 2008
New Revision: 662220

URL: http://svn.apache.org/viewvc?rev=662220&view=rev
Log:
Minor adjustments

Modified:
    incubator/tuscany/sandbox/travelsample/gettingstarted/src/currencyconverter/CurrencyConverterImpl.java
    incubator/tuscany/sandbox/travelsample/gettingstarted/src/trip/TripImpl.java

Modified: incubator/tuscany/sandbox/travelsample/gettingstarted/src/currencyconverter/CurrencyConverterImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/travelsample/gettingstarted/src/currencyconverter/CurrencyConverterImpl.java?rev=662220&r1=662219&r2=662220&view=diff
==============================================================================
--- incubator/tuscany/sandbox/travelsample/gettingstarted/src/currencyconverter/CurrencyConverterImpl.java
(original)
+++ incubator/tuscany/sandbox/travelsample/gettingstarted/src/currencyconverter/CurrencyConverterImpl.java
Sun Jun  1 07:35:24 2008
@@ -26,8 +26,7 @@
     public double convert(String fromCurrencyCode, 
                           String toCurrencyCode, 
                           double amount){
-        // regardless of which currencies are specified the 
-        // conversion is the same!
+        // this currency conversion is pretty dumb
         return amount * 1.23;
     }
 }

Modified: incubator/tuscany/sandbox/travelsample/gettingstarted/src/trip/TripImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/travelsample/gettingstarted/src/trip/TripImpl.java?rev=662220&r1=662219&r2=662220&view=diff
==============================================================================
--- incubator/tuscany/sandbox/travelsample/gettingstarted/src/trip/TripImpl.java (original)
+++ incubator/tuscany/sandbox/travelsample/gettingstarted/src/trip/TripImpl.java Sun Jun 
1 07:35:24 2008
@@ -27,17 +27,13 @@
  */
 public class TripImpl implements Trip {
     
-    private CurrencyConverter currencyConverter;
+    @Reference
+    protected CurrencyConverter currencyConverter;
     
-    private double totalPrice = 123.45;
+    private double totalPrice = 100.00;
     private String supplierCurrency = "USD";
     private String quoteCurrency = "GBP";
-    
-    @Reference
-    public void setCurrencyConverter(CurrencyConverter currencyConverter){
-        this.currencyConverter = currencyConverter;
-    }
-    
+       
     public double getTotalPrice(){
         return currencyConverter.convert(supplierCurrency, 
                                          quoteCurrency, 



Mime
View raw message