Skip to content

Commit

Permalink
feat(common): generated code
Browse files Browse the repository at this point in the history
  • Loading branch information
germanattanasio committed Feb 24, 2020
1 parent 3f9065e commit cae0d2c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions common/src/main/java/com/ibm/watson/common/SdkCommon.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ public class SdkCommon {
private static final Logger LOG = Logger.getLogger(SdkCommon.class.getName());
private static String userAgent;

private SdkCommon() { }
private SdkCommon() {
}

private static String loadSdkVersion() {
ClassLoader classLoader = SdkCommon.class.getClassLoader();
Expand Down Expand Up @@ -44,8 +45,7 @@ public static Map<String, String> getSdkHeaders(String serviceName, String servi
"service_name=%s;service_version=%s;operation_id=%s",
serviceName,
serviceVersion,
operationId
);
operationId);

headers.put(WatsonHttpHeaders.X_IBMCLOUD_SDK_ANALYTICS, sdkAnalyticsHeaderValue);
headers.put(HttpHeaders.USER_AGENT, getUserAgent());
Expand Down
2 changes: 0 additions & 2 deletions common/src/test/java/com/ibm/watson/common/RetryRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ public RetryRunner(Class<?> clazz) throws InitializationError {

/*
* (non-Javadoc)
*
* @see org.junit.runners.ParentRunner#run(org.junit.runner.notification.RunNotifier)
*/
@Override
Expand All @@ -62,7 +61,6 @@ public void run(final RunNotifier notifier) {

/*
* (non-Javadoc)
*
* @see org.junit.runners.BlockJUnit4ClassRunner#runChild(org.junit.runners.model.FrameworkMethod,
* org.junit.runner.notification.RunNotifier)
*/
Expand Down
5 changes: 3 additions & 2 deletions common/src/test/java/com/ibm/watson/common/TestUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ public final class TestUtils {
/**
* Private constructor.
*/
private TestUtils() { }
private TestUtils() {
}

/**
* Test that a collection is not null or empty.
Expand Down Expand Up @@ -65,7 +66,7 @@ public static void assertNoExceptionsOnGetters(final Object obj) throws Exceptio

if (readMethod != null) {
try {
readMethod.invoke(obj, new Object[] { });
readMethod.invoke(obj, new Object[] {});
} catch (final InvocationTargetException e) {
final StringBuffer msg = new StringBuffer();
msg.append("Failure: " + propertyDescriptor.getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ private void loadProperties() {
* Setup logging.
*/
private void setupLogging() {
ch.qos.logback.classic.Logger root =
(ch.qos.logback.classic.Logger) LoggerFactory.getLogger(org.slf4j.Logger.ROOT_LOGGER_NAME);
ch.qos.logback.classic.Logger root = (ch.qos.logback.classic.Logger) LoggerFactory.getLogger(
org.slf4j.Logger.ROOT_LOGGER_NAME);
root.setLevel(ch.qos.logback.classic.Level.OFF);
try {
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
Expand Down Expand Up @@ -190,13 +190,14 @@ public static <T> T loadFixture(String filename, Class<T> returnType) throws Fil
*
* @throws Exception the exception
*/
public void setUp() throws Exception { }
public void setUp() throws Exception {
}

/**
* Fuzzy date checking.
*/

private long tolerance = 5000; // 5 secs in ms
private long tolerance = 5000; // 5 secs in ms

/** return `true` if ldate before rdate within tolerance. */
public boolean fuzzyBefore(Date ldate, Date rdate) {
Expand Down

0 comments on commit cae0d2c

Please sign in to comment.