@@ -39,19 +39,19 @@ public InstanceResource(TwilioRestClient client,
3939 this .setLoaded (true );
4040 }
4141
42- private Object getAndLoadIfNecessary (String name ) {
43- Object prop = properties .get (name );
44-
45- if (prop == null && !this .isLoaded ()) {
46- try {
47- this .load (new HashMap <String , String >());
48- return properties .get (name );
49- } catch (TwilioRestException e ) {
50- throw new RuntimeException (e );
51- }
52- }
53- return prop ;
54- }
42+ private Object getAndLoadIfNecessary (String name ) {
43+ Object prop = properties .get (name );
44+
45+ if (prop == null && !this .isLoaded ()) {
46+ try {
47+ this .load (new HashMap <String , String >());
48+ return properties .get (name );
49+ } catch (TwilioRestException e ) {
50+ throw new RuntimeException (e );
51+ }
52+ }
53+ return prop ;
54+ }
5555
5656 /**
5757 * Gets the property.
@@ -76,7 +76,7 @@ public String getProperty(String name) {
7676 }
7777
7878 protected Object getObject (String name ) {
79- Object prop = getAndLoadIfNecessary (name );
79+ Object prop = getAndLoadIfNecessary (name );
8080
8181 if (prop == null ) {
8282 throw new IllegalArgumentException ("Property " + name
@@ -86,16 +86,15 @@ protected Object getObject(String name) {
8686 return prop ;
8787 }
8888
89- /**
90- * Sets the property as an Object
91- *
92- * @param name the name
93- * @param value the value
94- */
95- protected void setProperty (String name , Object value ) {
96- properties .put (name , value );
97- }
98-
89+ /**
90+ * Sets the property as an Object
91+ *
92+ * @param name the name
93+ * @param value the value
94+ */
95+ protected void setProperty (String name , Object value ) {
96+ properties .put (name , value );
97+ }
9998
10099 /**
101100 * Update.
@@ -111,8 +110,8 @@ public void update(Map<String, String> params) throws TwilioRestException {
111110 * @see com.twilio.sdk.resource.Resource#parseResponse(com.twilio.sdk.TwilioRestResponse)
112111 */
113112 @ Override
114- protected void parseResponse (TwilioRestResponse response ) {
115- Map <String , Object > properties = response .toMap ();
116- this .properties = new HashMap <String , Object >(properties );
117- }
113+ protected void parseResponse (TwilioRestResponse response ) {
114+ Map <String , Object > properties = response .toMap ();
115+ this .properties = new HashMap <String , Object >(properties );
116+ }
118117}
0 commit comments