)]}'
{"java/pom.xml":[{"author":{"_account_id":16222,"name":"witek","email":"witold.bedyk@suse.com","username":"witek"},"change_message_id":"141572d0e8041cb49cb7f84765293ffd80c857e5","unresolved":false,"context_lines":[{"line_number":1,"context_line":"\u003cproject xmlns:xsi\u003d\"http://www.w3.org/2001/XMLSchema-instance\""},{"line_number":2,"context_line":"         xmlns\u003d\"http://maven.apache.org/POM/4.0.0\""},{"line_number":3,"context_line":"         xsi:schemaLocation\u003d\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\"\u003e"},{"line_number":4,"context_line":"    \u003cmodelVersion\u003e4.0.0\u003c/modelVersion\u003e"},{"line_number":5,"context_line":""}],"source_content_type":"application/xml","patch_set":3,"id":"7a2fa921_e5e46bad","line":2,"updated":"2015-10-13 08:25:11.000000000","message":"Please don\u0027t change the order.","commit_id":"a426d43b5390de38206272e63374dba37637429c"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"5aabe1d977d5311642ec4dc0fd0eab5216894adc","unresolved":false,"context_lines":[{"line_number":1,"context_line":"\u003cproject xmlns:xsi\u003d\"http://www.w3.org/2001/XMLSchema-instance\""},{"line_number":2,"context_line":"         xmlns\u003d\"http://maven.apache.org/POM/4.0.0\""},{"line_number":3,"context_line":"         xsi:schemaLocation\u003d\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\"\u003e"},{"line_number":4,"context_line":"    \u003cmodelVersion\u003e4.0.0\u003c/modelVersion\u003e"},{"line_number":5,"context_line":""}],"source_content_type":"application/xml","patch_set":3,"id":"5a2ca52d_612374be","line":2,"in_reply_to":"7a2fa921_e5e46bad","updated":"2015-10-14 10:18:47.000000000","message":"Done","commit_id":"a426d43b5390de38206272e63374dba37637429c"}],"java/src/main/java/monasca/log/api/app/ApplicationModule.java":[{"author":{"_account_id":16222,"name":"witek","email":"witold.bedyk@suse.com","username":"witek"},"change_message_id":"141572d0e8041cb49cb7f84765293ffd80c857e5","unresolved":false,"context_lines":[{"line_number":24,"context_line":"import com.fasterxml.jackson.databind.SerializationFeature;"},{"line_number":25,"context_line":"import com.google.inject.AbstractModule;"},{"line_number":26,"context_line":"import com.google.inject.Provides;"},{"line_number":27,"context_line":"import com.google.inject.name.Named;"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"import monasca.log.api.app.unload.JsonPayloadTransformer;"},{"line_number":30,"context_line":""}],"source_content_type":"text/x-java","patch_set":3,"id":"7a2fa921_e88f6273","line":27,"updated":"2015-10-13 08:25:11.000000000","message":"Please use Google Java Style ordering https://google.github.io/styleguide/javaguide.html#s3.3.3-import-ordering-and-spacing","commit_id":"a426d43b5390de38206272e63374dba37637429c"}],"java/src/main/java/monasca/log/api/app/LogSerializer.java":[{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"2d22502b4a97bde84ba60493d8ef661738a1a565","unresolved":false,"context_lines":[{"line_number":1,"context_line":"package monasca.log.api.app;"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"import java.util.TimeZone;"}],"source_content_type":"text/x-java","patch_set":1,"id":"ba15a1d1_3a71960f","line":1,"updated":"2015-09-17 17:06:45.000000000","message":"Copyright and apache 2 license header?\n\nNeed to be added in multiple files.","commit_id":"76053b7d2df9ae3bc73115018d187b0d04aa20fd"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"929cae73dd28dbb198127931cb5e9133c7a41fcf","unresolved":false,"context_lines":[{"line_number":1,"context_line":"package monasca.log.api.app;"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"import java.util.TimeZone;"}],"source_content_type":"text/x-java","patch_set":1,"id":"ba15a1d1_ef5589f9","line":1,"in_reply_to":"ba15a1d1_3a71960f","updated":"2015-09-18 06:15:02.000000000","message":"I totally forgot about that. Will be done ASAP.","commit_id":"76053b7d2df9ae3bc73115018d187b0d04aa20fd"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"2d22502b4a97bde84ba60493d8ef661738a1a565","unresolved":false,"context_lines":[{"line_number":14,"context_line":"import monasca.log.api.model.Log;"},{"line_number":15,"context_line":"import monasca.log.api.model.LogEnvelope;"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"public class LogSerializer {"},{"line_number":18,"context_line":"  private static final ObjectMapper OBJECT_MAPPER;"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"  static {"}],"source_content_type":"text/x-java","patch_set":1,"id":"ba15a1d1_fa579e23","line":17,"updated":"2015-09-17 17:06:45.000000000","message":"As this class only has one member, which is ObjectMapper, and it is private static, just wondering if you want to declare this class as final, as well as make fromJson and to Json as public static final, as they don\u0027t have any members, rather than protected, which implies that you would inherit from this class.","commit_id":"76053b7d2df9ae3bc73115018d187b0d04aa20fd"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"929cae73dd28dbb198127931cb5e9133c7a41fcf","unresolved":false,"context_lines":[{"line_number":14,"context_line":"import monasca.log.api.model.Log;"},{"line_number":15,"context_line":"import monasca.log.api.model.LogEnvelope;"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"public class LogSerializer {"},{"line_number":18,"context_line":"  private static final ObjectMapper OBJECT_MAPPER;"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"  static {"}],"source_content_type":"text/x-java","patch_set":1,"id":"ba15a1d1_4fa115f7","line":17,"in_reply_to":"ba15a1d1_fa579e23","updated":"2015-09-18 06:15:02.000000000","message":"Hmm...that\u0027s kind of hard to explain but I wanted start to leave static method pattern (i.e. using such class with public static methods) and run with DI here. I\u0027d like to stick to it so I think the best option would be to put ObjectMapper into DI as singleton and inject here. I will upload next patch set with change like that.","commit_id":"76053b7d2df9ae3bc73115018d187b0d04aa20fd"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"2d22502b4a97bde84ba60493d8ef661738a1a565","unresolved":false,"context_lines":[{"line_number":68,"context_line":"    try {"},{"line_number":69,"context_line":"      return OBJECT_MAPPER.writeValueAsString(log);"},{"line_number":70,"context_line":"    } catch (JsonProcessingException e) {"},{"line_number":71,"context_line":"      return null;"},{"line_number":72,"context_line":"    }"},{"line_number":73,"context_line":"  }"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-java","patch_set":1,"id":"ba15a1d1_fa1f9eb4","line":71,"updated":"2015-09-17 17:06:45.000000000","message":"Just wondering why you are returning a null, rather than throwing an exception as in the case of fromJson.","commit_id":"76053b7d2df9ae3bc73115018d187b0d04aa20fd"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"929cae73dd28dbb198127931cb5e9133c7a41fcf","unresolved":false,"context_lines":[{"line_number":68,"context_line":"    try {"},{"line_number":69,"context_line":"      return OBJECT_MAPPER.writeValueAsString(log);"},{"line_number":70,"context_line":"    } catch (JsonProcessingException e) {"},{"line_number":71,"context_line":"      return null;"},{"line_number":72,"context_line":"    }"},{"line_number":73,"context_line":"  }"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-java","patch_set":1,"id":"ba15a1d1_afb2314a","line":71,"in_reply_to":"ba15a1d1_fa1f9eb4","updated":"2015-09-18 06:15:02.000000000","message":"Correct, need rethrow exception here.","commit_id":"76053b7d2df9ae3bc73115018d187b0d04aa20fd"}],"java/src/main/java/monasca/log/api/app/LogService.java":[{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"2d22502b4a97bde84ba60493d8ef661738a1a565","unresolved":false,"context_lines":[{"line_number":106,"context_line":"    try {"},{"line_number":107,"context_line":"      log \u003d this.payloadTransformers.get(logRequestBean.getContentType()).transform(payload);"},{"line_number":108,"context_line":"    } catch (Exception exp) {"},{"line_number":109,"context_line":"      LOGGER.error(LOG_MARKER_ERROR, \"Failed to unpack payload \\n\\\"{}\\\"\", payload);"},{"line_number":110,"context_line":"      throw Exceptions.unprocessableEntity(\"{} couldn\u0027t be processed\", payload);"},{"line_number":111,"context_line":"    }"},{"line_number":112,"context_line":""}],"source_content_type":"text/x-java","patch_set":1,"id":"ba15a1d1_cb152e9c","line":109,"updated":"2015-09-17 17:06:45.000000000","message":"Hmmm, I\u0027m not sure you want to log an error here as this is due to user input and isn\u0027t really a problem with the system, such as not able to communicate with Kafka or the Database.\n\nLog warn would probably be better.","commit_id":"76053b7d2df9ae3bc73115018d187b0d04aa20fd"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"929cae73dd28dbb198127931cb5e9133c7a41fcf","unresolved":false,"context_lines":[{"line_number":106,"context_line":"    try {"},{"line_number":107,"context_line":"      log \u003d this.payloadTransformers.get(logRequestBean.getContentType()).transform(payload);"},{"line_number":108,"context_line":"    } catch (Exception exp) {"},{"line_number":109,"context_line":"      LOGGER.error(LOG_MARKER_ERROR, \"Failed to unpack payload \\n\\\"{}\\\"\", payload);"},{"line_number":110,"context_line":"      throw Exceptions.unprocessableEntity(\"{} couldn\u0027t be processed\", payload);"},{"line_number":111,"context_line":"    }"},{"line_number":112,"context_line":""}],"source_content_type":"text/x-java","patch_set":1,"id":"ba15a1d1_4f8ef52e","line":109,"in_reply_to":"ba15a1d1_cb152e9c","updated":"2015-09-18 06:15:02.000000000","message":"Done","commit_id":"76053b7d2df9ae3bc73115018d187b0d04aa20fd"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"2d22502b4a97bde84ba60493d8ef661738a1a565","unresolved":false,"context_lines":[{"line_number":135,"context_line":"        throw Exceptions.unprocessableEntity(\"Log must be %d characters or less\", MAX_LOG_LENGTH);"},{"line_number":136,"context_line":"      }"},{"line_number":137,"context_line":"    } catch (Exception exp) {"},{"line_number":138,"context_line":"      LOGGER.error(LOG_MARKER_ERROR, \"Log {} not valid, error is {}\", log, exp);"},{"line_number":139,"context_line":"      throw exp;"},{"line_number":140,"context_line":"    }"},{"line_number":141,"context_line":""}],"source_content_type":"text/x-java","patch_set":1,"id":"ba15a1d1_0b9326fb","line":138,"updated":"2015-09-17 17:06:45.000000000","message":"Similar comment to up above, as this is a problem due to input validation, and not a problem with the Monasca system, it probably shouldn\u0027t be treated as an error. Warn would probably be a better choice.","commit_id":"76053b7d2df9ae3bc73115018d187b0d04aa20fd"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"929cae73dd28dbb198127931cb5e9133c7a41fcf","unresolved":false,"context_lines":[{"line_number":135,"context_line":"        throw Exceptions.unprocessableEntity(\"Log must be %d characters or less\", MAX_LOG_LENGTH);"},{"line_number":136,"context_line":"      }"},{"line_number":137,"context_line":"    } catch (Exception exp) {"},{"line_number":138,"context_line":"      LOGGER.error(LOG_MARKER_ERROR, \"Log {} not valid, error is {}\", log, exp);"},{"line_number":139,"context_line":"      throw exp;"},{"line_number":140,"context_line":"    }"},{"line_number":141,"context_line":""}],"source_content_type":"text/x-java","patch_set":1,"id":"ba15a1d1_af98f178","line":138,"in_reply_to":"ba15a1d1_0b9326fb","updated":"2015-09-18 06:15:02.000000000","message":"Done","commit_id":"76053b7d2df9ae3bc73115018d187b0d04aa20fd"},{"author":{"_account_id":16222,"name":"witek","email":"witold.bedyk@suse.com","username":"witek"},"change_message_id":"141572d0e8041cb49cb7f84765293ffd80c857e5","unresolved":false,"context_lines":[{"line_number":95,"context_line":"  }"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"  public Log newLog(final LogRequestBean logRequestBean, final boolean validate) {"},{"line_number":98,"context_line":"    LOGGER.debug(LOG_MARKER, \"Creating new log from bean \u003d {}, validation is {}\", logRequestBean, validate ? \"enabled\" : \"disabled\");"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    Preconditions.checkNotNull(logRequestBean, \"LogBean must not be null\");"},{"line_number":101,"context_line":"    Preconditions.checkNotNull(logRequestBean.getPayload(), \"Payload should not be null\");"}],"source_content_type":"text/x-java","patch_set":3,"id":"7a2fa921_08c5fe59","line":98,"updated":"2015-10-13 08:25:11.000000000","message":"Please use the column limit of 100 characters.","commit_id":"a426d43b5390de38206272e63374dba37637429c"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"5aabe1d977d5311642ec4dc0fd0eab5216894adc","unresolved":false,"context_lines":[{"line_number":95,"context_line":"  }"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"  public Log newLog(final LogRequestBean logRequestBean, final boolean validate) {"},{"line_number":98,"context_line":"    LOGGER.debug(LOG_MARKER, \"Creating new log from bean \u003d {}, validation is {}\", logRequestBean, validate ? \"enabled\" : \"disabled\");"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    Preconditions.checkNotNull(logRequestBean, \"LogBean must not be null\");"},{"line_number":101,"context_line":"    Preconditions.checkNotNull(logRequestBean.getPayload(), \"Payload should not be null\");"}],"source_content_type":"text/x-java","patch_set":3,"id":"5a2ca52d_7c6ebbca","line":98,"in_reply_to":"7a2fa921_08c5fe59","updated":"2015-10-14 10:18:47.000000000","message":"Done","commit_id":"a426d43b5390de38206272e63374dba37637429c"},{"author":{"_account_id":16222,"name":"witek","email":"witold.bedyk@suse.com","username":"witek"},"change_message_id":"141572d0e8041cb49cb7f84765293ffd80c857e5","unresolved":false,"context_lines":[{"line_number":107,"context_line":"      log \u003d this.payloadTransformers.get(logRequestBean.getContentType()).transform(payload);"},{"line_number":108,"context_line":"    } catch (Exception exp) {"},{"line_number":109,"context_line":"      LOGGER.warn(LOG_MARKER_WARN, \"Failed to unpack payload \\n\\\"{}\\\"\", payload);"},{"line_number":110,"context_line":"      throw Exceptions.unprocessableEntity(\"{} couldn\u0027t be processed\", payload);"},{"line_number":111,"context_line":"    }"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    log.setApplicationType(LogApplicationTypeValidator.normalize(logRequestBean.getApplicationType()));"}],"source_content_type":"text/x-java","patch_set":3,"id":"7a2fa921_2889daca","line":110,"updated":"2015-10-13 08:25:11.000000000","message":"Shouldn\u0027t that be \"%s couldn\u0027t be processed\"?","commit_id":"a426d43b5390de38206272e63374dba37637429c"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"5aabe1d977d5311642ec4dc0fd0eab5216894adc","unresolved":false,"context_lines":[{"line_number":107,"context_line":"      log \u003d this.payloadTransformers.get(logRequestBean.getContentType()).transform(payload);"},{"line_number":108,"context_line":"    } catch (Exception exp) {"},{"line_number":109,"context_line":"      LOGGER.warn(LOG_MARKER_WARN, \"Failed to unpack payload \\n\\\"{}\\\"\", payload);"},{"line_number":110,"context_line":"      throw Exceptions.unprocessableEntity(\"{} couldn\u0027t be processed\", payload);"},{"line_number":111,"context_line":"    }"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    log.setApplicationType(LogApplicationTypeValidator.normalize(logRequestBean.getApplicationType()));"}],"source_content_type":"text/x-java","patch_set":3,"id":"5a2ca52d_bc821351","line":110,"in_reply_to":"7a2fa921_2889daca","updated":"2015-10-14 10:18:47.000000000","message":"Could be but that\u0027s needed at all. Exceptions class takes care of formatting on its own.","commit_id":"a426d43b5390de38206272e63374dba37637429c"},{"author":{"_account_id":16222,"name":"witek","email":"witold.bedyk@suse.com","username":"witek"},"change_message_id":"141572d0e8041cb49cb7f84765293ffd80c857e5","unresolved":false,"context_lines":[{"line_number":110,"context_line":"      throw Exceptions.unprocessableEntity(\"{} couldn\u0027t be processed\", payload);"},{"line_number":111,"context_line":"    }"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    log.setApplicationType(LogApplicationTypeValidator.normalize(logRequestBean.getApplicationType()));"},{"line_number":114,"context_line":"    log.setDimensions(DimensionValidation.normalize(logRequestBean.getDimensions()));"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    if (validate) {"}],"source_content_type":"text/x-java","patch_set":3,"id":"7a2fa921_8886ee11","line":113,"updated":"2015-10-13 08:25:11.000000000","message":"Column limit.","commit_id":"a426d43b5390de38206272e63374dba37637429c"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"5aabe1d977d5311642ec4dc0fd0eab5216894adc","unresolved":false,"context_lines":[{"line_number":110,"context_line":"      throw Exceptions.unprocessableEntity(\"{} couldn\u0027t be processed\", payload);"},{"line_number":111,"context_line":"    }"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    log.setApplicationType(LogApplicationTypeValidator.normalize(logRequestBean.getApplicationType()));"},{"line_number":114,"context_line":"    log.setDimensions(DimensionValidation.normalize(logRequestBean.getDimensions()));"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    if (validate) {"}],"source_content_type":"text/x-java","patch_set":3,"id":"5a2ca52d_dc87cf5f","line":113,"in_reply_to":"7a2fa921_8886ee11","updated":"2015-10-14 10:18:47.000000000","message":"Done","commit_id":"a426d43b5390de38206272e63374dba37637429c"}],"java/src/main/java/monasca/log/api/app/unload/JsonPayloadTransformer.java":[{"author":{"_account_id":16222,"name":"witek","email":"witold.bedyk@suse.com","username":"witek"},"change_message_id":"141572d0e8041cb49cb7f84765293ffd80c857e5","unresolved":false,"context_lines":[{"line_number":17,"context_line":"import javax.ws.rs.core.MediaType;"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"import com.google.inject.Inject;"},{"line_number":20,"context_line":"import org.apache.commons.lang3.StringUtils;"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"import monasca.log.api.app.LogSerializer;"},{"line_number":23,"context_line":"import monasca.log.api.common.PayloadTransformer;"}],"source_content_type":"text/x-java","patch_set":3,"id":"7a2fa921_031abf6e","line":20,"updated":"2015-10-13 08:25:11.000000000","message":"Please apply Google Java Style.","commit_id":"a426d43b5390de38206272e63374dba37637429c"}],"java/src/main/java/monasca/log/api/app/validation/LogApplicationTypeValidator.java":[{"author":{"_account_id":16222,"name":"witek","email":"witold.bedyk@suse.com","username":"witek"},"change_message_id":"141572d0e8041cb49cb7f84765293ffd80c857e5","unresolved":false,"context_lines":[{"line_number":29,"context_line":"  private static final Pattern VALID_APPLICATION_TYPE \u003d Pattern.compile(\"^[a-zA-Z0-9_\\\\.\\\\-]+$\");"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"  private LogApplicationTypeValidator() {"},{"line_number":32,"context_line":"  }"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"  /**"},{"line_number":35,"context_line":"   * Normalizes the {@code applicationType} by removing whitespace."}],"source_content_type":"text/x-java","patch_set":3,"id":"7a2fa921_c39fe7b2","line":32,"updated":"2015-10-13 08:25:11.000000000","message":"Please don\u0027t change.","commit_id":"a426d43b5390de38206272e63374dba37637429c"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"5aabe1d977d5311642ec4dc0fd0eab5216894adc","unresolved":false,"context_lines":[{"line_number":29,"context_line":"  private static final Pattern VALID_APPLICATION_TYPE \u003d Pattern.compile(\"^[a-zA-Z0-9_\\\\.\\\\-]+$\");"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"  private LogApplicationTypeValidator() {"},{"line_number":32,"context_line":"  }"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"  /**"},{"line_number":35,"context_line":"   * Normalizes the {@code applicationType} by removing whitespace."}],"source_content_type":"text/x-java","patch_set":3,"id":"5a2ca52d_1cbc6704","line":32,"in_reply_to":"7a2fa921_c39fe7b2","updated":"2015-10-14 10:18:47.000000000","message":"Done","commit_id":"a426d43b5390de38206272e63374dba37637429c"},{"author":{"_account_id":16222,"name":"witek","email":"witold.bedyk@suse.com","username":"witek"},"change_message_id":"141572d0e8041cb49cb7f84765293ffd80c857e5","unresolved":false,"context_lines":[{"line_number":45,"context_line":"   */"},{"line_number":46,"context_line":"  public static void validate(String applicationType) {"},{"line_number":47,"context_line":"    if (applicationType.length() \u003e LogApiConstants.MAX_NAME_LENGTH)"},{"line_number":48,"context_line":"      throw Exceptions.unprocessableEntity(\"Application type %s must be %d characters or less\", applicationType, LogApiConstants.MAX_NAME_LENGTH);"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    if (!VALID_APPLICATION_TYPE.matcher(applicationType).matches())"},{"line_number":51,"context_line":"      throw Exceptions.unprocessableEntity(\"Application type %s may only contain: a-z A-Z 0-9 _ - .\", applicationType);"}],"source_content_type":"text/x-java","patch_set":3,"id":"7a2fa921_e3b8e32c","line":48,"updated":"2015-10-13 08:25:11.000000000","message":"Please wrap.","commit_id":"a426d43b5390de38206272e63374dba37637429c"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"5aabe1d977d5311642ec4dc0fd0eab5216894adc","unresolved":false,"context_lines":[{"line_number":45,"context_line":"   */"},{"line_number":46,"context_line":"  public static void validate(String applicationType) {"},{"line_number":47,"context_line":"    if (applicationType.length() \u003e LogApiConstants.MAX_NAME_LENGTH)"},{"line_number":48,"context_line":"      throw Exceptions.unprocessableEntity(\"Application type %s must be %d characters or less\", applicationType, LogApiConstants.MAX_NAME_LENGTH);"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    if (!VALID_APPLICATION_TYPE.matcher(applicationType).matches())"},{"line_number":51,"context_line":"      throw Exceptions.unprocessableEntity(\"Application type %s may only contain: a-z A-Z 0-9 _ - .\", applicationType);"}],"source_content_type":"text/x-java","patch_set":3,"id":"5a2ca52d_bc3773af","line":48,"in_reply_to":"7a2fa921_e3b8e32c","updated":"2015-10-14 10:18:47.000000000","message":"Done","commit_id":"a426d43b5390de38206272e63374dba37637429c"}],"java/src/main/java/monasca/log/api/common/PayloadTransformer.java":[{"author":{"_account_id":16222,"name":"witek","email":"witold.bedyk@suse.com","username":"witek"},"change_message_id":"141572d0e8041cb49cb7f84765293ffd80c857e5","unresolved":false,"context_lines":[{"line_number":17,"context_line":"import javax.annotation.Nullable;"},{"line_number":18,"context_line":"import javax.ws.rs.core.MediaType;"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"import com.google.common.base.Function;"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"import monasca.log.api.model.Log;"},{"line_number":23,"context_line":""}],"source_content_type":"text/x-java","patch_set":3,"id":"7a2fa921_234b3b2d","line":20,"updated":"2015-10-13 08:25:11.000000000","message":"GJS","commit_id":"a426d43b5390de38206272e63374dba37637429c"}],"java/src/main/java/monasca/log/api/model/Log.java":[{"author":{"_account_id":16222,"name":"witek","email":"witold.bedyk@suse.com","username":"witek"},"change_message_id":"141572d0e8041cb49cb7f84765293ffd80c857e5","unresolved":false,"context_lines":[{"line_number":18,"context_line":"import java.util.HashMap;"},{"line_number":19,"context_line":"import java.util.Map;"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"import org.apache.commons.lang3.StringUtils;"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"/**"},{"line_number":24,"context_line":" * Represents a log."}],"source_content_type":"text/x-java","patch_set":3,"id":"7a2fa921_83e1ef00","line":21,"updated":"2015-10-13 08:25:11.000000000","message":"GJS","commit_id":"a426d43b5390de38206272e63374dba37637429c"},{"author":{"_account_id":16222,"name":"witek","email":"witold.bedyk@suse.com","username":"witek"},"change_message_id":"141572d0e8041cb49cb7f84765293ffd80c857e5","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    super(3);  // 3 fields at least"},{"line_number":46,"context_line":"  }"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"  public Log(final String applicationType, final Map\u003cString, String\u003e dimensions, final String message) {"},{"line_number":49,"context_line":"    this();"},{"line_number":50,"context_line":"    if (StringUtils.isNotEmpty(applicationType)) {"},{"line_number":51,"context_line":"      this.setApplicationType(applicationType);"}],"source_content_type":"text/x-java","patch_set":3,"id":"7a2fa921_23957b3f","line":48,"updated":"2015-10-13 08:25:11.000000000","message":"Please wrap.","commit_id":"a426d43b5390de38206272e63374dba37637429c"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"5aabe1d977d5311642ec4dc0fd0eab5216894adc","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    super(3);  // 3 fields at least"},{"line_number":46,"context_line":"  }"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"  public Log(final String applicationType, final Map\u003cString, String\u003e dimensions, final String message) {"},{"line_number":49,"context_line":"    this();"},{"line_number":50,"context_line":"    if (StringUtils.isNotEmpty(applicationType)) {"},{"line_number":51,"context_line":"      this.setApplicationType(applicationType);"}],"source_content_type":"text/x-java","patch_set":3,"id":"5a2ca52d_5c709f72","line":48,"in_reply_to":"7a2fa921_23957b3f","updated":"2015-10-14 10:18:47.000000000","message":"Done","commit_id":"a426d43b5390de38206272e63374dba37637429c"},{"author":{"_account_id":16222,"name":"witek","email":"witold.bedyk@suse.com","username":"witek"},"change_message_id":"141572d0e8041cb49cb7f84765293ffd80c857e5","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"  public Log setDimensions(final Map\u003cString, String\u003e dimensions) {"},{"line_number":62,"context_line":"    if (dimensions !\u003d null) {"},{"line_number":63,"context_line":"      this.put(\"dimensions\", dimensions);"},{"line_number":64,"context_line":"    }"},{"line_number":65,"context_line":"    return this;"},{"line_number":66,"context_line":"  }"}],"source_content_type":"text/x-java","patch_set":3,"id":"7a2fa921_23ca5b50","line":63,"updated":"2015-10-13 08:25:11.000000000","message":"Use the constant here as well.","commit_id":"a426d43b5390de38206272e63374dba37637429c"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"5aabe1d977d5311642ec4dc0fd0eab5216894adc","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"  public Log setDimensions(final Map\u003cString, String\u003e dimensions) {"},{"line_number":62,"context_line":"    if (dimensions !\u003d null) {"},{"line_number":63,"context_line":"      this.put(\"dimensions\", dimensions);"},{"line_number":64,"context_line":"    }"},{"line_number":65,"context_line":"    return this;"},{"line_number":66,"context_line":"  }"}],"source_content_type":"text/x-java","patch_set":3,"id":"5a2ca52d_3c736382","line":63,"in_reply_to":"7a2fa921_23ca5b50","updated":"2015-10-14 10:18:47.000000000","message":"Done","commit_id":"a426d43b5390de38206272e63374dba37637429c"}],"java/src/main/java/monasca/log/api/model/LogEnvelope.java":[{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"2d22502b4a97bde84ba60493d8ef661738a1a565","unresolved":false,"context_lines":[{"line_number":36,"context_line":"  public LogEnvelope(Log log) {"},{"line_number":37,"context_line":"    Preconditions.checkNotNull(log, \"log\");"},{"line_number":38,"context_line":"    this.log \u003d log;"},{"line_number":39,"context_line":"    this.creationTime \u003d DateTime.now(DateTimeZone.UTC).getMillis() / 1000;"},{"line_number":40,"context_line":"  }"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"  public LogEnvelope(Log log, Map\u003cString, Object\u003e meta) {"}],"source_content_type":"text/x-java","patch_set":1,"id":"ba15a1d1_a12259a1","line":39,"updated":"2015-09-17 17:06:45.000000000","message":"Just had a question on why you changed this?","commit_id":"76053b7d2df9ae3bc73115018d187b0d04aa20fd"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"929cae73dd28dbb198127931cb5e9133c7a41fcf","unresolved":false,"context_lines":[{"line_number":36,"context_line":"  public LogEnvelope(Log log) {"},{"line_number":37,"context_line":"    Preconditions.checkNotNull(log, \"log\");"},{"line_number":38,"context_line":"    this.log \u003d log;"},{"line_number":39,"context_line":"    this.creationTime \u003d DateTime.now(DateTimeZone.UTC).getMillis() / 1000;"},{"line_number":40,"context_line":"  }"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"  public LogEnvelope(Log log, Map\u003cString, Object\u003e meta) {"}],"source_content_type":"text/x-java","patch_set":1,"id":"ba15a1d1_0fea3d74","line":39,"in_reply_to":"ba15a1d1_a12259a1","updated":"2015-09-18 06:15:02.000000000","message":"I was not quite sure if System.currentTimeMillis returns UTC based time so I changed that line when I had to add @JsonProperty above. I later on checked that basically it is the same code since by default DateTime uses System#currentTimeMillis to instantiate new object. However currentTimeMillis is nothing more than number time since unix epoch - without any particular time zone as far as I know. The impulse to change that was actually other changes in different components where UTC was desired to have so I thought if so...let\u0027s make it explicit.","commit_id":"76053b7d2df9ae3bc73115018d187b0d04aa20fd"},{"author":{"_account_id":16222,"name":"witek","email":"witold.bedyk@suse.com","username":"witek"},"change_message_id":"141572d0e8041cb49cb7f84765293ffd80c857e5","unresolved":false,"context_lines":[{"line_number":19,"context_line":"import com.fasterxml.jackson.annotation.JsonProperty;"},{"line_number":20,"context_line":"import com.google.common.base.Preconditions;"},{"line_number":21,"context_line":"import org.joda.time.DateTime;"},{"line_number":22,"context_line":"import org.joda.time.DateTimeZone;"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"/**"},{"line_number":25,"context_line":" * A log envelope."}],"source_content_type":"text/x-java","patch_set":3,"id":"7a2fa921_03d87f1c","line":22,"updated":"2015-10-13 08:25:11.000000000","message":"GJS ;)","commit_id":"a426d43b5390de38206272e63374dba37637429c"}],"java/src/main/java/monasca/log/api/resource/LogResource.java":[{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"2d22502b4a97bde84ba60493d8ef661738a1a565","unresolved":false,"context_lines":[{"line_number":70,"context_line":"    LOGGER.debug(\"/single/{}\", tenantId);"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    if (!this.isDelegate(roles)) {"},{"line_number":73,"context_line":"      LOGGER.trace(String.format(\"/single/%s is not delegated request, checking for crossTenantIt\", tenantId));"},{"line_number":74,"context_line":"      if (!Strings.isNullOrEmpty(crossTenantId)) {"},{"line_number":75,"context_line":"        throw Exceptions.forbidden(\"Project %s cannot POST cross tenant metrics\", tenantId);"},{"line_number":76,"context_line":"      }"}],"source_content_type":"text/x-java","patch_set":1,"id":"ba15a1d1_50aea9e6","line":73,"updated":"2015-09-17 17:06:45.000000000","message":"spelling, crossTenantIt -\u003e crossTenantId","commit_id":"76053b7d2df9ae3bc73115018d187b0d04aa20fd"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"929cae73dd28dbb198127931cb5e9133c7a41fcf","unresolved":false,"context_lines":[{"line_number":70,"context_line":"    LOGGER.debug(\"/single/{}\", tenantId);"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    if (!this.isDelegate(roles)) {"},{"line_number":73,"context_line":"      LOGGER.trace(String.format(\"/single/%s is not delegated request, checking for crossTenantIt\", tenantId));"},{"line_number":74,"context_line":"      if (!Strings.isNullOrEmpty(crossTenantId)) {"},{"line_number":75,"context_line":"        throw Exceptions.forbidden(\"Project %s cannot POST cross tenant metrics\", tenantId);"},{"line_number":76,"context_line":"      }"}],"source_content_type":"text/x-java","patch_set":1,"id":"ba15a1d1_cf8765b3","line":73,"in_reply_to":"ba15a1d1_50aea9e6","updated":"2015-09-18 06:15:02.000000000","message":"Thank you :).","commit_id":"76053b7d2df9ae3bc73115018d187b0d04aa20fd"},{"author":{"_account_id":16222,"name":"witek","email":"witold.bedyk@suse.com","username":"witek"},"change_message_id":"141572d0e8041cb49cb7f84765293ffd80c857e5","unresolved":false,"context_lines":[{"line_number":104,"context_line":"  }"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"  private boolean isDelegate(final String roles) {"},{"line_number":107,"context_line":"    return !Strings.isNullOrEmpty(roles) \u0026\u0026 COMMA_SPLITTER.splitToList(roles).contains(MONITORING_DELEGATE_ROLE);"},{"line_number":108,"context_line":"  }"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"}"}],"source_content_type":"text/x-java","patch_set":3,"id":"7a2fa921_83d56fba","line":107,"updated":"2015-10-13 08:25:11.000000000","message":"Please wrap.","commit_id":"a426d43b5390de38206272e63374dba37637429c"}],"java/src/test/java/monasca/log/api/app/LogServiceTest.java":[{"author":{"_account_id":16222,"name":"witek","email":"witold.bedyk@suse.com","username":"witek"},"change_message_id":"141572d0e8041cb49cb7f84765293ffd80c857e5","unresolved":false,"context_lines":[{"line_number":48,"context_line":"  private Producer\u003cString, String\u003e producer;"},{"line_number":49,"context_line":"  private LogService logService;"},{"line_number":50,"context_line":"  private LogSerializer serializer;"},{"line_number":51,"context_line":"  private ObjectMapper objectMapper;"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"  @BeforeTest"},{"line_number":54,"context_line":"  @SuppressWarnings(\"unchecked\")"}],"source_content_type":"text/x-java","patch_set":3,"id":"7a2fa921_a362eb14","line":51,"updated":"2015-10-13 08:25:11.000000000","message":"not used","commit_id":"a426d43b5390de38206272e63374dba37637429c"}]}
