Skip to content

Commit

Permalink
Got code format as close as possible to netflix
Browse files Browse the repository at this point in the history
  • Loading branch information
velo committed Apr 28, 2016
1 parent 3da09fd commit 5c7f80b
Show file tree
Hide file tree
Showing 14 changed files with 104 additions and 80 deletions.
4 changes: 2 additions & 2 deletions .rultor.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#
# Copyright (C) 2016 Marvin H Froeder (marvin@marvinformatics.com)
# Copyright (C) 2016 Marvin Herman Froeder (marvin@marvinformatics.com)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#
# Copyright (C) 2016 Marvin H Froeder (marvin@marvinformatics.com)
# Copyright (C) 2016 Marvin Herman Froeder (marvin@marvinformatics.com)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
12 changes: 6 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2016 Marvin H Froeder (marvin@marvinformatics.com)
Copyright (C) 2016 Marvin Herman Froeder (marvin@marvinformatics.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand All @@ -30,7 +30,7 @@
<java.version>1.7</java.version>
</properties>

<dependencies>
<dependencies>
<dependency>
<groupId>com.netflix.feign</groupId>
<artifactId>feign-core</artifactId>
Expand All @@ -46,19 +46,19 @@
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.squareup.okhttp</groupId>
<artifactId>mockwebserver</artifactId>
<version>2.7.5</version>
<scope>test</scope>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>1.7.1</version>
<scope>test</scope>
<scope>test</scope>
</dependency>
</dependencies>

Expand Down
14 changes: 7 additions & 7 deletions src/config/eclipse/formatter/java.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
Copyright (C) 2016 Marvin H Froeder (marvin@marvinformatics.com)
Copyright (C) 2016 Marvin Herman Froeder (marvin@marvinformatics.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand All @@ -17,7 +17,7 @@
-->
<profiles version="12">
<profile kind="CodeFormatterProfile" name="orient-gremlin" version="12">
<profile kind="CodeFormatterProfile" name="feign" version="12">
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="insert"/>
Expand All @@ -34,15 +34,15 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="4"/>
<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="2"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/>
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="2"/>
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="4"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/>
Expand Down Expand Up @@ -96,7 +96,7 @@
<setting id="org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
Expand Down Expand Up @@ -183,7 +183,7 @@
<setting id="org.eclipse.jdt.core.compiler.source" value="1.8"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="4"/>
<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="2"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
Expand Down
4 changes: 2 additions & 2 deletions src/config/eclipse/formatter/javascript.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
Copyright (C) 2016 Marvin H Froeder (marvin@marvinformatics.com)
Copyright (C) 2016 Marvin Herman Froeder (marvin@marvinformatics.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/feign/jackson/JacksonDecoder.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2013 Netflix, Inc.
/**
* Copyright (C) 2016 Marvin Herman Froeder (marvin@marvinformatics.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -40,7 +40,7 @@ public JacksonDecoder() {

public JacksonDecoder(Iterable<Module> modules) {
this(new ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
.registerModules(modules));
.registerModules(modules));
}

public JacksonDecoder(ObjectMapper mapper) {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/feign/jackson/JacksonEncoder.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2013 Netflix, Inc.
/**
* Copyright (C) 2016 Marvin Herman Froeder (marvin@marvinformatics.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/feign/assertj/FeignAssertions.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015 Netflix, Inc.
/**
* Copyright (C) 2016 Marvin Herman Froeder (marvin@marvinformatics.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/feign/assertj/MockWebServerAssertions.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015 Netflix, Inc.
/**
* Copyright (C) 2016 Marvin Herman Froeder (marvin@marvinformatics.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
12 changes: 5 additions & 7 deletions src/test/java/feign/assertj/RecordedRequestAssert.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015 Netflix, Inc.
/**
* Copyright (C) 2016 Marvin Herman Froeder (marvin@marvinformatics.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -41,7 +41,7 @@
import static org.assertj.core.error.ShouldNotContain.shouldNotContain;

public final class RecordedRequestAssert
extends AbstractAssert<RecordedRequestAssert, RecordedRequest> {
extends AbstractAssert<RecordedRequestAssert, RecordedRequest> {

ByteArrays arrays = ByteArrays.instance();
Objects objects = Objects.instance();
Expand Down Expand Up @@ -75,8 +75,7 @@ public RecordedRequestAssert hasGzippedBody(byte[] expectedUncompressed) {
byte[] compressedBody = actual.getBody().readByteArray();
byte[] uncompressedBody;
try {
uncompressedBody =
Util.toByteArray(new GZIPInputStream(new ByteArrayInputStream(compressedBody)));
uncompressedBody = Util.toByteArray(new GZIPInputStream(new ByteArrayInputStream(compressedBody)));
} catch (IOException e) {
throw new RuntimeException(e);
}
Expand All @@ -89,8 +88,7 @@ public RecordedRequestAssert hasDeflatedBody(byte[] expectedUncompressed) {
byte[] compressedBody = actual.getBody().readByteArray();
byte[] uncompressedBody;
try {
uncompressedBody =
Util.toByteArray(new InflaterInputStream(new ByteArrayInputStream(compressedBody)));
uncompressedBody = Util.toByteArray(new InflaterInputStream(new ByteArrayInputStream(compressedBody)));
} catch (IOException e) {
throw new RuntimeException(e);
}
Expand Down
6 changes: 3 additions & 3 deletions src/test/java/feign/assertj/RequestTemplateAssert.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015 Netflix, Inc.
/**
* Copyright (C) 2016 Marvin Herman Froeder (marvin@marvinformatics.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -26,7 +26,7 @@
import static feign.Util.UTF_8;

public final class RequestTemplateAssert
extends AbstractAssert<RequestTemplateAssert, RequestTemplate> {
extends AbstractAssert<RequestTemplateAssert, RequestTemplate> {

ByteArrays arrays = ByteArrays.instance();
Objects objects = Objects.instance();
Expand Down
Loading

0 comments on commit 5c7f80b

Please sign in to comment.