guiguilechat

Results 48 comments of guiguilechat

Another use case : the generation of a cached value from a generator method. typically, either the method takes no argument, therefore one item is cached. Or the method takes...

should be cm.resourceDir("META-INF/services").addFile(aEntry.getKey (), StandardCharsets.UTF_8, sContent) ; IMO.

you can make it without changing the major version (this is the reason of the item 5. )

https://github.com/phax/jcodemodel/blob/master/src/main/java/com/helger/jcodemodel/JResourceDir.java#L76 > // Empty is not allowed > if (sName == null || sName.length () == 0) > return true; > > // Java keywords are now allowed > if...

I used JClassAlreadyExistsException but actually there should be specific exceptions, namely ClassNameAlreadyAsFileException and FileNameAlreadyAsClassException ``` package com.helger.jcodemodel; import java.nio.charset.Charset; import org.junit.Test; import com.helger.jcodemodel.fmt.JTextFile; public class JResourceDirTest { @Test(expected = IllegalArgumentException.class)...

what about putting the (new) exceptions in a jcodemodel.exceptions package ?

https://github.com/phax/jcodemodel/blob/master/src/main/java/com/helger/jcodemodel/JPackage.java#L264 L264 \- JResourceDir aRD = m_aOwner.resourceDir (m_sName.replace ('.', '/')); \+ JResourceDir aRD = m_aOwner.resourceDir (m_sName.replace ('.', JResourceDir.SEPARATOR)); L270 \- aRD = m_aOwner.resourceDir (m_sName.toUpperCase (Locale.ROOT).replace ('.', '/')); \+ aRD =...

https://github.com/phax/jcodemodel/blob/master/src/main/java/com/helger/jcodemodel/JResourceDir.java#L83 I still have issues with that. the path a////b.txt is correct and semantically the same as a/b.txt ,therefore empty paths are not an issue as long as it's not...

Here are two tests that check name collision with files and dirs. typically I create "my/name" as both a folder and a file. That should fail, but does not. ```...