Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ Implementation`.
* [Cosium/maven-git-code-format](https://github.com/Cosium/maven-git-code-format):
A maven plugin that automatically deploys google-java-format as a
pre-commit git hook.
* SBT plugins
* [sbt/sbt-java-formatter](https://github.com/sbt/sbt-java-formatter)
* [maltzj/google-style-precommit-hook](https://github.com/maltzj/google-style-precommit-hook):
A pre-commit (pre-commit.com) hook that will automatically run GJF whenever
you commit code to your repository
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2542,18 +2542,20 @@ private void visitToDeclare(
String equals,
Optional<String> trailing) {
sync(node);
TypeWithDims extractedDims = DimensionHelpers.extractDims(node.getType(), SortedDims.YES);
Optional<TypeWithDims> typeWithDims = Optional.of(extractedDims);
declareOne(
kind,
annotationsDirection,
Optional.of(node.getModifiers()),
node.getType(),
extractedDims.node,
node.getName(),
"",
equals,
initializer,
trailing,
/* receiverExpression= */ Optional.empty(),
/* typeWithDims= */ Optional.empty());
typeWithDims);
}

/** Does not omit the leading '<', which should be associated with the type name. */
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;

@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
@interface MyTypeAnno {}

public class GjfFailure {
void m(int a @MyTypeAnno []) {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;

@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
@interface MyTypeAnno {}

public class GjfFailure {
void m(int a @MyTypeAnno []) {}
}