zhou-hao 7 年之前
父节点
当前提交
21d3848f51

+ 1 - 1
.travis.yml

@@ -9,7 +9,7 @@ addons:
 jdk:
   - oraclejdk8
 script:
-  - mvn clean jacoco:report package sonar:sonar
+  - mvn clean test jacoco:report sonar:sonar -Dmaven.test.failure.ignore=true
 cache:
   directories:
     - '$HOME/.m2/repository'

+ 5 - 8
hsweb-starter/hsweb-spring-boot-starter/src/main/java/org/hswebframework/web/starter/entity/EntityProperties.java

@@ -25,12 +25,10 @@ import org.hswebframework.utils.StringUtils;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 import org.springframework.util.ClassUtils;
 
-import java.lang.instrument.IllegalClassFormatException;
 import java.util.*;
 import java.util.stream.Collectors;
 
 /**
- * TODO 完成注释
  * <p>
  * <pre>
  *    hsweb:
@@ -60,7 +58,7 @@ public class EntityProperties {
         return mappings.stream()
                 .map(Mapping::create)
                 .reduce(MapUtils::merge)
-                .get();
+                .orElseGet(HashMap::new);
     }
 
     public static class Mapping {
@@ -92,18 +90,17 @@ public class EntityProperties {
         protected Class<Entity> getTargetClass(String name) {
             Class<Entity> entityClass = getClass(targetBasePackage, name);
             if (entityClass.isInterface()) {
-                throw new RuntimeException("class " + name + " is interface!");
+                throw new UnsupportedOperationException("class " + name + " is interface!");
             }
             return entityClass;
         }
 
-        @SuppressWarnings("unchecked")
+        @SuppressWarnings("all")
         public Class<Entity> classForName(String name) {
             try {
-                Class target = ClassUtils.forName(name, this.getClass().getClassLoader());
-                return target;
+                return (Class<Entity>) ClassUtils.forName(name, this.getClass().getClassLoader());
             } catch (ClassNotFoundException e) {
-                throw new RuntimeException(e);
+                throw new UnsupportedOperationException(e);
             }
         }
 

+ 1 - 0
hsweb-system/hsweb-system-authorization/hsweb-system-authorization-service/hsweb-system-authorization-service-simple/src/main/java/org/hswebframework/web/service/authorization/simple/SimpleAuthorizationSettingService.java

@@ -329,6 +329,7 @@ public class SimpleAuthorizationSettingService extends GenericEntityService<Auth
             List<String> allActions = entity.getActions().stream().map(ActionEntity::getAction).collect(Collectors.toList());
 
             if (isNotEmpty(entity.getActions()) && isNotEmpty(detail.getActions())) {
+
                 detail.setActions(detail.getActions().stream().filter(allActions::contains).collect(Collectors.toSet()));
             }
             if (isEmpty(entity.getSupportDataAccessTypes())) {

+ 1 - 40
pom.xml

@@ -196,17 +196,11 @@
                 </configuration>
                 <executions>
                     <execution>
+                        <id>agent</id>
                         <goals>
                             <goal>prepare-agent</goal>
                         </goals>
                     </execution>
-                    <execution>
-                        <id>report</id>
-                        <phase>prepare-package</phase>
-                        <goals>
-                            <goal>report</goal>
-                        </goals>
-                    </execution>
                 </executions>
             </plugin>
 
@@ -271,39 +265,6 @@
                 </executions>
             </plugin>
 
-            <!--<plugin>-->
-            <!--<artifactId>maven-source-plugin</artifactId>-->
-            <!--<version>2.4</version>-->
-            <!--<configuration>-->
-            <!--<attach>true</attach>-->
-            <!--</configuration>-->
-            <!--<executions>-->
-            <!--<execution>-->
-            <!--<phase>compile</phase>-->
-            <!--<goals>-->
-            <!--<goal>jar</goal>-->
-            <!--</goals>-->
-            <!--</execution>-->
-            <!--</executions>-->
-            <!--</plugin>-->
-
-            <!--<plugin>-->
-            <!--<groupId>org.apache.maven.plugins</groupId>-->
-            <!--<artifactId>maven-javadoc-plugin</artifactId>-->
-            <!--<version>2.9.1</version>-->
-            <!--<configuration>-->
-            <!--<aggregate>true</aggregate>-->
-            <!--</configuration>-->
-            <!--<executions>-->
-            <!--<execution>-->
-            <!--<phase>deploy</phase>-->
-            <!--<goals>-->
-            <!--<goal>jar</goal>-->
-            <!--</goals>-->
-            <!--</execution>-->
-            <!--</executions>-->
-            <!--</plugin>-->
-
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>