Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6255239
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T14:19:43+00:00 2026-05-24T14:19:43+00:00

FindBugs gives me a ‘ More arguments are passed than are actually used in

  • 0

FindBugs gives me a ‘More arguments are passed than are actually used in the format string‘ message on the following code:

String.format("00", bd.getHour())

bd.getHour() returns an int.

Can someone clarify this? My obective is to make sure that 1 digit ints are preceded by a 0 (1 ->01, 13->13…).

What is the right way to achieve this without getting a FindBugs message?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T14:19:44+00:00Added an answer on May 24, 2026 at 2:19 pm

    String.format() follows the rules of format string, so use:

    String.format("%02d", bd.getHour());
    

    Because your line, will just print 00 and ignore the added parameter.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my findbugs report I have a SIO_SUPERFLUOUS_INSTANCEOF correctness error in the following code
Findbugs gives me for public GsmSignalStrength clone() following warning: Class defines clone() but doesn't
I have a code piece that I am reviewing (using FindBugs ). public class
Are there any tools for performing static analysis of Scala code, similar to FindBugs
I want my findbugs report not show the following error: DM_NUMBER_CTOR: Method invokes inefficient
I run findbugs against all of my code and only tackle the top stuff.
OK, after reviewing some code with PMD and FindBugs code analyzers, i was able
I ran findbugs on our code base and it pointed out there are two
I am having findbugs error for the below code, if( obj instanceof CustomerData )
I am getting below bug from FindBugs, Found reliance on default encoding in MyClass.print(String):

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.