GithubHelp home page GithubHelp logo

Comments (10)

jflecomte avatar jflecomte commented on June 9, 2024 3

I have the same issue. My OS (Windows 10) is configured in french. I was able to workaround the issue by configuring the language like this:

         <plugins>
            <plugin>
                <groupId>com.github.spotbugs</groupId>
                <artifactId>spotbugs-maven-plugin</artifactId>
                <configuration>
                    <jvmArgs>-Duser.language=en</jvmArgs>
                </configuration>
            </plugin>
        </plugins>

To reproduce the error you can set "fr" instead of "en" and run "mvn install site" on a project that contains issues detected by SpotBug.

from spotbugs-maven-plugin.

hazendaz avatar hazendaz commented on June 9, 2024 1

I'm not very good with groovy :( I took a stab at fixing the issue. I can get the xml to generate with the xml declaration but then it fails later when running a slurper against it as the declaration tag is not allowed. As the spotbugsXml.xml is just a smaller cut of spotbugsTemp.xml, I suspect that portion of the code is actually correct. It's possible later on it must be interpretted differently.

from spotbugs-maven-plugin.

KengoTODA avatar KengoTODA commented on June 9, 2024

Have you tried https://maven.apache.org/plugins/maven-site-plugin/site-mojo.html#inputEncoding ?

It's also nice to have minimum project that can reproduce your problem.

from spotbugs-maven-plugin.

LoloDigi avatar LoloDigi commented on June 9, 2024

Yes I did, with many values (ISO-8859-1, CP1252, UTF-8, ...) and combinations with many "outputEncoding" also.
Perhaps most of projects are working in UTF-8...

from spotbugs-maven-plugin.

hazendaz avatar hazendaz commented on June 9, 2024

@LoloDigi Can you provide a sample project that causes this issue?

It is true most projects are UTF-8 as that is the universal standard. You might want to determine a specific reason why your code base wants to use a legacy character encoding. Generally I've seen that used just due to improper setup when UTF-8 was fine but certainly we should work with any and a sample will help us better isolate the issue. Thanks in advance!

from spotbugs-maven-plugin.

LoloDigi avatar LoloDigi commented on June 9, 2024

capture
What do you need exactly ?
Here the content of the XML generated by spotbugs maven plugin.

`
D:\workspaceSts\courrier-project\flowbean-grc-core\target\classesC:\Users\L.GUIRAUD.m2\repository\com\akazi\flowmind\lib\fm-core\7.6.24\fm-core-7.6.24.jarC:\Users\L.GUIRAUD.m2\repository\org\slf4j\slf4j-api\1.7.25\slf4j-api-1.7.25.jarC:\Users\L.GUIRAUD.m2\repository\com\akazi\flowmind\lib\fm-common\7.6.24\fm-common-7.6.24.jarC:\Users\L.GUIRAUD.m2\repository\commons-lang\commons-lang\2.6\commons-lang-2.6.jarC:\Users\L.GUIRAUD.m2\repository\com\akazi\flowmind\lib\fm-basic\7.6.24\fm-basic-7.6.24.jarC:\Users\L.GUIRAUD.m2\repository\com\akazi\flowmind\lib\fm-util\7.6.24\fm-util-7.6.24.jarC:\Users\L.GUIRAUD.m2\repository\org\exolab\castor\0.9.3.21-flowmind\castor-0.9.3.21-flowmind.jarC:\Users\L.GUIRAUD.m2\repository\org\apache\velocity\velocity\1.6.4\velocity-1.6.4.jarC:\Users\L.GUIRAUD.m2\repository\oro\oro\2.0.8\oro-2.0.8.jarC:\Users\L.GUIRAUD.m2\repository\commons-beanutils\commons-beanutils\1.9.2\commons-beanutils-1.9.2.jarC:\Users\L.GUIRAUD.m2\repository\commons-logging\commons-logging\99.0-does-not-exist\commons-logging-99.0-does-not-exist.jarC:\Users\L.GUIRAUD.m2\repository\javax\activation\activation\1.1\activation-1.1.jarC:\Users\L.GUIRAUD.m2\repository\commons-collections\commons-collections\3.1\commons-collections-3.1.jarC:\Users\L.GUIRAUD.m2\repository\com\akazi\flowmind\lib\fm-gui\7.6.24\fm-gui-7.6.24.jarC:\Users\L.GUIRAUD.m2\repository\com\akazi\flowmind\api\fm-api-interaction\7.6.24\fm-api-interaction-7.6.24.jarC:\Users\L.GUIRAUD.m2\repository\com\akazi\flowmind\lib\fm-data\7.6.24\fm-data-7.6.24.jarC:\Users\L.GUIRAUD.m2\repository\com\akazi\flowmind\lib\fm-antlr\7.6.24\fm-antlr-7.6.24.jarC:\Users\L.GUIRAUD.m2\repository\org\json\json\20140107\json-20140107.jarC:\Users\L.GUIRAUD.m2\repository\com\ibm\icu\icu4j\53.1\icu4j-53.1.jarD:\workspaceSts\courrier-project\flowbean-grc-core\src\main\javaD:\workspaceSts\courrier-project\flowbean-grc-core\targetLa m�thode clone() n'appelle pas super.clone()La m�thode clone() com.digitech.flowmind.object.DiffusionObject.clone() n'appelle pas super.clone()At DiffusionObject.java:[lines 25-403]In class com.digitech.flowmind.object.DiffusionObjectIn method com.digitech.flowmind.object.DiffusionObject.clone()At DiffusionObject.java:[line 169]Bad practiceLa m�thode clone() n'appelle pas super.clone()

<p>Cette classe d�finit une m�thode <code>clone()</code> qui n'appelle pas <code>super.clone()</code>, et n'est pas finale. Si cette classe ("<i>A</i>") est �tendue par une classe fille ("<i>B</i>"), et que la classe fille <i>B</i> appelle <code>super.clone()</code>, alors il est probable que la m�thode <code>clone()</code> de <i>B</i> retournera un objet de type <i>A</i>, ce qui viole le contrat standard de <code>clone()</code>.</p>
<p>Si toutes les m�thodes <code>clone()</code> appellent <code>super.clone()</code>, elles ont alors la garantie d'utiliser <code>Object.clone()</code>, qui retourne toujours un objet du type correct.</p>

Mauvaise impl�mentation de l'idiome Cloneable`

I put a screenshot for the 'real' display in my intellij. And as text for all the content :

spotbugsXml.txt

from spotbugs-maven-plugin.

hazendaz avatar hazendaz commented on June 9, 2024

A small sample project that also has the issue, simple hello world will do.

from spotbugs-maven-plugin.

hazendaz avatar hazendaz commented on June 9, 2024

@jflecomte Thanks, I'll take a deeper look as soon as I can.

from spotbugs-maven-plugin.

LoloDigi avatar LoloDigi commented on June 9, 2024

@jflecomte The workaround is working great.
Thank you for your support !

from spotbugs-maven-plugin.

hazendaz avatar hazendaz commented on June 9, 2024

Issue resolved and will be available in plugin for spotbugs 4.0.0.

from spotbugs-maven-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.