// save profiles
boolean saveAuthor = getBoolean( authorButton.getValue() );
- boolean saveDistributor = hasDistributor ? saveDistributor = getBoolean( distributor2Button.getValue() ) : false;
+ boolean saveDistributor = hasDistributor ? getBoolean( distributor2Button.getValue() ) : false;
if ( saveAuthor ) {
authorItem.setPassword( (char[]) authorText.getValue() );
setValid(true);
setErrorMessage(null);
for (SigningProfile profile : profileList) {
- if (profile == null) continue;
+ if (profile == null)
+ {
+ continue;
+ }
List<SigningProfileItem> profileItemList = profile.getProfileItemList();
for (SigningProfileItem item : profileItemList) {
- if (item == null) continue;
+ if (item == null)
+ {
+ continue;
+ }
checkFile(item.getKeyLocation());
}
SigningProfileItem authorItem = profile.getAuthorItem();
- if (authorItem != null) {
+ if (authorItem != null)
+ {
checkFile(authorItem.getKeyLocation());
}
}
public FontData[] smallFont(Font font) {
FontData[] datas = font.getFontData();
for (FontData data : datas)
+ {
data.setHeight(data.getHeight() - 1);
+ }
return datas;
}
--- /dev/null
+analyseLocally=true\r
+eclipse.preferences.version=1\r
+projectArtifactId=common-eplugin\r
+projectBranch=\r
+projectGroupId=ide\r
+serverUrl=http\://172.21.17.104/sonar\r
+version=1\r
mappingMap.put( args[0], args[1] );\r
}\r
}\r
- catch (IOException e)\r
+ catch ( final IOException e )\r
{\r
+ throw new IllegalStateException( "Unreachable block" );\r
}\r
}\r
mapper.setMappings( mappingMap );\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "http://www.puppycrawl.com/dtds/configuration_1_2.dtd"><!-- Generated by Sonar --><module name="Checker"><module name="SuppressionCommentFilter"/><module name="TreeWalker"><module name="FileContentsHolder"/> <module name="UnusedImports"><property name="severity" value="info"/></module><module name="TodoComment"><property name="severity" value="info"/></module><module name="AvoidStarImport"><property name="severity" value="info"/></module><module name="MissingSwitchDefault"><property name="severity" value="warning"/></module><module name="DefaultComesLast"><property name="severity" value="warning"/></module></module></module>
\ No newline at end of file
--- /dev/null
+<FindBugsFilter/>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated by Sonar -->
+<FindBugsFilter>
+ <Match>
+ <Bug pattern="NP_CLONE_COULD_RETURN_NULL"/>
+ </Match>
+ <Match>
+ <Bug pattern="NM_CONFUSING"/>
+ </Match>
+ <Match>
+ <Bug pattern="FI_EMPTY"/>
+ </Match>
+ <Match>
+ <Bug pattern="DM_EXIT"/>
+ </Match>
+ <Match>
+ <Bug pattern="ODR_OPEN_DATABASE_RESOURCE"/>
+ </Match>
+ <Match>
+ <Bug pattern="ODR_OPEN_DATABASE_RESOURCE_EXCEPTION_PATH"/>
+ </Match>
+ <Match>
+ <Bug pattern="OS_OPEN_STREAM"/>
+ </Match>
+ <Match>
+ <Bug pattern="OS_OPEN_STREAM_EXCEPTION_PATH"/>
+ </Match>
+ <Match>
+ <Bug pattern="DE_MIGHT_DROP"/>
+ </Match>
+ <Match>
+ <Bug pattern="DE_MIGHT_IGNORE"/>
+ </Match>
+ <Match>
+ <Bug pattern="NP_BOOLEAN_RETURN_NULL"/>
+ </Match>
+ <Match>
+ <Bug pattern="RC_REF_COMPARISON"/>
+ </Match>
+ <Match>
+ <Bug pattern="NP_TOSTRING_COULD_RETURN_NULL"/>
+ </Match>
+ <Match>
+ <Bug pattern="GC_UNCHECKED_TYPE_IN_GENERIC_CALL"/>
+ </Match>
+ <Match>
+ <Bug pattern="NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER"/>
+ </Match>
+ <Match>
+ <Bug pattern="NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER"/>
+ </Match>
+ <Match>
+ <Bug pattern="NP_NULL_INSTANCEOF"/>
+ </Match>
+ <Match>
+ <Bug pattern="IL_INFINITE_LOOP"/>
+ </Match>
+ <Match>
+ <Bug pattern="IL_INFINITE_RECURSIVE_LOOP"/>
+ </Match>
+ <Match>
+ <Bug pattern="INT_BAD_COMPARISON_WITH_NONNEGATIVE_VALUE"/>
+ </Match>
+ <Match>
+ <Bug pattern="EC_UNRELATED_INTERFACES"/>
+ </Match>
+ <Match>
+ <Bug pattern="EC_UNRELATED_TYPES"/>
+ </Match>
+ <Match>
+ <Bug pattern="EC_UNRELATED_CLASS_AND_INTERFACE"/>
+ </Match>
+ <Match>
+ <Bug pattern="EC_NULL_ARG"/>
+ </Match>
+ <Match>
+ <Bug pattern="NP_CLOSING_NULL"/>
+ </Match>
+ <Match>
+ <Bug pattern="SA_FIELD_DOUBLE_ASSIGNMENT"/>
+ </Match>
+ <Match>
+ <Bug pattern="EQ_ALWAYS_FALSE"/>
+ </Match>
+ <Match>
+ <Bug pattern="EQ_ALWAYS_TRUE"/>
+ </Match>
+ <Match>
+ <Bug pattern="EC_INCOMPATIBLE_ARRAY_COMPARE"/>
+ </Match>
+ <Match>
+ <Bug pattern="RV_EXCEPTION_NOT_THROWN"/>
+ </Match>
+ <Match>
+ <Bug pattern="RE_CANT_USE_FILE_SEPARATOR_AS_REGULAR_EXPRESSION"/>
+ </Match>
+ <Match>
+ <Bug pattern="VA_FORMAT_STRING_ILLEGAL"/>
+ </Match>
+ <Match>
+ <Bug pattern="BC_IMPOSSIBLE_CAST"/>
+ </Match>
+ <Match>
+ <Bug pattern="BC_IMPOSSIBLE_DOWNCAST"/>
+ </Match>
+ <Match>
+ <Bug pattern="BC_IMPOSSIBLE_DOWNCAST_OF_TOARRAY"/>
+ </Match>
+ <Match>
+ <Bug pattern="BIT_AND"/>
+ </Match>
+ <Match>
+ <Bug pattern="BIT_IOR"/>
+ </Match>
+ <Match>
+ <Bug pattern="ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL"/>
+ </Match>
+ <Match>
+ <Bug pattern="ICAST_INT_CAST_TO_FLOAT_PASSED_TO_ROUND"/>
+ </Match>
+ <Match>
+ <Bug pattern="INT_BAD_REM_BY_1"/>
+ </Match>
+ <Match>
+ <Bug pattern="RE_BAD_SYNTAX_FOR_REGULAR_EXPRESSION"/>
+ </Match>
+ <Match>
+ <Bug pattern="NP_NULL_PARAM_DEREF"/>
+ </Match>
+ <Match>
+ <Bug pattern="NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS"/>
+ </Match>
+ <Match>
+ <Bug pattern="NP_NONNULL_PARAM_VIOLATION"/>
+ </Match>
+ <Match>
+ <Bug pattern="NP_ARGUMENT_MIGHT_BE_NULL"/>
+ </Match>
+ <Match>
+ <Bug pattern="NP_NONNULL_RETURN_VIOLATION"/>
+ </Match>
+ <Match>
+ <Bug pattern="NP_ALWAYS_NULL"/>
+ </Match>
+ <Match>
+ <Bug pattern="NP_ALWAYS_NULL_EXCEPTION"/>
+ </Match>
+ <Match>
+ <Bug pattern="NP_GUARANTEED_DEREF"/>
+ </Match>
+ <Match>
+ <Bug pattern="RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE"/>
+ </Match>
+ <Match>
+ <Bug pattern="NP_NULL_ON_SOME_PATH"/>
+ </Match>
+ <Match>
+ <Bug pattern="NP_NULL_ON_SOME_PATH_EXCEPTION"/>
+ </Match>
+ <Match>
+ <Bug pattern="RpC_REPEATED_CONDITIONAL_TEST"/>
+ </Match>
+ <Match>
+ <Bug pattern="UR_UNINIT_READ"/>
+ </Match>
+ <Match>
+ <Bug pattern="UCF_USELESS_CONTROL_FLOW_NEXT_LINE"/>
+ </Match>
+ <Match>
+ <Bug pattern="EC_UNRELATED_TYPES_USING_POINTER_EQUALITY"/>
+ </Match>
+ <Match>
+ <Bug pattern="NP_GUARANTEED_DEREF_ON_EXCEPTION_PATH"/>
+ </Match>
+ <Match>
+ <Bug pattern="NM_VERY_CONFUSING"/>
+ </Match>
+ <Match>
+ <Bug pattern="SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH"/>
+ </Match>
+ <Match>
+ <Bug pattern="SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH_TO_THROW"/>
+ </Match>
+ <Match>
+ <Bug pattern="DMI_HARDCODED_ABSOLUTE_FILENAME"/>
+ </Match>
+ <Match>
+ <Bug pattern="DLS_DEAD_LOCAL_STORE_OF_NULL"/>
+ </Match>
+ <Match>
+ <Bug pattern="DLS_DEAD_LOCAL_STORE"/>
+ </Match>
+ <Match>
+ <Bug pattern="NP_DEREFERENCE_OF_READLINE_VALUE"/>
+ </Match>
+ <Match>
+ <Bug pattern="SA_LOCAL_DOUBLE_ASSIGNMENT"/>
+ </Match>
+ <Match>
+ <Bug pattern="NP_IMMEDIATE_DEREFERENCE_OF_READLINE"/>
+ </Match>
+ <Match>
+ <Bug pattern="BC_VACUOUS_INSTANCEOF"/>
+ </Match>
+ <Match>
+ <Bug pattern="ICAST_IDIV_CAST_TO_DOUBLE"/>
+ </Match>
+ <Match>
+ <Bug pattern="NP_LOAD_OF_KNOWN_NULL_VALUE"/>
+ </Match>
+ <Match>
+ <Bug pattern="NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE"/>
+ </Match>
+ <Match>
+ <Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE"/>
+ </Match>
+ <Match>
+ <Bug pattern="NP_NULL_ON_SOME_PATH_MIGHT_BE_INFEASIBLE"/>
+ </Match>
+ <Match>
+ <Bug pattern="NS_DANGEROUS_NON_SHORT_CIRCUIT"/>
+ </Match>
+ <Match>
+ <Bug pattern="RCN_REDUNDANT_COMPARISON_TWO_NULL_VALUES"/>
+ </Match>
+ <Match>
+ <Bug pattern="RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE"/>
+ </Match>
+ <Match>
+ <Bug pattern="SA_LOCAL_SELF_ASSIGNMENT"/>
+ </Match>
+ <Match>
+ <Bug pattern="BC_UNCONFIRMED_CAST"/>
+ </Match>
+ <Match>
+ <Bug pattern="UCF_USELESS_CONTROL_FLOW"/>
+ </Match>
+ <Match>
+ <Bug pattern="OBL_UNSATISFIED_OBLIGATION"/>
+ </Match>
+ <Match>
+ <Bug pattern="ESync_EMPTY_SYNC"/>
+ </Match>
+ <Match>
+ <Bug pattern="DMI_COLLECTION_OF_URLS"/>
+ </Match>
+ <Match>
+ <Bug pattern="UPM_UNCALLED_PRIVATE_METHOD"/>
+ </Match>
+ <Match>
+ <Bug pattern="DMI_BLOCKING_METHODS_ON_URL"/>
+ </Match>
+ <Match>
+ <Bug pattern="URF_UNREAD_FIELD"/>
+ </Match>
+ <Match>
+ <Bug pattern="SS_SHOULD_BE_STATIC"/>
+ </Match>
+ <Match>
+ <Bug pattern="DMI_EMPTY_DB_PASSWORD"/>
+ </Match>
+ <Match>
+ <Bug pattern="DMI_CONSTANT_DB_PASSWORD"/>
+ </Match>
+ <Match>
+ <Bug pattern="SF_SWITCH_FALLTHROUGH"/>
+ </Match>
+</FindBugsFilter>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="http://findbugs.sourceforge.net/xsl/default.xsl"?>
+
+<BugCollection version="1.3.9" sequence="0" timestamp="1355815803514" analysisTimestamp="1355819061611" release="">
+ <Project>
+ <Jar>Z:\common-eplugin\org.tizen.common.verrari.realm\bin</Jar>
+ <AuxClasspathEntry>Z:\common-eplugin\org.tizen.common.verrari.realm\org.tizen.common.verrari.realm\lib\jackson-core-lgpl-1.9.7.jar</AuxClasspathEntry>
+ <AuxClasspathEntry>Z:\common-eplugin\org.tizen.common.verrari.realm\org.tizen.common.verrari.realm\lib\jackson-mapper-lgpl-1.9.7.jar</AuxClasspathEntry>
+ <AuxClasspathEntry>C:\Program Files\Java\jdk1.6.0_32\jre\lib\resources.jar</AuxClasspathEntry>
+ <AuxClasspathEntry>C:\Program Files\Java\jdk1.6.0_32\jre\lib\rt.jar</AuxClasspathEntry>
+ <AuxClasspathEntry>C:\Program Files\Java\jdk1.6.0_32\jre\lib\jsse.jar</AuxClasspathEntry>
+ <AuxClasspathEntry>C:\Program Files\Java\jdk1.6.0_32\jre\lib\jce.jar</AuxClasspathEntry>
+ <AuxClasspathEntry>C:\Program Files\Java\jdk1.6.0_32\jre\lib\charsets.jar</AuxClasspathEntry>
+ <AuxClasspathEntry>C:\Program Files\Java\jdk1.6.0_32\jre\lib\ext\dnsns.jar</AuxClasspathEntry>
+ <AuxClasspathEntry>C:\Program Files\Java\jdk1.6.0_32\jre\lib\ext\localedata.jar</AuxClasspathEntry>
+ <AuxClasspathEntry>C:\Program Files\Java\jdk1.6.0_32\jre\lib\ext\sunjce_provider.jar</AuxClasspathEntry>
+ <AuxClasspathEntry>C:\Program Files\eclipse37\plugins\org.junit_4.8.2.v4_8_2_v20110321-1705\junit.jar</AuxClasspathEntry>
+ <AuxClasspathEntry>C:\Users\bylee\AppData\Local\Temp\findbugs945166737468633245.jar</AuxClasspathEntry>
+ <AuxClasspathEntry>C:\Users\bylee\AppData\Local\Temp\findbugs2160014671323692735.jar</AuxClasspathEntry>
+ <SrcDir>Z:\common-eplugin\org.tizen.common.verrari.realm\src</SrcDir>
+ <SrcDir>Z:\common-eplugin\org.tizen.common.verrari.realm\test\src</SrcDir>
+ <WrkDir>Z:\common-eplugin\org.tizen.common.verrari.realm\target\sonar-embedder-work\target</WrkDir>
+ </Project>
+ <Errors errors="2" missingClasses="42">
+ <Error>
+ <ErrorMessage>Cannot open codebase filesystem:Z:\common-eplugin\org.tizen.common.verrari.realm\org.tizen.common.verrari.realm\lib\jackson-core-lgpl-1.9.7.jar</ErrorMessage>
+ <Exception>java.io.FileNotFoundException: Z:\common-eplugin\org.tizen.common.verrari.realm\org.tizen.common.verrari.realm\lib\jackson-core-lgpl-1.9.7.jar (지정된 경로를 찾을 수 없습니다)</Exception>
+ <StackTrace>java.util.zip.ZipFile.open(Native Method)</StackTrace>
+ <StackTrace>java.util.zip.ZipFile.<init>(Unknown Source)</StackTrace>
+ <StackTrace>java.util.zip.ZipFile.<init>(Unknown Source)</StackTrace>
+ <StackTrace>edu.umd.cs.findbugs.classfile.impl.ZipFileCodeBase.<init>(ZipFileCodeBase.java:53)</StackTrace>
+ <StackTrace>edu.umd.cs.findbugs.classfile.impl.ZipCodeBaseFactory.countUsingZipFile(ZipCodeBaseFactory.java:92)</StackTrace>
+ <StackTrace>edu.umd.cs.findbugs.classfile.impl.ZipCodeBaseFactory.makeZipCodeBase(ZipCodeBaseFactory.java:46)</StackTrace>
+ <StackTrace>edu.umd.cs.findbugs.classfile.impl.ClassFactory.createFilesystemCodeBase(ClassFactory.java:97)</StackTrace>
+ <StackTrace>edu.umd.cs.findbugs.classfile.impl.FilesystemCodeBaseLocator.openCodeBase(FilesystemCodeBaseLocator.java:75)</StackTrace>
+ <StackTrace>edu.umd.cs.findbugs.classfile.impl.ClassPathBuilder.processWorkList(ClassPathBuilder.java:564)</StackTrace>
+ <StackTrace>edu.umd.cs.findbugs.classfile.impl.ClassPathBuilder.build(ClassPathBuilder.java:195)</StackTrace>
+ <StackTrace>edu.umd.cs.findbugs.FindBugs2.buildClassPath(FindBugs2.java:584)</StackTrace>
+ <StackTrace>edu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:181)</StackTrace>
+ <StackTrace>org.sonar.plugins.findbugs.FindbugsExecutor$FindbugsTask.call(FindbugsExecutor.java:126)</StackTrace>
+ <StackTrace>java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)</StackTrace>
+ <StackTrace>java.util.concurrent.FutureTask.run(Unknown Source)</StackTrace>
+ <StackTrace>java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)</StackTrace>
+ <StackTrace>java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)</StackTrace>
+ <StackTrace>java.lang.Thread.run(Unknown Source)</StackTrace>
+ </Error>
+ <Error>
+ <ErrorMessage>Cannot open codebase filesystem:Z:\common-eplugin\org.tizen.common.verrari.realm\org.tizen.common.verrari.realm\lib\jackson-mapper-lgpl-1.9.7.jar</ErrorMessage>
+ <Exception>java.io.FileNotFoundException: Z:\common-eplugin\org.tizen.common.verrari.realm\org.tizen.common.verrari.realm\lib\jackson-mapper-lgpl-1.9.7.jar (지정된 경로를 찾을 수 없습니다)</Exception>
+ <StackTrace>java.util.zip.ZipFile.open(Native Method)</StackTrace>
+ <StackTrace>java.util.zip.ZipFile.<init>(Unknown Source)</StackTrace>
+ <StackTrace>java.util.zip.ZipFile.<init>(Unknown Source)</StackTrace>
+ <StackTrace>edu.umd.cs.findbugs.classfile.impl.ZipFileCodeBase.<init>(ZipFileCodeBase.java:53)</StackTrace>
+ <StackTrace>edu.umd.cs.findbugs.classfile.impl.ZipCodeBaseFactory.countUsingZipFile(ZipCodeBaseFactory.java:92)</StackTrace>
+ <StackTrace>edu.umd.cs.findbugs.classfile.impl.ZipCodeBaseFactory.makeZipCodeBase(ZipCodeBaseFactory.java:46)</StackTrace>
+ <StackTrace>edu.umd.cs.findbugs.classfile.impl.ClassFactory.createFilesystemCodeBase(ClassFactory.java:97)</StackTrace>
+ <StackTrace>edu.umd.cs.findbugs.classfile.impl.FilesystemCodeBaseLocator.openCodeBase(FilesystemCodeBaseLocator.java:75)</StackTrace>
+ <StackTrace>edu.umd.cs.findbugs.classfile.impl.ClassPathBuilder.processWorkList(ClassPathBuilder.java:564)</StackTrace>
+ <StackTrace>edu.umd.cs.findbugs.classfile.impl.ClassPathBuilder.build(ClassPathBuilder.java:195)</StackTrace>
+ <StackTrace>edu.umd.cs.findbugs.FindBugs2.buildClassPath(FindBugs2.java:584)</StackTrace>
+ <StackTrace>edu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:181)</StackTrace>
+ <StackTrace>org.sonar.plugins.findbugs.FindbugsExecutor$FindbugsTask.call(FindbugsExecutor.java:126)</StackTrace>
+ <StackTrace>java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)</StackTrace>
+ <StackTrace>java.util.concurrent.FutureTask.run(Unknown Source)</StackTrace>
+ <StackTrace>java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)</StackTrace>
+ <StackTrace>java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)</StackTrace>
+ <StackTrace>java.lang.Thread.run(Unknown Source)</StackTrace>
+ </Error>
+ <MissingClass>org.codehaus.jackson.JsonNode</MissingClass>
+ <MissingClass>org.codehaus.jackson.map.ObjectMapper</MissingClass>
+ <MissingClass>org.hamcrest.Description</MissingClass>
+ <MissingClass>org.hamcrest.Matcher</MissingClass>
+ <MissingClass>org.hamcrest.StringDescription</MissingClass>
+ <MissingClass>org.mockito.Matchers</MissingClass>
+ <MissingClass>org.mockito.Mockito</MissingClass>
+ <MissingClass>org.mockito.stubbing.OngoingStubbing</MissingClass>
+ <MissingClass>org.slf4j.Logger</MissingClass>
+ <MissingClass>org.slf4j.LoggerFactory</MissingClass>
+ <MissingClass>org.tizen.common.FactoryWithArgument</MissingClass>
+ <MissingClass>org.tizen.common.classloader.ClassSource</MissingClass>
+ <MissingClass>org.tizen.common.classloader.CustomClassLoader</MissingClass>
+ <MissingClass>org.tizen.common.classloader.JarClassSource</MissingClass>
+ <MissingClass>org.tizen.common.core.command.ExecutionContext</MissingClass>
+ <MissingClass>org.tizen.common.core.command.Prompter</MissingClass>
+ <MissingClass>org.tizen.common.core.command.UntrackedException</MissingClass>
+ <MissingClass>org.tizen.common.file.FileHandler</MissingClass>
+ <MissingClass>org.tizen.common.file.Filter</MissingClass>
+ <MissingClass>org.tizen.common.file.SimpleFileFilter</MissingClass>
+ <MissingClass>org.tizen.common.file.filter.WildCardFilterFactory</MissingClass>
+ <MissingClass>org.tizen.common.util.ArrayUtil</MissingClass>
+ <MissingClass>org.tizen.common.util.Assert</MissingClass>
+ <MissingClass>org.tizen.common.util.FilenameUtil</MissingClass>
+ <MissingClass>org.tizen.common.util.IOUtil</MissingClass>
+ <MissingClass>org.tizen.common.util.MapUtil</MissingClass>
+ <MissingClass>org.tizen.common.util.ReflectionUtil</MissingClass>
+ <MissingClass>org.tizen.common.util.StringUtil</MissingClass>
+ <MissingClass>org.tizen.common.util.io.Buffer</MissingClass>
+ <MissingClass>org.tizen.common.util.io.BufferInputStream</MissingClass>
+ <MissingClass>org.tizen.common.util.io.BufferOutputStream</MissingClass>
+ <MissingClass>org.tizen.common.verrari.IModelProvider</MissingClass>
+ <MissingClass>org.tizen.common.verrari.ITemplate</MissingClass>
+ <MissingClass>org.tizen.common.verrari.ITemplateEngine</MissingClass>
+ <MissingClass>org.tizen.common.verrari.ITemplateProvider</MissingClass>
+ <MissingClass>org.tizen.common.verrari.TemplateContext</MissingClass>
+ <MissingClass>org.tizen.common.verrari.TemplateException</MissingClass>
+ <MissingClass>org.tizen.common.verrari.engine.TemplateEngineFactory</MissingClass>
+ <MissingClass>org.tizen.common.verrari.model.ModelManager</MissingClass>
+ <MissingClass>org.tizen.common.verrari.template.InMemoryTemplate</MissingClass>
+ <MissingClass>org.tizen.common.verrari.template.TemplateManager</MissingClass>
+ <MissingClass>org.tizen.common.verrari.util.BufferFactory</MissingClass>
+ </Errors>
+ <FindBugsSummary timestamp="Tue, 18 Dec 2012 16:30:03 +0900" total_classes="30" referenced_classes="96" total_bugs="0" total_size="719" num_packages="6" vm_version="20.7-b02" cpu_seconds="1.70" clock_seconds="3.01" peak_mbytes="859.58" alloc_mbytes="993.62" gc_seconds="0.01">
+ <FileStats path="org/tizen/common/verrari/AbstractTestCase.java" bugCount="0" size="18"/>
+ <FileStats path="org/tizen/common/verrari/AttributeConfiguable.java" bugCount="0" size="2"/>
+ <FileStats path="org/tizen/common/verrari/AttributeContainer.java" bugCount="0" size="3"/>
+ <FileStats path="org/tizen/common/verrari/Condition.java" bugCount="0" size="34"/>
+ <FileStats path="org/tizen/common/verrari/Realm.java" bugCount="0" size="2"/>
+ <FileStats path="org/tizen/common/verrari/RealmFactory.java" bugCount="0" size="88"/>
+ <FileStats path="org/tizen/common/verrari/RealmFactoryTest.java" bugCount="0" size="16"/>
+ <FileStats path="org/tizen/common/verrari/SearchableRealm.java" bugCount="0" size="2"/>
+ <FileStats path="org/tizen/common/verrari/Storage.java" bugCount="0" size="3"/>
+ <FileStats path="org/tizen/common/verrari/Template.java" bugCount="0" size="2"/>
+ <FileStats path="org/tizen/common/verrari/exception/InvalidMapperException.java" bugCount="0" size="8"/>
+ <FileStats path="org/tizen/common/verrari/exception/UnsupportedVersionException.java" bugCount="0" size="4"/>
+ <FileStats path="org/tizen/common/verrari/realm/CompositeRealm.java" bugCount="0" size="18"/>
+ <FileStats path="org/tizen/common/verrari/realm/Query.java" bugCount="0" size="2"/>
+ <FileStats path="org/tizen/common/verrari/realm/RealmConstants.java" bugCount="0" size="13"/>
+ <FileStats path="org/tizen/common/verrari/realm/StandardRealm.java" bugCount="0" size="51"/>
+ <FileStats path="org/tizen/common/verrari/realm/StandardRealmTest.java" bugCount="0" size="14"/>
+ <FileStats path="org/tizen/common/verrari/realm/StandardSearchableRealm.java" bugCount="0" size="50"/>
+ <FileStats path="org/tizen/common/verrari/storage/FileStorage.java" bugCount="0" size="32"/>
+ <FileStats path="org/tizen/common/verrari/template/Mapper.java" bugCount="0" size="3"/>
+ <FileStats path="org/tizen/common/verrari/template/StandardMapper.java" bugCount="0" size="41"/>
+ <FileStats path="org/tizen/common/verrari/template/StandardMapperTest.java" bugCount="0" size="20"/>
+ <FileStats path="org/tizen/common/verrari/template/StandardTemplate.java" bugCount="0" size="180"/>
+ <FileStats path="org/tizen/common/verrari/template/StandardTemplateTest.java" bugCount="0" size="34"/>
+ <FileStats path="org/tizen/common/verrari/template/TemplateConstants.java" bugCount="0" size="16"/>
+ <FileStats path="org/tizen/common/verrari/util/QueryFactory.java" bugCount="0" size="49"/>
+ <FileStats path="org/tizen/common/verrari/util/QueryFactoryTest.java" bugCount="0" size="14"/>
+ <PackageStats package="org.tizen.common.verrari" total_bugs="0" total_types="11" total_size="170">
+ <ClassStats class="org.tizen.common.verrari.AbstractTestCase" sourceFile="AbstractTestCase.java" interface="false" size="18" bugs="0"/>
+ <ClassStats class="org.tizen.common.verrari.AttributeConfiguable" sourceFile="AttributeConfiguable.java" interface="true" size="2" bugs="0"/>
+ <ClassStats class="org.tizen.common.verrari.AttributeContainer" sourceFile="AttributeContainer.java" interface="true" size="3" bugs="0"/>
+ <ClassStats class="org.tizen.common.verrari.Condition" sourceFile="Condition.java" interface="false" size="20" bugs="0"/>
+ <ClassStats class="org.tizen.common.verrari.Condition$Operation" sourceFile="Condition.java" interface="false" size="14" bugs="0"/>
+ <ClassStats class="org.tizen.common.verrari.Realm" sourceFile="Realm.java" interface="true" size="2" bugs="0"/>
+ <ClassStats class="org.tizen.common.verrari.RealmFactory" sourceFile="RealmFactory.java" interface="false" size="88" bugs="0"/>
+ <ClassStats class="org.tizen.common.verrari.RealmFactoryTest" sourceFile="RealmFactoryTest.java" interface="false" size="16" bugs="0"/>
+ <ClassStats class="org.tizen.common.verrari.SearchableRealm" sourceFile="SearchableRealm.java" interface="true" size="2" bugs="0"/>
+ <ClassStats class="org.tizen.common.verrari.Storage" sourceFile="Storage.java" interface="true" size="3" bugs="0"/>
+ <ClassStats class="org.tizen.common.verrari.Template" sourceFile="Template.java" interface="true" size="2" bugs="0"/>
+ </PackageStats>
+ <PackageStats package="org.tizen.common.verrari.exception" total_bugs="0" total_types="2" total_size="12">
+ <ClassStats class="org.tizen.common.verrari.exception.InvalidMapperException" sourceFile="InvalidMapperException.java" interface="false" size="8" bugs="0"/>
+ <ClassStats class="org.tizen.common.verrari.exception.UnsupportedVersionException" sourceFile="UnsupportedVersionException.java" interface="false" size="4" bugs="0"/>
+ </PackageStats>
+ <PackageStats package="org.tizen.common.verrari.realm" total_bugs="0" total_types="6" total_size="148">
+ <ClassStats class="org.tizen.common.verrari.realm.CompositeRealm" sourceFile="CompositeRealm.java" interface="false" size="18" bugs="0"/>
+ <ClassStats class="org.tizen.common.verrari.realm.Query" sourceFile="Query.java" interface="true" size="2" bugs="0"/>
+ <ClassStats class="org.tizen.common.verrari.realm.RealmConstants" sourceFile="RealmConstants.java" interface="false" size="13" bugs="0"/>
+ <ClassStats class="org.tizen.common.verrari.realm.StandardRealm" sourceFile="StandardRealm.java" interface="false" size="51" bugs="0"/>
+ <ClassStats class="org.tizen.common.verrari.realm.StandardRealmTest" sourceFile="StandardRealmTest.java" interface="false" size="14" bugs="0"/>
+ <ClassStats class="org.tizen.common.verrari.realm.StandardSearchableRealm" sourceFile="StandardSearchableRealm.java" interface="false" size="50" bugs="0"/>
+ </PackageStats>
+ <PackageStats package="org.tizen.common.verrari.storage" total_bugs="0" total_types="2" total_size="32">
+ <ClassStats class="org.tizen.common.verrari.storage.FileStorage" sourceFile="FileStorage.java" interface="false" size="18" bugs="0"/>
+ <ClassStats class="org.tizen.common.verrari.storage.FileStorage$1" sourceFile="FileStorage.java" interface="false" size="14" bugs="0"/>
+ </PackageStats>
+ <PackageStats package="org.tizen.common.verrari.template" total_bugs="0" total_types="6" total_size="294">
+ <ClassStats class="org.tizen.common.verrari.template.Mapper" sourceFile="Mapper.java" interface="true" size="3" bugs="0"/>
+ <ClassStats class="org.tizen.common.verrari.template.StandardMapper" sourceFile="StandardMapper.java" interface="false" size="41" bugs="0"/>
+ <ClassStats class="org.tizen.common.verrari.template.StandardMapperTest" sourceFile="StandardMapperTest.java" interface="false" size="20" bugs="0"/>
+ <ClassStats class="org.tizen.common.verrari.template.StandardTemplate" sourceFile="StandardTemplate.java" interface="false" size="180" bugs="0"/>
+ <ClassStats class="org.tizen.common.verrari.template.StandardTemplateTest" sourceFile="StandardTemplateTest.java" interface="false" size="34" bugs="0"/>
+ <ClassStats class="org.tizen.common.verrari.template.TemplateConstants" sourceFile="TemplateConstants.java" interface="false" size="16" bugs="0"/>
+ </PackageStats>
+ <PackageStats package="org.tizen.common.verrari.util" total_bugs="0" total_types="3" total_size="63">
+ <ClassStats class="org.tizen.common.verrari.util.QueryFactory" sourceFile="QueryFactory.java" interface="false" size="28" bugs="0"/>
+ <ClassStats class="org.tizen.common.verrari.util.QueryFactory$PatternQuery" sourceFile="QueryFactory.java" interface="false" size="21" bugs="0"/>
+ <ClassStats class="org.tizen.common.verrari.util.QueryFactoryTest" sourceFile="QueryFactoryTest.java" interface="false" size="14" bugs="0"/>
+ </PackageStats>
+ <FindBugsProfile>
+ <ClassProfile name="edu.umd.cs.findbugs.detect.NoteDirectlyRelevantTypeQualifiers" totalMilliseconds="12" invocations="96" avgMicrosecondsPerInvocation="129" maxMicrosecondsPerInvocation="1219" standardDeviationMircosecondsPerInvocation="207"/>
+ <ClassProfile name="edu.umd.cs.findbugs.detect.CalledMethods" totalMilliseconds="18" invocations="96" avgMicrosecondsPerInvocation="189" maxMicrosecondsPerInvocation="9500" standardDeviationMircosecondsPerInvocation="967"/>
+ <ClassProfile name="edu.umd.cs.findbugs.detect.FindRefComparison$SpecialTypeAnalysis" totalMilliseconds="18" invocations="78" avgMicrosecondsPerInvocation="235" maxMicrosecondsPerInvocation="3948" standardDeviationMircosecondsPerInvocation="490"/>
+ <ClassProfile name="edu.umd.cs.findbugs.detect.FieldItemSummary" totalMilliseconds="18" invocations="96" avgMicrosecondsPerInvocation="197" maxMicrosecondsPerInvocation="2049" standardDeviationMircosecondsPerInvocation="333"/>
+ <ClassProfile name="edu.umd.cs.findbugs.ba.npe.NullDerefAndRedundantComparisonFinder" totalMilliseconds="20" invocations="86" avgMicrosecondsPerInvocation="238" maxMicrosecondsPerInvocation="2054" standardDeviationMircosecondsPerInvocation="375"/>
+ <ClassProfile name="edu.umd.cs.findbugs.classfile.engine.bcel.TypeDataflowFactory" totalMilliseconds="21" invocations="89" avgMicrosecondsPerInvocation="240" maxMicrosecondsPerInvocation="2283" standardDeviationMircosecondsPerInvocation="359"/>
+ <ClassProfile name="edu.umd.cs.findbugs.OpcodeStack$JumpInfoFactory" totalMilliseconds="23" invocations="1479" avgMicrosecondsPerInvocation="15" maxMicrosecondsPerInvocation="352" standardDeviationMircosecondsPerInvocation="25"/>
+ <ClassProfile name="edu.umd.cs.findbugs.classfile.engine.bcel.ValueNumberDataflowFactory" totalMilliseconds="24" invocations="121" avgMicrosecondsPerInvocation="203" maxMicrosecondsPerInvocation="2342" standardDeviationMircosecondsPerInvocation="342"/>
+ <ClassProfile name="edu.umd.cs.findbugs.classfile.engine.bcel.UnconditionalValueDerefDataflowFactory" totalMilliseconds="24" invocations="87" avgMicrosecondsPerInvocation="283" maxMicrosecondsPerInvocation="2611" standardDeviationMircosecondsPerInvocation="465"/>
+ <ClassProfile name="edu.umd.cs.findbugs.classfile.engine.bcel.IsNullValueDataflowFactory" totalMilliseconds="27" invocations="87" avgMicrosecondsPerInvocation="314" maxMicrosecondsPerInvocation="2577" standardDeviationMircosecondsPerInvocation="497"/>
+ <ClassProfile name="edu.umd.cs.findbugs.classfile.engine.ClassInfoAnalysisEngine" totalMilliseconds="35" invocations="620" avgMicrosecondsPerInvocation="57" maxMicrosecondsPerInvocation="843" standardDeviationMircosecondsPerInvocation="82"/>
+ <ClassProfile name="edu.umd.cs.findbugs.classfile.impl.ZipCodeBaseFactory" totalMilliseconds="58" invocations="13" avgMicrosecondsPerInvocation="4520" maxMicrosecondsPerInvocation="24200" standardDeviationMircosecondsPerInvocation="6094"/>
+ <ClassProfile name="edu.umd.cs.findbugs.classfile.engine.ClassDataAnalysisEngine" totalMilliseconds="878" invocations="622" avgMicrosecondsPerInvocation="1413" maxMicrosecondsPerInvocation="9694" standardDeviationMircosecondsPerInvocation="1519"/>
+ </FindBugsProfile>
+ </FindBugsSummary>
+ <ClassFeatures></ClassFeatures>
+ <History></History>
+</BugCollection>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<pmd version="4.2.5" timestamp="2012-12-18T17:24:28.946">\r
+<file name="Z:\common-eplugin\org.tizen.common.verrari.realm\src\org\tizen\common\verrari\template\StandardTemplate.java">\r
+<violation beginline="486" endline="488" begincolumn="13" endcolumn="13" rule="EmptyCatchBlock" ruleset="Basic Rules" package="org.tizen.common.verrari.template" class="StandardTemplate" method="getMapper" externalInfoUrl="http://pmd.sourceforge.net/rules/basic.html#EmptyCatchBlock" priority="2">\r
+Avoid empty catch blocks\r
+</violation>\r
+</file>\r
+</pmd>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<ruleset>\r
+ <rule ref="rulesets/strictexception.xml/AvoidCatchingNPE">\r
+ <priority>2</priority>\r
+ </rule>\r
+ <rule ref="rulesets/strictexception.xml/AvoidRethrowingException">\r
+ <priority>2</priority>\r
+ </rule>\r
+ <rule ref="rulesets/strictexception.xml/AvoidThrowingNullPointerException">\r
+ <priority>2</priority>\r
+ </rule>\r
+ <rule ref="rulesets/strictexception.xml/AvoidThrowingRawExceptionTypes">\r
+ <priority>2</priority>\r
+ </rule>\r
+ <rule ref="rulesets/basic.xml/AvoidUsingHardCodedIP">\r
+ <priority>3</priority>\r
+ </rule>\r
+ <rule ref="rulesets/basic.xml/EmptyInitializer">\r
+ <priority>3</priority>\r
+ </rule>\r
+ <rule ref="rulesets/basic.xml/BrokenNullCheck">\r
+ <priority>2</priority>\r
+ </rule>\r
+ <rule ref="rulesets/strictexception.xml/DoNotExtendJavaLangError">\r
+ <priority>2</priority>\r
+ </rule>\r
+ <rule ref="rulesets/basic.xml/EmptyCatchBlock">\r
+ <priority>2</priority>\r
+ </rule>\r
+ <rule ref="rulesets/finalizers.xml/EmptyFinalizer">\r
+ <priority>2</priority>\r
+ </rule>\r
+ <rule ref="rulesets/basic.xml/EmptyFinallyBlock">\r
+ <priority>2</priority>\r
+ </rule>\r
+ <rule ref="rulesets/basic.xml/EmptyIfStmt">\r
+ <priority>2</priority>\r
+ </rule>\r
+ <rule ref="rulesets/design.xml/EmptyMethodInAbstractClassShouldBeAbstract">\r
+ <priority>2</priority>\r
+ </rule>\r
+ <rule ref="rulesets/basic.xml/EmptyStatementNotInLoop">\r
+ <priority>2</priority>\r
+ </rule>\r
+ <rule ref="rulesets/basic.xml/EmptyStaticInitializer">\r
+ <priority>2</priority>\r
+ </rule>\r
+ <rule ref="rulesets/basic.xml/EmptySwitchStatements">\r
+ <priority>2</priority>\r
+ </rule>\r
+ <rule ref="rulesets/basic.xml/EmptySynchronizedBlock">\r
+ <priority>2</priority>\r
+ </rule>\r
+ <rule ref="rulesets/basic.xml/EmptyTryBlock">\r
+ <priority>2</priority>\r
+ </rule>\r
+ <rule ref="rulesets/basic.xml/EmptyWhileStmt">\r
+ <priority>2</priority>\r
+ </rule>\r
+ <rule ref="rulesets/strictexception.xml/ExceptionAsFlowControl">\r
+ <priority>2</priority>\r
+ </rule>\r
+ <rule ref="rulesets/braces.xml/ForLoopsMustUseBraces">\r
+ <priority>4</priority>\r
+ </rule>\r
+ <rule ref="rulesets/braces.xml/IfElseStmtsMustUseBraces">\r
+ <priority>4</priority>\r
+ </rule>\r
+ <rule ref="rulesets/braces.xml/IfStmtsMustUseBraces">\r
+ <priority>4</priority>\r
+ </rule>\r
+ <rule ref="rulesets/basic.xml/MisplacedNullCheck">\r
+ <priority>2</priority>\r
+ </rule>\r
+ <rule ref="rulesets/design.xml/MissingBreakInSwitch">\r
+ <priority>2</priority>\r
+ </rule>\r
+ <rule ref="rulesets/strictexception.xml/AvoidThrowingNewInstanceOfSameException">\r
+ <priority>2</priority>\r
+ </rule>\r
+ <rule ref="rulesets/strictexception.xml/DoNotThrowExceptionInFinally">\r
+ <priority>2</priority>\r
+ </rule>\r
+ <rule ref="rulesets/unusedcode.xml/UnusedLocalVariable">\r
+ <priority>3</priority>\r
+ </rule>\r
+ <rule ref="rulesets/controversial.xml/UnusedModifier">\r
+ <priority>5</priority>\r
+ </rule>\r
+</ruleset>\r
+\r
import java.io.OutputStream;
import java.io.OutputStreamWriter;
+import org.tizen.common.util.Assert;
import org.tizen.common.util.FreeMarkerUtil;
import org.tizen.common.verrari.IModelProvider;
import org.tizen.common.verrari.ITemplateProvider;
throws Exception
{
final Template freemarkerTemplate = cfg.getTemplate( templateKey );
- if ( null == freemarkerTemplate )
- {
- logger.error( "Template is null for {}", templateKey );
- }
+ Assert.notNull( freemarkerTemplate, "Template is null for " + templateKey );
final IModelProvider adapter = new FreemarkerModelManager( modelProvider );
freemarkerTemplate.process( adapter, new OutputStreamWriter( output ) );
}
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
+import org.tizen.common.util.Assert;
import org.tizen.common.verrari.IModelProvider;
import org.tizen.common.verrari.ITemplate;
import org.tizen.common.verrari.engine.AbstractTemplateEngine;
final ITemplate template = getTemplate( templateKey );
logger.debug( "Template :{}", template );
- if ( null == template )
- {
- logger.error( "Template is null for {}", templateKey );
- }
+ Assert.notNull( template, "Template is null for " + templateKey );
String encoding = template.getEncoding();
if (encoding == null) {
package org.tizen.common.verrari.template;
import static org.junit.Assert.assertEquals;
+import static org.tizen.common.util.IOUtil.tryClose;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
+import java.io.InputStream;
import java.io.InputStreamReader;
import org.junit.After;
String templateContents;
String fileConents;
+ InputStream in = null;
BufferedReader bufferedReader = null;
InputStreamReader streamReader = null;
// get FileTemplate contents.
try {
- streamReader = new InputStreamReader(fileTemplate.open(), fileTemplate.getEncoding());
+ in = fileTemplate.open();
+ streamReader = new InputStreamReader( in, fileTemplate.getEncoding());
bufferedReader = new BufferedReader(streamReader, 8192);
StringBuilder text = new StringBuilder();
final char[] buffer = new char[8192];
text.append( buffer, 0, nRead );
}
templateContents = text.toString();
- } catch (Exception e) {
- throw e;
} finally {
- if (streamReader != null) { streamReader.close(); }
- if (bufferedReader != null) { bufferedReader.close(); }
+ tryClose( bufferedReader, streamReader, in );
}
// get File contents.
try {
- streamReader = new InputStreamReader(new FileInputStream(file), System.getProperty("file.encoding"));
+ in = new FileInputStream( file );
+ streamReader = new InputStreamReader( in, System.getProperty("file.encoding"));
bufferedReader = new BufferedReader(streamReader, 8192);
StringBuilder text = new StringBuilder();
final char[] buffer = new char[8192];
text.append( buffer, 0, nRead );
}
fileConents = text.toString();
- } catch (Exception e) {
- throw e;
} finally {
- if (streamReader != null) { streamReader.close(); }
- if (bufferedReader != null) { bufferedReader.close(); }
+ tryClose( bufferedReader, streamReader, in );
}
assertEquals(templateContents, fileConents);
{\r
final char[] chars = name.toCharArray();\r
for ( int i=0, n=chars.length ; i<n ; ++i ) {\r
- if ( Character.isJavaIdentifierPart( chars[i] ) ) continue;\r
- if ( '.' == chars[i] ) continue;\r
+ if ( Character.isJavaIdentifierPart( chars[i] ) )\r
+ {\r
+ continue;\r
+ }\r
+ if ( '.' == chars[i] )\r
+ {\r
+ continue;\r
+ }\r
return false;\r
}\r
return true;\r
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.FileWriter;
+import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.channels.FileChannel;
input = new FileReader(filePath);
redirect( input, contents );
return trim( contents.toString() );
- }catch(Exception e) {
+ } catch( final IOException e) {
+ logger.info( "Exception occurred:", e );
return null;
}finally{
tryClose( input, contents );
try {
proc= runtime.exec(fullCommand);
i = proc.waitFor();
- } catch (Exception e) {
- e.printStackTrace();
+ } catch ( IOException e) {
+ logger.info( "Exception occurred:", e );
+ return false;
+ } catch (InterruptedException e)
+ {
+ logger.info( "Exception occurred:", e );
return false;
} finally{
logger.info( "HostUtil execute - exit value : {}", i );
StreamGobbler gb2 = new StreamGobbler(p.getErrorStream());
gb1.start();
gb2.start();
- }catch(Exception e){
- e.printStackTrace();
+ }catch( final IOException e ) {
+ logger.info( "Exception occurred:", e );
+ return false;
+ } catch (InterruptedException e)
+ {
+ logger.info( "Exception occurred:", e );
return false;
}
return i == 0;
gb2 = new StreamGobbler(p.getErrorStream());
gb1.start();
gb2.start();
- }catch(Exception e){
- e.printStackTrace();
+ }catch( final IOException e ) {
+ logger.info( "Exception occurred:", e );
return false;
}finally{
logger.debug( "Output Stream :{}", gb1.getResult() );
contents.append(line);
contents.append(LINE_SEPARATOR);
}
- } catch (Exception e) {
- e.printStackTrace();
+ } catch ( IOException e ) {
+ logger.info( "Exception occurred:", e );
return null;
} finally{
tryClose( input );
* Show output messages while executes the command on console view
* @param command - Command to execute.
* @param viewName - View name showing messages while executes the command.
+ * @throws IOException
+ * @throws InterruptedException
*/
- public static void executeWithConsole(String command, String viewName) throws Exception {
+ public static void executeWithConsole(String command, String viewName) throws IOException, InterruptedException {
BufferedReader input = null;
String line = null;
// abnormal termination
if (proc.exitValue() != 0)
{
- throw new Exception("Failed to execute command: " + command);
+ throw new IllegalStateException("Failed to execute command: " + command);
}
} finally {
tryClose( input );
output = new BufferedWriter(new FileWriter(file));
output.write(contents);
return true;
- } catch (Exception e) {
- e.printStackTrace();
+ } catch ( IOException e) {
+ logger.info( "Exception occurred:", e );
return false;
}finally{
tryClose( output );
/**
- * @deprecated Use {@link FileUtil#copyTo(String, String)} instead.
+ * @deprecated Use {@link FileUtil#copyTo(String, String)} instead.
+ * @throws IOException
*/
@Deprecated
- public static boolean copyFile(String src, String des) throws Exception {
+ public static boolean copyFile(String src, String des) throws IOException {
boolean canExecute = false;
File srcFile=new File(src);
File desFile=null;
import java.util.Iterator;
import org.junit.Test;
+import org.slf4j.LoggerFactory;
/**
} catch ( ConcurrentModificationException e )
{
// Test Success
+ LoggerFactory.getLogger( getClass() ).info( "Test case successfult" );
}
}
true
};
- Object[] actualData = null;
-
for ( Object[] input : inputArray ) {
for ( Object arg : inputAddArg ) {
+ Object[] actualData = null;
try {
actualData = ArrayUtil.add(input, arg);
} catch (ArrayStoreException e) {
new Object[]{null, "hello", 10},
new Object[]{null, null, null},
new Object[]{ }
+
};
- Object[] actualData = null;
+
+ try
+ {
+ ArrayUtil.remove( null, 0, 1 );
+ fail();
+ }
+ catch( final IllegalArgumentException e )
+ {
+ LoggerFactory.getLogger( getClass() ).info( "Test case successfult" );
+ }
for ( Object[] input : inputArray ) {
for ( int i = -1 ; i < 10 ; i++ ) {
for( int j = -1 ; j < 10 ; j++ ) {
int deleteCount = 0;
+ Object[] actualData = null;
try {
actualData = ArrayUtil.remove( input, i, j);
i = Math.max( 0, i );
import java.util.Vector;
import java.util.concurrent.atomic.AtomicInteger;
-import org.junit.Before;
import org.junit.Test;
+import org.slf4j.LoggerFactory;
/**
try {
CollectionUtil.mergeArrayIntoCollection( TEST_CASES[0], null );
fail( "mergeArrayIntoCollection must throw exception" );
- } catch (NullPointerException e) {
+ } catch ( IllegalArgumentException e )
+ {
+ LoggerFactory.getLogger( getClass() ).info( "Test case successful" );
}
for ( final Object[] TEST_CASE : TEST_CASES )
assertEquals( "Tizen"+StringUtil.EMPTY_STRING+"Test",
CollectionUtil.concatenate( iter, StringUtil.EMPTY_STRING ) );
break;
+ default:
+ break;
}
}
try {
CollectionUtil.swap( objectArray, 0, 5 );
fail( "swap must throw exception" );
- } catch (Exception e) {
+ } catch ( final ArrayIndexOutOfBoundsException e) {
+ LoggerFactory.getLogger( getClass() ).info( "Test case successful" );
}
try {
CollectionUtil.swap( objectArray, -1, 0 );
fail( "swap must throw exception" );
- } catch (Exception e) {
+ } catch ( final ArrayIndexOutOfBoundsException e) {
+ LoggerFactory.getLogger( getClass() ).info( "Test case successful" );
}
try {
CollectionUtil.swap( null, 0, 1 );
fail( "swap must throw exception" );
- } catch (Exception e) {
+ } catch ( final NullPointerException e) {
+ LoggerFactory.getLogger( getClass() ).info( "Test case successful" );
}
}