You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@accumulo.apache.org by Josh Elser <jo...@gmail.com> on 2015/10/19 00:06:36 UTC

Problems with maven-java-formatter-plugin causing master builds to fail.

It seems like the current version of maven-java-formatter-plugin that we 
depend on is adding in trailing whitespace to fate/**/ZooCache.java 
which is then causing the checkstyle verification to fail the build.

An example: 
https://secure.penguinsinabox.com/jenkins/job/Accumulo-Integration-Tests/359/console

The repository doesn't contain any trailing whitespace on L239, yet on 
my build machine:

diff --git 
a/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooCache.java 
b/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooCache.java
index 8c9f80d..33e5261 100644
--- a/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooCache.java
+++ b/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooCache.java
@@ -290,7 +290,7 @@ public class ZooCache {
          /*
           * The following call to exists() is important, since we are 
caching that a node does not exist. Once the node comes into existence, 
it will be added to
           * the cache. But this notification of a node coming into 
existence will only be given if exists() was previously called.
-         *
+         *
           * If the call to exists() is bypassed and only getData() is 
called with a special case that looks for Code.NONODE in the 
KeeperException, then
           * non-existence can not be cached.
           */

@Christopher, is this a bug in your plugin? Maybe the underlying 
formatter itself?

Re: Problems with maven-java-formatter-plugin causing master builds to fail.

Posted by Josh Elser <jo...@gmail.com>.
Thanks. Fixed in https://issues.apache.org/jira/browse/ACCUMULO-4033

Christopher wrote:
> Or make it a javadoc comment.
>
> On Sun, Oct 18, 2015, 18:12 Christopher<ct...@apache.org>  wrote:
>
>> It's a bug in the formatter. The fix is to avoid newlines in multi-line
>> non-javadoc comments. You could switch to // comments or remove the blank
>> line.
>>
>> On Sun, Oct 18, 2015, 18:06 Josh Elser<jo...@gmail.com>  wrote:
>>
>>> It seems like the current version of maven-java-formatter-plugin that we
>>> depend on is adding in trailing whitespace to fate/**/ZooCache.java
>>> which is then causing the checkstyle verification to fail the build.
>>>
>>> An example:
>>>
>>> https://secure.penguinsinabox.com/jenkins/job/Accumulo-Integration-Tests/359/console
>>>
>>> The repository doesn't contain any trailing whitespace on L239, yet on
>>> my build machine:
>>>
>>> diff --git
>>> a/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooCache.java
>>> b/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooCache.java
>>> index 8c9f80d..33e5261 100644
>>> --- a/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooCache.java
>>> +++ b/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooCache.java
>>> @@ -290,7 +290,7 @@ public class ZooCache {
>>>            /*
>>>             * The following call to exists() is important, since we are
>>> caching that a node does not exist. Once the node comes into existence,
>>> it will be added to
>>>             * the cache. But this notification of a node coming into
>>> existence will only be given if exists() was previously called.
>>> -         *
>>> +         *
>>>             * If the call to exists() is bypassed and only getData() is
>>> called with a special case that looks for Code.NONODE in the
>>> KeeperException, then
>>>             * non-existence can not be cached.
>>>             */
>>>
>>> @Christopher, is this a bug in your plugin? Maybe the underlying
>>> formatter itself?
>>>
>

Re: Problems with maven-java-formatter-plugin causing master builds to fail.

Posted by Christopher <ct...@apache.org>.
Or make it a javadoc comment.

On Sun, Oct 18, 2015, 18:12 Christopher <ct...@apache.org> wrote:

> It's a bug in the formatter. The fix is to avoid newlines in multi-line
> non-javadoc comments. You could switch to // comments or remove the blank
> line.
>
> On Sun, Oct 18, 2015, 18:06 Josh Elser <jo...@gmail.com> wrote:
>
>> It seems like the current version of maven-java-formatter-plugin that we
>> depend on is adding in trailing whitespace to fate/**/ZooCache.java
>> which is then causing the checkstyle verification to fail the build.
>>
>> An example:
>>
>> https://secure.penguinsinabox.com/jenkins/job/Accumulo-Integration-Tests/359/console
>>
>> The repository doesn't contain any trailing whitespace on L239, yet on
>> my build machine:
>>
>> diff --git
>> a/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooCache.java
>> b/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooCache.java
>> index 8c9f80d..33e5261 100644
>> --- a/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooCache.java
>> +++ b/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooCache.java
>> @@ -290,7 +290,7 @@ public class ZooCache {
>>           /*
>>            * The following call to exists() is important, since we are
>> caching that a node does not exist. Once the node comes into existence,
>> it will be added to
>>            * the cache. But this notification of a node coming into
>> existence will only be given if exists() was previously called.
>> -         *
>> +         *
>>            * If the call to exists() is bypassed and only getData() is
>> called with a special case that looks for Code.NONODE in the
>> KeeperException, then
>>            * non-existence can not be cached.
>>            */
>>
>> @Christopher, is this a bug in your plugin? Maybe the underlying
>> formatter itself?
>>
>

Re: Problems with maven-java-formatter-plugin causing master builds to fail.

Posted by Christopher <ct...@apache.org>.
It's a bug in the formatter. The fix is to avoid newlines in multi-line
non-javadoc comments. You could switch to // comments or remove the blank
line.

On Sun, Oct 18, 2015, 18:06 Josh Elser <jo...@gmail.com> wrote:

> It seems like the current version of maven-java-formatter-plugin that we
> depend on is adding in trailing whitespace to fate/**/ZooCache.java
> which is then causing the checkstyle verification to fail the build.
>
> An example:
>
> https://secure.penguinsinabox.com/jenkins/job/Accumulo-Integration-Tests/359/console
>
> The repository doesn't contain any trailing whitespace on L239, yet on
> my build machine:
>
> diff --git
> a/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooCache.java
> b/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooCache.java
> index 8c9f80d..33e5261 100644
> --- a/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooCache.java
> +++ b/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooCache.java
> @@ -290,7 +290,7 @@ public class ZooCache {
>           /*
>            * The following call to exists() is important, since we are
> caching that a node does not exist. Once the node comes into existence,
> it will be added to
>            * the cache. But this notification of a node coming into
> existence will only be given if exists() was previously called.
> -         *
> +         *
>            * If the call to exists() is bypassed and only getData() is
> called with a special case that looks for Code.NONODE in the
> KeeperException, then
>            * non-existence can not be cached.
>            */
>
> @Christopher, is this a bug in your plugin? Maybe the underlying
> formatter itself?
>