lightblue-platform / lightblue-migrator

GNU General Public License v3.0
3 stars 13 forks source link

CID 114405: API usage errors (WRONG_METHOD) #375

Open jewzaam opened 8 years ago

jewzaam commented 8 years ago

https://scan.coverity.com/projects/lightblue-platform-lightblue

*** CID 114405:  API usage errors  (WRONG_METHOD)
/lightblue-migrator/lightblue-migration-monitor/src/main/java/com/redhat/lightblue/migrator/monitor/MonitorConfiguration.java: 84 in com.redhat.lightblue.migrator.monitor.MonitorConfiguration.applyProperties(java.util.Properties)()
78         public void applyProperties(Properties p) {
79             String s = p.getProperty("config");
80             if (s != null) {
81                 setClientConfig(s);
82             }
83
>>>     CID 114405:  API usage errors  (WRONG_METHOD)
>>>     The method "java.lang.Integer.getInteger(java.lang.String)" expects its argument to name a system property, but the argument "p.getProperty("periods")" does not seem to represent such a name.
84             Integer periods = Integer.getInteger(p.getProperty("periods"));
85             if(periods != null){
86                 setPeriods(periods);
87             }
88         }
89