forked from phoedos/pmd
Merge branch 'pmd/5.3.x'
This commit is contained in:
@ -2,7 +2,9 @@ language: java
|
||||
matrix:
|
||||
include:
|
||||
- jdk: oraclejdk7
|
||||
script: mvn test deploy --settings .travis-settings.xml
|
||||
script:
|
||||
- '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && mvn test deploy --settings .travis-settings.xml'
|
||||
- '[ "${TRAVIS_PULL_REQUEST}" = "false" ] || mvn test'
|
||||
- jdk: oraclejdk8
|
||||
script: mvn test
|
||||
notifications:
|
||||
|
@ -302,6 +302,7 @@ echo " * Set the title: PMD ${RELEASE_VERSION} ($(date -u +%d-%B-%Y))"
|
||||
echo " * copy/paste the changelog.md"
|
||||
echo " * Upload the binary zip file"
|
||||
echo " * Upload the doc zip file"
|
||||
echo " * Upload the src zip file"
|
||||
echo
|
||||
echo "Press enter to continue..."
|
||||
read
|
||||
|
@ -100,7 +100,7 @@ public class RedundantFieldInitializerRule extends AbstractJavaRule {
|
||||
value = (int) literal.getImage().charAt(1);
|
||||
}
|
||||
|
||||
if (value.intValue() == 0) {
|
||||
if (value.longValue() == 0) {
|
||||
addViolation(data, variableDeclarator);
|
||||
}
|
||||
}
|
||||
|
@ -278,7 +278,8 @@ public class Foo {
|
||||
class="net.sourceforge.pmd.lang.rule.XPathRule"
|
||||
externalInfoUrl="${pmd.website.baseurl}/rules/java/controversial.html#DefaultPackage">
|
||||
<description>
|
||||
Use explicit scoping instead of the default package private level.
|
||||
Use explicit scoping instead of accidental usage of default package private level.
|
||||
The rule allows methods and fields annotated with Guava's @VisibleForTesting.
|
||||
</description>
|
||||
<priority>3</priority>
|
||||
<properties>
|
||||
|
@ -1292,4 +1292,14 @@ public class Bar {
|
||||
}
|
||||
</code>
|
||||
</test-code>
|
||||
|
||||
<test-code>
|
||||
<description>#1418 RedundantFieldInitializer false positive with large long value</description>
|
||||
<expected-problems>0</expected-problems>
|
||||
<code><![CDATA[
|
||||
public class SomeClass {
|
||||
private long someNumber = 0x100000000000L;
|
||||
}
|
||||
]]></code>
|
||||
</test-code>
|
||||
</test-data>
|
||||
|
@ -4,6 +4,34 @@ Previous versions of PMD can be downloaded here:
|
||||
http://sourceforge.net/projects/pmd/files/pmd/
|
||||
|
||||
|
||||
## 04-October-2015 - 5.3.5
|
||||
|
||||
**Modified Rules:**
|
||||
|
||||
* java-design/CloseResource: New Property *closeAsDefaultTarget* which is *true* by default to stay
|
||||
backwards compatible. If this property is *true*, the rule will make sure, that `close` itself is
|
||||
always considered as a *closeTarget* - no matter whether it is configured with the *closeTargets* property
|
||||
or not.
|
||||
|
||||
**Pull Requests:**
|
||||
|
||||
* [#71](https://github.com/pmd/pmd/pull/71): #1410 Improve description of DefaultPackage rule
|
||||
|
||||
**Bugfixes:**
|
||||
|
||||
* java-controversial/DefaultPackage:
|
||||
* [#1410](https://sourceforge.net/p/pmd/bugs/1410/): DefaultPackage triggers on field annotated with @VisibleForTesting
|
||||
* java-design/CloseResource:
|
||||
* [#1387](https://sourceforge.net/p/pmd/bugs/1387/): CloseResource has false positive for ResultSet
|
||||
* java-optimizations/RedundantFieldInitializer
|
||||
* [#1418](https://sourceforge.net/p/pmd/bugs/1418/): RedundantFieldInitializer false positive with large long value
|
||||
* java-strings/InsufficientStringBufferDeclaration:
|
||||
* [#1409](https://sourceforge.net/p/pmd/bugs/1409/): NullPointerException in InsufficientStringBufferRule
|
||||
* [#1413](https://sourceforge.net/p/pmd/bugs/1413/): False positive StringBuffer constructor with ?: int value
|
||||
* java-unnecessary/UselessParentheses:
|
||||
* [#1407](https://sourceforge.net/p/pmd/bugs/1407/): UselessParentheses "&" and "+" operator precedence
|
||||
|
||||
|
||||
## 18-September-2015 - 5.3.4
|
||||
|
||||
**Bugfixes:**
|
||||
|
Reference in New Issue
Block a user