Skip to content

Commit

Permalink
Merge pull request Netflix#248 from gzurowski/fix-field-access
Browse files Browse the repository at this point in the history
Apply field encapsulation in ZuulApplicationInfo and refactor client code accordingly
  • Loading branch information
mikeycohen authored Aug 8, 2016
2 parents 149ab6c + 7a25904 commit 0114845
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
* Time: 1:56 PM
*/
public class ZuulApplicationInfo {
public static String applicationName;
public static String stack;
private static String applicationName;
private static String stack;

public static String getApplicationName() {
return applicationName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,12 @@ public static String getApplicationName() {
/**
* sets the application name of the origin
*
* @param app_name
* @param applicationName
*/
public static void setApplicationName(String app_name) {
RibbonConfig.APPLICATION_NAME = app_name;
if (ZuulApplicationInfo.applicationName == null) ZuulApplicationInfo.applicationName = app_name;
LOG.info("Setting back end VIP application = " + app_name);
public static void setApplicationName(String applicationName) {
RibbonConfig.APPLICATION_NAME = applicationName;
if (ZuulApplicationInfo.getApplicationName() == null) ZuulApplicationInfo.setApplicationName(applicationName);
LOG.info("Setting back end VIP application = " + applicationName);
}

/**
Expand All @@ -145,13 +145,13 @@ public static String getApplicationStack() {
}

/**
* sets the default origin applcation stack
* sets the default origin application stack
*
* @param stack
*/
public static void setApplicationStack(String stack) {
RibbonConfig.APPLICATION_STACK = stack;
if (ZuulApplicationInfo.getStack() == null) ZuulApplicationInfo.stack = stack;
if (ZuulApplicationInfo.getStack() == null) ZuulApplicationInfo.setStack(stack);
LOG.info("Setting back end VIP stack = " + stack);
}

Expand Down

0 comments on commit 0114845

Please sign in to comment.