private boolean processRobot ( String useragent , UserAgentInfo retObj ) { try { lock . lock ( ) ; if ( robotsMap . containsKey ( useragent ) ) { retObj . setTyp ( "Robot" ) ; RobotEntry robotEntry = robotsMap . get ( useragent ) ; robotEntry . copyTo ( retObj ) ; if ( robotEntry . getOsId ( ) != null ) { OsEntry os = osMap . get ( robotEntry . getOsId ( ) ) ; if ( os != null ) { os . copyTo ( retObj ) ; } } return true ; } } finally { lock . unlock ( ) ; } return false ; }
Checks if the useragent comes from a robot . if yes copies all the data to the result object