Commit 94aa1cf750d06ccae0387ce2d08e3fa620e38ea0
- Diff rendering mode:
- inline
- side by side
addon-cloud-foundry/src/main/java/org/springframework/roo/addon/cloud/foundry/CloudFoundryOperationsImpl.java
(6 / 6)
|   | |||
| 104 | 104 | public void execute() throws Exception { | |
| 105 | 105 | List<ServiceConfiguration> globalServices = client.getServiceConfigurations(); | |
| 106 | 106 | List<CloudService> localServices = client.getServices(); | |
| 107 | if (globalServices.size() == 0) { | ||
| 107 | if (globalServices.isEmpty()) { | ||
| 108 | 108 | logger.info("There are currently no services available."); | |
| 109 | 109 | } else { | |
| 110 | 110 | ShellTableRenderer table = new ShellTableRenderer("System Services", "Service", "Version", "Description"); | |
| … | … | ||
| 114 | 114 | logger.info(table.getOutput()); | |
| 115 | 115 | } | |
| 116 | 116 | ||
| 117 | if (localServices.size() == 0) { | ||
| 117 | if (localServices.isEmpty()) { | ||
| 118 | 118 | logger.info("There are currently no provisioned services."); | |
| 119 | 119 | } else { | |
| 120 | 120 | ShellTableRenderer table = new ShellTableRenderer("Provisioned Services", "Name", "Service"); | |
| … | … | ||
| 188 | 188 | @Override | |
| 189 | 189 | public void execute() throws Exception { | |
| 190 | 190 | List<CloudApplication> applications = client.getApplications(); | |
| 191 | if (applications.size() == 0) { | ||
| 191 | if (applications.isEmpty()) { | ||
| 192 | 192 | logger.info("No applications available."); | |
| 193 | 193 | return; | |
| 194 | 194 | } | |
| … | … | ||
| 309 | 309 | Integer instances = getInteger(number); | |
| 310 | 310 | if (instances == null) { | |
| 311 | 311 | InstancesInfo instancesInfo = client.getApplicationInstances(appName); | |
| 312 | if (instancesInfo.getInstances().size() == 0) { | ||
| 312 | if (instancesInfo.getInstances().isEmpty()) { | ||
| 313 | 313 | logger.info("No running instances for '" + appName + "'"); | |
| 314 | 314 | } | |
| 315 | 315 | } else { | |
| … | … | ||
| 342 | 342 | logger.severe(this.failureMessage); | |
| 343 | 343 | return; | |
| 344 | 344 | } | |
| 345 | if (crashes.getCrashes().size() == 0) { | ||
| 345 | if (crashes.getCrashes().isEmpty()) { | ||
| 346 | 346 | logger.info("The application '" + appName + "' has never crashed"); | |
| 347 | 347 | return; | |
| 348 | 348 | } | |
| … | … | ||
| 406 | 406 | @Override | |
| 407 | 407 | public void execute() throws Exception { | |
| 408 | 408 | ApplicationStats stats = client.getApplicationStats(appName); | |
| 409 | if (stats.getRecords().size() == 0) { | ||
| 409 | if (stats.getRecords().isEmpty()) { | ||
| 410 | 410 | logger.info("There is currently no stats for the application '" + appName + "'"); | |
| 411 | 411 | return; | |
| 412 | 412 | } |
addon-cloud-foundry/src/main/java/org/springframework/roo/addon/cloud/foundry/ShellTableRenderer.java
(1 / 1)
|   | |||
| 25 | 25 | } | |
| 26 | 26 | ||
| 27 | 27 | public void addColumn(String heading) { | |
| 28 | int position = columnMap.size() == 0 ? 0 : columnMap.size(); | ||
| 28 | int position = columnMap.isEmpty() ? 0 : columnMap.size(); | ||
| 29 | 29 | List<String> list = new ArrayList<String>(); | |
| 30 | 30 | list.add(heading); | |
| 31 | 31 | list.add(getUnderline(heading.length())); |
addon-cloud-foundry/src/main/java/org/springframework/roo/addon/cloud/foundry/converter/CloudDeployableFileConverter.java
(1 / 1)
|   | |||
| 72 | 72 | String rootPath = projectOperations.getPathResolver().getRoot(Path.ROOT); | |
| 73 | 73 | Set<FileDetails> fileDetails = fileManager.findMatchingAntPath(rootPath + "/**/*.war"); | |
| 74 | 74 | ||
| 75 | if (fileDetails.size() == 0) { | ||
| 75 | if (fileDetails.isEmpty()) { | ||
| 76 | 76 | logger.warning("No deployable files found in the project directory. Please use the '" + CREATE_OPTION + "' option to build the war."); | |
| 77 | 77 | completions.add(CREATE_OPTION); | |
| 78 | 78 | } |
addon-entity/src/main/java/org/springframework/roo/addon/entity/EntityMetadata.java
(1 / 1)
|   | |||
| 321 | 321 | return null; | |
| 322 | 322 | } | |
| 323 | 323 | ||
| 324 | if (governorTypeDetails.getDeclaredConstructors().size() == 0) { | ||
| 324 | if (governorTypeDetails.getDeclaredConstructors().isEmpty()) { | ||
| 325 | 325 | // Default constructor will apply, so quit | |
| 326 | 326 | return null; | |
| 327 | 327 | } |
addon-gwt/src/main/java/org/springframework/roo/addon/gwt/GwtTypeServiceImpl.java
(1 / 1)
|   | |||
| 526 | 526 | } | |
| 527 | 527 | ||
| 528 | 528 | private boolean isPublicAccessor(MethodMetadata method) { | |
| 529 | return Modifier.isPublic(method.getModifier()) && !method.getReturnType().equals(JavaType.VOID_PRIMITIVE) && method.getParameterTypes().size() == 0 && (method.getMethodName().getSymbolName().startsWith("get")); | ||
| 529 | return Modifier.isPublic(method.getModifier()) && !method.getReturnType().equals(JavaType.VOID_PRIMITIVE) && method.getParameterTypes().isEmpty() && (method.getMethodName().getSymbolName().startsWith("get")); | ||
| 530 | 530 | } | |
| 531 | 531 | ||
| 532 | 532 | private boolean isDomainObject(JavaType returnType, PhysicalTypeMetadata ptmd) { |
addon-roobot-client/src/main/java/org/springframework/roo/addon/roobot/client/AddOnRooBotOperationsImpl.java
(4 / 4)
|   | |||
| 265 | 265 | if (maxResults < 1) { | |
| 266 | 266 | maxResults = 10; | |
| 267 | 267 | } | |
| 268 | if (bundleCache.size() == 0) { | ||
| 268 | if (bundleCache.isEmpty()) { | ||
| 269 | 269 | // We should refresh regardless in this case | |
| 270 | 270 | refresh = true; | |
| 271 | 271 | } | |
| … | … | ||
| 311 | 311 | ||
| 312 | 312 | public void listAddOns(boolean refresh, int linesPerResult, int maxResults, boolean trustedOnly, boolean compatibleOnly, boolean communityOnly, String requiresCommand) { | |
| 313 | 313 | synchronized (mutex) { | |
| 314 | if (bundleCache.size() == 0) { | ||
| 314 | if (bundleCache.isEmpty()) { | ||
| 315 | 315 | // We should refresh regardless in this case | |
| 316 | 316 | refresh = true; | |
| 317 | 317 | } | |
| … | … | ||
| 509 | 509 | ArrayList<String> split = new ArrayList<String>(Arrays.asList(latest.getDescription().split("\\s"))); | |
| 510 | 510 | int lpr = linesPerResult; | |
| 511 | 511 | while (split.size() > 0 && --lpr >= 0) { | |
| 512 | while (!(split.size() == 0) && ((split.get(0).length() + sb.length()) < (lpr == 0 ? 77 : 80))) { | ||
| 512 | while (!(split.isEmpty()) && ((split.get(0).length() + sb.length()) < (lpr == 0 ? 77 : 80))) { | ||
| 513 | 513 | sb.append(split.get(0)).append(" "); | |
| 514 | 514 | split.remove(0); | |
| 515 | 515 | } | |
| … | … | ||
| 726 | 726 | } | |
| 727 | 727 | } else { | |
| 728 | 728 | while (split.size() > 0) { | |
| 729 | while (!(split.size() == 0) && ((split.get(0).length() + sb.length()) < 79)) { | ||
| 729 | while (!(split.isEmpty()) && ((split.get(0).length() + sb.length()) < 79)) { | ||
| 730 | 730 | sb.append(split.get(0)).append(" "); | |
| 731 | 731 | split.remove(0); | |
| 732 | 732 | } |
addon-security/src/main/java/org/springframework/roo/addon/security/SecurityOperationsImpl.java
(1 / 1)
|   | |||
| 43 | 43 | public boolean isInstallSecurityAvailable() { | |
| 44 | 44 | // Do not permit installation unless they have a web project (as per ROO-342) | |
| 45 | 45 | // and only permit installation if they don't already have some version of Spring Security installed | |
| 46 | return projectOperations.isProjectAvailable() && fileManager.exists(projectOperations.getPathResolver().getIdentifier(Path.SRC_MAIN_WEBAPP, "/WEB-INF/web.xml")) && projectOperations.getProjectMetadata().getDependenciesExcludingVersion(new Dependency("org.springframework.security", "spring-security-core", SECURITY_VERSION)).size() == 0; | ||
| 46 | return projectOperations.isProjectAvailable() && fileManager.exists(projectOperations.getPathResolver().getIdentifier(Path.SRC_MAIN_WEBAPP, "/WEB-INF/web.xml")) && projectOperations.getProjectMetadata().getDependenciesExcludingVersion(new Dependency("org.springframework.security", "spring-security-core", SECURITY_VERSION)).isEmpty(); | ||
| 47 | 47 | } | |
| 48 | 48 | ||
| 49 | 49 | public void installSecurity() { |
addon-solr/src/main/java/org/springframework/roo/addon/solr/SolrMetadataProvider.java
(1 / 1)
|   | |||
| 115 | 115 | } | |
| 116 | 116 | ||
| 117 | 117 | private boolean isMethodOfInterest(MethodMetadata method) { | |
| 118 | return method.getMethodName().getSymbolName().startsWith("get") && method.getParameterTypes().size() == 0 && Modifier.isPublic(method.getModifier()); | ||
| 118 | return method.getMethodName().getSymbolName().startsWith("get") && method.getParameterTypes().isEmpty() && Modifier.isPublic(method.getModifier()); | ||
| 119 | 119 | } | |
| 120 | 120 | ||
| 121 | 121 | public String getItdUniquenessFilenameSuffix() { |
addon-web-mvc-controller/src/main/java/org/springframework/roo/addon/web/mvc/controller/details/JavaTypePersistenceMetadataDetails.java
(2 / 0)
|   | |||
| 17 | 17 | private FieldMetadata identifierField; | |
| 18 | 18 | private MethodMetadata identifierAccessorMethod; | |
| 19 | 19 | private MethodMetadata versionAccessorMethod; | |
| 20 | |||
| 20 | 21 | private MethodMetadata persistMethod; | |
| 21 | 22 | private MethodMetadata mergeMethod; | |
| 22 | 23 | private MethodMetadata removeMethod; | |
| … | … | ||
| 25 | 25 | private MethodMetadata findMethod; | |
| 26 | 26 | private MethodMetadata countMethod; | |
| 27 | 27 | private MethodMetadata findEntriesMethod; | |
| 28 | |||
| 28 | 29 | private List<String> finderNames; | |
| 29 | 30 | private boolean isRooIdentifier; | |
| 30 | 31 | private List<FieldMetadata> rooIdentifierFields; |
addon-web-mvc-controller/src/main/java/org/springframework/roo/addon/web/mvc/controller/details/WebMetadataServiceImpl.java
(1 / 1)
|   | |||
| 163 | 163 | JavaTypePersistenceMetadataDetails javaTypePersistenceMetadataDetails = null; | |
| 164 | 164 | List<FieldMetadata> idFields = MemberFindingUtils.getFieldsWithTag(memberDetails, PersistenceCustomDataKeys.IDENTIFIER_FIELD); | |
| 165 | 165 | List<FieldMetadata> compositePkFields = new LinkedList<FieldMetadata>(); | |
| 166 | if (idFields.size() == 0) { | ||
| 166 | if (idFields.isEmpty()) { | ||
| 167 | 167 | idFields = MemberFindingUtils.getFieldsWithTag(memberDetails, PersistenceCustomDataKeys.EMBEDDED_ID_FIELD); | |
| 168 | 168 | if (idFields.size() != 1) { | |
| 169 | 169 | return null; |
addon-web-mvc-jsp/src/main/java/org/springframework/roo/addon/web/mvc/jsp/JspMetadataListener.java
(1 / 1)
|   | |||
| 115 | 115 | } | |
| 116 | 116 | ||
| 117 | 117 | List<FieldMetadata> eligibleFields = webMetadataService.getScaffoldEligibleFieldMetadata(formBackingType, memberDetails, metadataIdentificationString); | |
| 118 | if (eligibleFields.size() == 0) { | ||
| 118 | if (eligibleFields.isEmpty()) { | ||
| 119 | 119 | return null; | |
| 120 | 120 | } | |
| 121 | 121 |
addon-web-mvc-jsp/src/main/java/org/springframework/roo/addon/web/mvc/jsp/JspViewManager.java
(1 / 1)
|   | |||
| 382 | 382 | return null; | |
| 383 | 383 | } | |
| 384 | 384 | List<JavaType> parameters = field.getFieldType().getParameters(); | |
| 385 | if (parameters.size() == 0) { | ||
| 385 | if (parameters.isEmpty()) { | ||
| 386 | 386 | throw new IllegalStateException("Unable to determine the parameter type for the " + field.getFieldName().getSymbolName() + " field in " + formbackingType.getSimpleTypeName()); | |
| 387 | 387 | } | |
| 388 | 388 | return parameters.get(0); |
addon-web-mvc-jsp/src/main/java/org/springframework/roo/addon/web/mvc/jsp/menu/MenuOperationsImpl.java
(1 / 1)
|   | |||
| 109 | 109 | ||
| 110 | 110 | // Find any menu items under this category which have an id that starts with the menuItemIdPrefix | |
| 111 | 111 | List<Element> elements = XmlUtils.findElements("//category[@id='c_" + menuCategoryName.getSymbolName().toLowerCase() + "']//item[starts-with(@id, '" + FINDER_MENU_ITEM_PREFIX + "')]", document.getDocumentElement()); | |
| 112 | if (elements.size() == 0) { | ||
| 112 | if (elements.isEmpty()) { | ||
| 113 | 113 | return; | |
| 114 | 114 | } | |
| 115 | 115 | for (Element element: elements) { |
classpath-javaparser/src/main/java/org/springframework/roo/classpath/javaparser/details/JavaParserAnnotationMetadata.java
(1 / 1)
|   | |||
| 299 | 299 | ||
| 300 | 300 | // Create the AnnotationExpr; it varies depending on how many member-value pairs we need to present | |
| 301 | 301 | AnnotationExpr annotationExpression = null; | |
| 302 | if (memberValuePairs.size() == 0) { | ||
| 302 | if (memberValuePairs.isEmpty()) { | ||
| 303 | 303 | annotationExpression = new MarkerAnnotationExpr(nameToUse); | |
| 304 | 304 | } else if (memberValuePairs.size() == 1 && (memberValuePairs.get(0).getName() == null || "value".equals(memberValuePairs.get(0).getName()))) { | |
| 305 | 305 | Expression toUse = JavaParserUtils.importExpressionIfRequired(compilationUnitServices.getEnclosingTypeName(), compilationUnitServices.getImports(), memberValuePairs.get(0).getValue()); |
classpath/src/main/java/org/springframework/roo/classpath/MetadataCommands.java
(2 / 2)
|   | |||
| 50 | 50 | sb.append("Identifier : ").append(metadataId).append(System.getProperty("line.separator")); | |
| 51 | 51 | ||
| 52 | 52 | Set<String> upstream = metadataDependencyRegistry.getUpstream(metadataId); | |
| 53 | if (upstream.size() == 0) { | ||
| 53 | if (upstream.isEmpty()) { | ||
| 54 | 54 | sb.append("Upstream : ").append(System.getProperty("line.separator")); | |
| 55 | 55 | } | |
| 56 | 56 | ||
| … | … | ||
| 68 | 68 | } | |
| 69 | 69 | ||
| 70 | 70 | Set<String> downstream = metadataDependencyRegistry.getDownstream(metadataId); | |
| 71 | if (downstream.size() == 0) { | ||
| 71 | if (downstream.isEmpty()) { | ||
| 72 | 72 | sb.append("Downstream : ").append(System.getProperty("line.separator")); | |
| 73 | 73 | } | |
| 74 | 74 | for (String s : downstream) { |
classpath/src/main/java/org/springframework/roo/classpath/details/AnnotationMetadataUtils.java
(1 / 1)
|   | |||
| 61 | 61 | sb.append(annotation.getAnnotationType().getFullyQualifiedTypeName()); | |
| 62 | 62 | } | |
| 63 | 63 | ||
| 64 | if (annotation.getAttributeNames().size() == 0) { | ||
| 64 | if (annotation.getAttributeNames().isEmpty()) { | ||
| 65 | 65 | return sb.toString(); | |
| 66 | 66 | } | |
| 67 | 67 |
classpath/src/main/java/org/springframework/roo/classpath/itd/ItdSourceFileComposer.java
(8 / 8)
|   | |||
| 138 | 138 | ||
| 139 | 139 | private void appendTypeAnnotations() { | |
| 140 | 140 | List<? extends AnnotationMetadata> typeAnnotations = itdTypeDetails.getAnnotations(); | |
| 141 | if (typeAnnotations == null || typeAnnotations.size() == 0) { | ||
| 141 | if (typeAnnotations == null || typeAnnotations.isEmpty()) { | ||
| 142 | 142 | return; | |
| 143 | 143 | } | |
| 144 | 144 | ||
| … | … | ||
| 158 | 158 | ||
| 159 | 159 | private void appendFieldAnnotations() { | |
| 160 | 160 | List<DeclaredFieldAnnotationDetails> fieldAnnotations = itdTypeDetails.getFieldAnnotations(); | |
| 161 | if (fieldAnnotations == null || fieldAnnotations.size() == 0) { | ||
| 161 | if (fieldAnnotations == null || fieldAnnotations.isEmpty()) { | ||
| 162 | 162 | return; | |
| 163 | 163 | } | |
| 164 | 164 | ||
| … | … | ||
| 183 | 183 | ||
| 184 | 184 | private void appendMethodAnnotations() { | |
| 185 | 185 | List<DeclaredMethodAnnotationDetails> methodAnnotations = itdTypeDetails.getMethodAnnotations(); | |
| 186 | if (methodAnnotations == null || methodAnnotations.size() == 0) { | ||
| 186 | if (methodAnnotations == null || methodAnnotations.isEmpty()) { | ||
| 187 | 187 | return; | |
| 188 | 188 | } | |
| 189 | 189 | ||
| … | … | ||
| 216 | 216 | ||
| 217 | 217 | private void appendExtendsTypes() { | |
| 218 | 218 | List<JavaType> extendsTypes = itdTypeDetails.getExtendsTypes(); | |
| 219 | if (extendsTypes == null || extendsTypes.size() == 0) { | ||
| 219 | if (extendsTypes == null || extendsTypes.isEmpty()) { | ||
| 220 | 220 | return; | |
| 221 | 221 | } | |
| 222 | 222 | ||
| … | … | ||
| 241 | 241 | private void appendImplementsTypes() { | |
| 242 | 242 | List<JavaType> implementsTypes = itdTypeDetails.getImplementsTypes(); | |
| 243 | 243 | ||
| 244 | if (implementsTypes == null || implementsTypes.size() == 0) { | ||
| 244 | if (implementsTypes == null || implementsTypes.isEmpty()) { | ||
| 245 | 245 | return; | |
| 246 | 246 | } | |
| 247 | 247 | ||
| … | … | ||
| 265 | 265 | ||
| 266 | 266 | private void appendConstructors() { | |
| 267 | 267 | List<? extends ConstructorMetadata> constructors = itdTypeDetails.getDeclaredConstructors(); | |
| 268 | if (constructors == null || constructors.size() == 0) { | ||
| 268 | if (constructors == null || constructors.isEmpty()) { | ||
| 269 | 269 | return; | |
| 270 | 270 | } | |
| 271 | 271 | content = true; | |
| … | … | ||
| 321 | 321 | ||
| 322 | 322 | private void appendMethods() { | |
| 323 | 323 | List<? extends MethodMetadata> methods = itdTypeDetails.getDeclaredMethods(); | |
| 324 | if (methods == null || methods.size() == 0) { | ||
| 324 | if (methods == null || methods.isEmpty()) { | ||
| 325 | 325 | return; | |
| 326 | 326 | } | |
| 327 | 327 | content = true; | |
| … | … | ||
| 330 | 330 | ||
| 331 | 331 | private void appendFields() { | |
| 332 | 332 | List<? extends FieldMetadata> fields = itdTypeDetails.getDeclaredFields(); | |
| 333 | if (fields == null || fields.size() == 0) { | ||
| 333 | if (fields == null || fields.isEmpty()) { | ||
| 334 | 334 | return; | |
| 335 | 335 | } | |
| 336 | 336 | content = true; |
felix/src/main/java/org/springframework/roo/felix/pgp/PgpCommands.java
(2 / 2)
|   | |||
| 43 | 43 | @CliCommand(value="pgp list trusted keys", help="Lists the keys you currently trust and have not been revoked at the time last downloaded from a public key server") | |
| 44 | 44 | public String listTrustedKeys() { | |
| 45 | 45 | List<PGPPublicKeyRing> keyRings = pgpService.getTrustedKeys(); | |
| 46 | if (keyRings.size() == 0) { | ||
| 46 | if (keyRings.isEmpty()) { | ||
| 47 | 47 | StringBuilder sb = new StringBuilder(); | |
| 48 | 48 | appendLine(sb, "No keys trusted; use 'pgp trust' to add a key or 'pgp automatic trust' for automatic key addition"); | |
| 49 | 49 | return sb.toString(); | |
| 50 | 50 | } | |
| 51 | 51 | StringBuilder sb = new StringBuilder(); | |
| 52 | 52 | for (PGPPublicKeyRing keyRing : keyRings) { | |
| 53 | formatKeyRing(sb, keyRing); | ||
| 53 | formatKeyRing(sb, keyRing); | ||
| 54 | 54 | } | |
| 55 | 55 | return sb.toString(); | |
| 56 | 56 | } |
file-monitor-polling/src/main/java/org/springframework/roo/file/monitor/polling/PollingFileMonitorService.java
(5 / 5)
|   | |||
| 72 | 72 | public List<FileDetails> getMonitored() { | |
| 73 | 73 | synchronized (lock) { | |
| 74 | 74 | List<FileDetails> monitored = new ArrayList<FileDetails>(); | |
| 75 | if (requests.size() == 0) { | ||
| 75 | if (requests.isEmpty()) { | ||
| 76 | 76 | return monitored; | |
| 77 | 77 | } | |
| 78 | 78 | ||
| … | … | ||
| 123 | 123 | ||
| 124 | 124 | public int scanNotified() { | |
| 125 | 125 | synchronized (lock) { | |
| 126 | if (requests.size() == 0 || !isDirty()) { | ||
| 126 | if (requests.isEmpty() || !isDirty()) { | ||
| 127 | 127 | // There are no changes we can notify, so immediately return | |
| 128 | 128 | return 0; | |
| 129 | 129 | } | |
| … | … | ||
| 221 | 221 | ||
| 222 | 222 | public int scanAll() { | |
| 223 | 223 | synchronized (lock) { | |
| 224 | if (requests.size() == 0) { | ||
| 224 | if (requests.isEmpty()) { | ||
| 225 | 225 | return 0; | |
| 226 | 226 | } | |
| 227 | 227 | ||
| … | … | ||
| 319 | 319 | * @param eventsToPublish to publish (not null, but can be empty) | |
| 320 | 320 | */ | |
| 321 | 321 | private void publish(List<FileEvent> eventsToPublish) { | |
| 322 | if (eventsToPublish.size() == 0) { | ||
| 322 | if (eventsToPublish.isEmpty()) { | ||
| 323 | 323 | return; | |
| 324 | 324 | } | |
| 325 | if (fileEventListeners.size() == 0 || eventsToPublish.size() == 0) { | ||
| 325 | if (fileEventListeners.isEmpty() || eventsToPublish.isEmpty()) { | ||
| 326 | 326 | return; | |
| 327 | 327 | } | |
| 328 | 328 | for (FileEvent event : eventsToPublish) { |
metadata/src/main/java/org/springframework/roo/metadata/DefaultMetadataService.java
(1 / 1)
|   | |||
| 180 | 180 | // We use another try..finally block as we want to ensure exceptions don't prevent our metadataLogger.stopEvent() | |
| 181 | 181 | try { | |
| 182 | 182 | // Have we processed all requests? If so, handle any retries we recorded | |
| 183 | if (activeRequests.size() == 0) { | ||
| 183 | if (activeRequests.isEmpty()) { | ||
| 184 | 184 | List<String> thisRetry = new ArrayList<String>(); | |
| 185 | 185 | thisRetry.addAll(keysToRetry); | |
| 186 | 186 | keysToRetry.clear(); |
model/src/main/java/org/springframework/roo/model/JavaType.java
(1 / 1)
|   | |||
| 170 | 170 | ||
| 171 | 171 | private String getNameIncludingTypeParameters(boolean staticForm, ImportRegistrationResolver resolver, Map<String, String> types) { | |
| 172 | 172 | if (DataType.PRIMITIVE == dataType) { | |
| 173 | Assert.isTrue(parameters.size() == 0, "A primitive cannot have parameters"); | ||
| 173 | Assert.isTrue(parameters.isEmpty(), "A primitive cannot have parameters"); | ||
| 174 | 174 | if (this.fullyQualifiedTypeName.equals(Integer.class.getName())) { | |
| 175 | 175 | return "int" + getArraySuffix(); | |
| 176 | 176 | } else if (this.fullyQualifiedTypeName.equals(Character.class.getName())) { |
shell/src/main/java/org/springframework/roo/shell/SimpleParser.java
(2 / 2)
|   | |||
| 418 | 418 | ||
| 419 | 419 | // logger.info("RESULTS: '" + translated + "' " + StringUtils.collectionToCommaDelimitedString(targets)); | |
| 420 | 420 | ||
| 421 | if (targets.size() == 0) { | ||
| 421 | if (targets.isEmpty()) { | ||
| 422 | 422 | // Nothing matches the buffer they've presented | |
| 423 | 423 | return cursor; | |
| 424 | 424 | } | |
| … | … | ||
| 472 | 472 | } | |
| 473 | 473 | ||
| 474 | 474 | // If they haven't specified any parameters yet, at least verify the command name is fully completed | |
| 475 | if (options.size() == 0) { | ||
| 475 | if (options.isEmpty()) { | ||
| 476 | 476 | for (String value : cmd.value()) { | |
| 477 | 477 | if (value.startsWith(buffer)) { | |
| 478 | 478 | // They are potentially trying to type this command |
support/src/main/java/org/springframework/roo/support/logging/HandlerUtils.java
(1 / 1)
|   | |||
| 68 | 68 | } | |
| 69 | 69 | ||
| 70 | 70 | // Create a default DeferredLogHandler if no Handler was defined in the presented Logger | |
| 71 | if (newHandlers.size() == 0) { | ||
| 71 | if (newHandlers.isEmpty()) { | ||
| 72 | 72 | ConsoleHandler consoleHandler = new ConsoleHandler(); | |
| 73 | 73 | consoleHandler.setFormatter(new Formatter() { | |
| 74 | 74 | public String format(LogRecord record) { |
uaa/src/main/java/org/springframework/roo/uaa/UaaRegistrationServiceImpl.java
(1 / 1)
|   | |||
| 155 | 155 | } | |
| 156 | 156 | ||
| 157 | 157 | public void flushIfPossible() { | |
| 158 | if (bsnBuffer.size() == 0 && projectIdBuffer.size() == 0) { | ||
| 158 | if (bsnBuffer.isEmpty() && projectIdBuffer.isEmpty()) { | ||
| 159 | 159 | // Nothing to flush | |
| 160 | 160 | return; | |
| 161 | 161 | } |
Comments
Add your comment
Please log in to comment



Add a new comment:
Login or create an account to post a comment